mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merge branch 'MDL-49787_email_attachments_symlink_fix' of https://github.com/iamandrew/moodle
This commit is contained in:
commit
2a72614f53
@ -5605,7 +5605,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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user