mirror of
https://github.com/jcampbell1/simple-file-manager.git
synced 2025-02-20 22:00:04 +01:00
Security fix for #81 (insecure php setups)
This commit is contained in:
@@ -59,6 +59,9 @@ if($_POST) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$file = $_REQUEST['file'] ?: '.';
|
$file = $_REQUEST['file'] ?: '.';
|
||||||
|
// strip url syntax, like file://....
|
||||||
|
$file = preg_replace('@^.+://@','',$file);
|
||||||
|
|
||||||
if($_GET['do'] == 'list') {
|
if($_GET['do'] == 'list') {
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
$directory = $file;
|
$directory = $file;
|
||||||
|
|||||||
Reference in New Issue
Block a user