Skip to content

Commit

Permalink
Use escapeshellcmd instead of escapeshellarg to prevent abuse like on C…
Browse files Browse the repository at this point in the history
…VE-2024-0986. Bump to release 3
  • Loading branch information
Nicolás committed Aug 23, 2024
1 parent 3616461 commit 5473a73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/backup_restore/restore.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
echo "<html><head></head><body>";

if (isset($_REQUEST['filename'])){
$filename = escapeshellarg($_REQUEST['filename']);
$filename = substr($filename,1,-1);
$filename = escapeshellcmd($_REQUEST['filename']);
$filename = $backup_dir."/".$filename;
if(is_file($filename)) {
echo "<div style='font-family: \"Lucida Console\", Monaco, monospace'>";
Expand Down

0 comments on commit 5473a73

Please sign in to comment.