summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-13 13:33:20 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-13 13:33:20 +0100
commita7df23cebadfc0a60095ff53e4ae5e293eb02b38 (patch)
tree54e8fd3e3179c65e8abda8e3bc61ce6547a501c6 /lib
parent51f8d240c1c7a2c5fe4ab89854aeae02a33406b4 (diff)
downloadnextcloud-server-a7df23cebadfc0a60095ff53e4ae5e293eb02b38.tar.gz
nextcloud-server-a7df23cebadfc0a60095ff53e4ae5e293eb02b38.zip
Manually type-case all AJAX files
This enforces proper types on POST and GET arguments where I considered it sensible. I didn't update some as I don't know what kind of values they would support :see_no_evil: Fixes https://github.com/owncloud/core/issues/14196 for core
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index 558be6b570f..e5980b6d7e7 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -956,13 +956,13 @@ class OC {
//setup extra user backends
OC_User::setupBackends();
- if (OC_User::login($_POST["user"], $_POST["password"])) {
+ if (OC_User::login((string)$_POST["user"], (string)$_POST["password"])) {
$userId = OC_User::getUser();
// setting up the time zone
if (isset($_POST['timezone-offset'])) {
- self::$server->getSession()->set('timezone', $_POST['timezone-offset']);
- self::$server->getConfig()->setUserValue($userId, 'core', 'timezone', $_POST['timezone']);
+ self::$server->getSession()->set('timezone', (string)$_POST['timezone-offset']);
+ self::$server->getConfig()->setUserValue($userId, 'core', 'timezone', (string)$_POST['timezone']);
}
self::cleanupLoginTokens($userId);