Skip to content
Snippets Groups Projects
Commit 4e5291c7 authored by Lukas Reschke's avatar Lukas Reschke Committed by Jörn Friedrich Dreyer
Browse files

Use SCRIPT_NAME instead of PHP_SELF which won't send the PATH_INFO, this...

Use SCRIPT_NAME instead of PHP_SELF which won't send the PATH_INFO, this prevents XSS in old browsers. Thanks to Nico Golde.
parent 4d3c45a8
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ OCP\App::setActiveNavigationEntry( 'files_index' );
$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
// Redirect if directory does not exist
if(!OC_Filesystem::is_dir($dir.'/')) {
header('Location: '.$_SERVER['PHP_SELF'].'');
header('Location: '.$_SERVER['SCRIPT_NAME'].'');
}
$files = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment