Parcourir la source

Additional rXSS fix / closes #1558

Serghey Rodin il y a 7 ans
Parent
commit
c80c4c472e
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      web/view/file/index.php

+ 2 - 2
web/view/file/index.php

@@ -13,10 +13,10 @@ if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) {
 }
 
 if (!empty($_REQUEST['path'])) {
-    $path = $_REQUEST['path'];
+    $path = htmlspecialchars($_REQUEST['path'], ENT_QUOTES, 'UTF-8');
     if (!empty($_REQUEST['raw'])) {
         header('content-type: image/jpeg');
-        passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg(htmlspecialchars($_REQUEST['path'], ENT_QUOTES, 'UTF-8')));
+        passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($path));
         exit;
     }
 }