Skip to content

Clamav scan does not send notification when $INFECTED_FILES is empty #2593

@pjrobertson

Description

@pjrobertson

Steps To Reproduce

  1. Make sure your computer is free from infected files (grep 'FOUND$' $VMLOGS/clamav-fullscan.log after running a scan returns an empty string)
  2. Make sure your settings are set up not to send notifications to the Nextcloud UI (not to send an email)
  3. Run clamav weekly scan script
  4. Wait for it to reach the end of the script, more specifically here
  5. When it gets to the notify_admin_gui "Your weekly full-scan ClamAV report" "\$INFECTED_FILES_LOG\n \$INFECTED_FILES" section (line 254) note that the script bails/aborts, returning -l,--long-message requires a value error.

Expected Result

Clamav script runs successfull and posts a notification to the user

Actual Result

No notification is ever send because notify_admin_gui fails

Screenshots, Videos, or Pastebins

No response

Additional Context

No response

Build Version

27.1

Environment

By using the scripts

Environment Details

Linux XXXXX 5.15.0-87-generic #97-Ubuntu SMP Mon Oct 2 21:09:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions