File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ if [ ! -z "$src_file" ]; then
3333 echo " Error: invalid source path $src_file "
3434 exit 2
3535 fi
36+
37+ if [ ! -f " $src_file " ]; then
38+ echo " Error: file not found $src_file "
39+ exit 2
40+ fi
3641fi
3742
3843# Reading file
Original file line number Diff line number Diff line change 88
99$ user = $ _SESSION ['user ' ];
1010if (($ _SESSION ['user ' ] == 'admin ' ) && (!empty ($ _SESSION ['look ' ]))) {
11- $ user= $ _SESSION ['look ' ];
11+ $ user = $ _SESSION ['look ' ];
1212}
1313
14- if (! empty ( $ _REQUEST ['path ' ])) {
15- $ path = $ _REQUEST [ ' path ' ];
14+ $ path = $ _REQUEST ['path ' ];
15+ if (! empty ( $ path)) {
1616 header ("Content-type: application/octet-stream " );
1717 header ("Content-Transfer-Encoding: binary " );
1818 header ("Content-disposition: attachment;filename= " .basename ($ path ));
19- passthru (VESTA_CMD . "v-open-fs-file " . $ user . " " . escapeshellarg ($ path ));
19+ passthru (VESTA_CMD . "v-open-fs-file " . $ user . " " . escapeshellarg ($ path ));
2020 exit ;
21- }
22- else {
21+ } else {
2322 die ('File not found ' );
2423}
25-
26-
27- ?>
You can’t perform that action at this time.
0 commit comments