Ver código fonte

Restrict v-make-tmp-file to tmp folder

Jaap Marcus 5 anos atrás
pai
commit
aad318755a
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      web/api/index.php

+ 1 - 1
web/api/index.php

@@ -123,7 +123,7 @@ function api($hst_hash, $hst_user, $hst_password, $hst_returncode, $hst_cmd, $hs
     // Check command
     if ($cmd == "'v-make-tmp-file'") {
         // Used in DNS Cluster
-        $fp = fopen($hst_arg2, 'w');
+        $fp = fopen('/tmp/'.basename($hst_arg2), 'w');
         fwrite($fp, $hst_arg1."\n");
         fclose($fp);
         $return_var = 0;