Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82439

Antivirus email sending errors are shown to users

XMLWordPrintable

    • MOODLE_405_STABLE

      We have observed that as part of sending an antivirus alert email, if an exception is thrown by the geolocation library (as part of getting the geo info of the ip address that uploaded the bad file), that this is propogated up and shown to students and is not very helpful.

      E.g. uploading a bad file, a student received the error "Exception - The address x.x.x.x is not in the database."

      This error originates from here: https://github.com/moodle/moodle/blob/7d7a871eddf81cdc1e6f5ea9dda67cf9058dd032/lib/maxmind/GeoIp2/Database/Reader.php#L246

      In my opinion, internal errors from sending the antivirus alert email should not be shown to users, the users should instead see the expected error saying the file was blocked from uploading because it failed the antivirus check.

      To recreate this:

      • Be able to trigger the antivirus by uploading a file
      • Trigger an ip address lookup fail.
      • Upload a bad file, and see that the coding exception output was shown, even if debugging is off and the user is a student (not an admin)

      I've attached a screenshot of recreating this on the latest version of Moodle using the above method.

       

            Unassigned Unassigned
            matthewhilton Matthew Hilton
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.