mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 20:50:06 +02:00
Remove .. from attachments pathes, to prevent leaking of internal files.
This commit is contained in:
parent
2001680542
commit
ac238c65a0
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue