Skip to content

Commit

Permalink
fix: avoid possible path traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 17, 2024
1 parent 9136883 commit 75fbeb0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions phpmyfaq/admin/configuration.php
Expand Up @@ -58,6 +58,13 @@
if (isset($editData['edit']['main.currentVersion'])) {
unset($editData['edit']['main.currentVersion']); // don't update the version number
}
if (isset($editData['edit']['records.attachmentsPath'])) {
$editData['edit']['records.attachmentsPath'] = str_replace(
'../',
'',
$editData['edit']['records.attachmentsPath']
);
}

if (
isset($editData['edit']['main.referenceURL']) &&
Expand Down

0 comments on commit 75fbeb0

Please sign in to comment.