Skip to content

Commit

Permalink
Merge branch '3.2' into 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 20, 2024
2 parents 95fa667 + 7ae2559 commit 858559f
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ public function save(Request $request): JsonResponse
}

if (isset($configurationData['records.attachmentsPath'])) {
$configurationData['records.attachmentsPath'] = str_replace(
'../',
'',
$configurationData['records.attachmentsPath']
);
if (false !== realpath($configurationData['records.attachmentsPath'])) {
$configurationData['records.attachmentsPath'] = str_replace(
Request::createFromGlobals()->server->get('DOCUMENT_ROOT') . DIRECTORY_SEPARATOR,
'',
realpath($configurationData['records.attachmentsPath'])
);
} else {
unset($configurationData['records.attachmentsPath']);
}
}

if (
Expand Down

0 comments on commit 858559f

Please sign in to comment.