diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-10-22 01:50:40 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-10-22 01:50:40 -0400 |
commit | 50bf7a98c2d34e919144885db0b56ffed4e8e9c3 (patch) | |
tree | 44edf0aa0f53654ef8eaa79432c21dd1f8296e49 /files/index.php | |
parent | 4c256433c0f77382885b5b5f8d2874c27d8e2b66 (diff) | |
download | nextcloud-server-50bf7a98c2d34e919144885db0b56ffed4e8e9c3.tar.gz nextcloud-server-50bf7a98c2d34e919144885db0b56ffed4e8e9c3.zip |
Redirect file browser if directory does not exist
Diffstat (limited to 'files/index.php')
-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 ){ |