Remove .. from attachments pathes, to prevent leaking of internal files.

This commit is contained in:
Jan Böhmer 2019-09-25 16:49:44 +02:00
parent 2001680542
commit ac238c65a0

View file

@ -120,8 +120,8 @@ class AttachmentHelper
//Older path entries are given via %BASE% which was the project root
$placeholder_path = str_replace($placeholders, $targets, $placeholder_path);
//Normalize path
$placeholder_path = str_replace('\\', '/', $placeholder_path);
//Normalize path and remove ..
$placeholder_path = str_replace(['\\','..'], ['/',''], $placeholder_path);
return $placeholder_path;
}