diff options
-rw-r--r-- | files/index.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/files/index.php b/files/index.php index bd37598289a..8bb5b618d87 100644 --- a/files/index.php +++ b/files/index.php @@ -42,6 +42,10 @@ if(!isset($_SESSION['timezone'])){ OC_App::setActiveNavigationEntry( "files_index" ); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; +// Redirect if directory does not exist +if(!OC_Filesystem::is_dir($dir)) { + header("Location: ".$_SERVER['PHP_SELF'].""); +} $files = array(); foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ |