Skip to content

Commit aad3187

Browse files
committed
Restrict v-make-tmp-file to tmp folder
1 parent ca95f07 commit aad3187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/api/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function api($hst_hash, $hst_user, $hst_password, $hst_returncode, $hst_cmd, $hs
123123
// Check command
124124
if ($cmd == "'v-make-tmp-file'") {
125125
// Used in DNS Cluster
126-
$fp = fopen($hst_arg2, 'w');
126+
$fp = fopen('/tmp/'.basename($hst_arg2), 'w');
127127
fwrite($fp, $hst_arg1."\n");
128128
fclose($fp);
129129
$return_var = 0;

0 commit comments

Comments
 (0)