Commit d4f82690 authored by Dan Poltawski's avatar Dan Poltawski
Browse files

Merge branch 'MDL-49787_email_attachments_symlink_fix_28' of...

Merge branch 'MDL-49787_email_attachments_symlink_fix_28' of https://github.com/iamandrew/moodle into MOODLE_28_STABLE
parents 744c5a5b 4ee8f04b
......@@ -5946,7 +5946,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
// If the attachment is a full path to a file in the tempdir, use it as is,
// otherwise assume it is a relative path from the dataroot (for backwards compatibility reasons).
if (strpos($attachpath, $temppath) !== 0) {
if (strpos($attachpath, realpath($temppath)) !== 0) {
$attachmentpath = $CFG->dataroot . '/' . $attachmentpath;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment