summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-15 15:51:06 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-15 16:16:00 +0200
commit0074062b5329c3d43679909fddce2d70608a4475 (patch)
treefbf6e55c84a246483f210a65982ae539627b26ae /index.php
parent5c6a7172cafc395d38c58d1b5afd6b36efb33ad5 (diff)
downloadnextcloud-server-0074062b5329c3d43679909fddce2d70608a4475.tar.gz
nextcloud-server-0074062b5329c3d43679909fddce2d70608a4475.zip
fixed xss vulnerability
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 5042ede2e27..4df62327c47 100644
--- a/index.php
+++ b/index.php
@@ -118,7 +118,7 @@ elseif(OC_User::isLoggedIn()) {
if(!array_key_exists('sectoken', $_SESSION) || (array_key_exists('sectoken', $_SESSION) && is_null(OC::$REQUESTEDFILE)) || substr(OC::$REQUESTEDFILE, -3) == 'php'){
$sectoken=rand(1000000,9999999);
$_SESSION['sectoken']=$sectoken;
- $redirect_url = (isset($_REQUEST['redirect_url'])) ? $_REQUEST['redirect_url'] : $_SERVER['REQUEST_URI'];
+ $redirect_url = (isset($_REQUEST['redirect_url'])) ? strip_tags($_REQUEST['redirect_url']) : $_SERVER['REQUEST_URI'];
OC_Template::printGuestPage('', 'login', array('error' => $error, 'sectoken' => $sectoken, 'redirect' => $redirect_url));
}
}