mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 08:30:04 +01:00
The patch adds validation for the noreplyaddress setting variable, for the explicit $replyto parameter and for the sender's email. In case of misconfigured noreplyaddress setting, it falls back to the default noreply address value. In case of invalid email in the user's record, the email is not sent. The patch also adds unit test for the value returned by the function generate_email_processing_address() so that it can be considered as a valid email, too. This is supposed to significantly minimise the risk of exploiting the vulnerability in PHPMailer's Sender field.