diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-26 11:36:56 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-26 11:36:56 +0100 |
commit | 2bafb1c6493d67360f9ac6f4997a56664f3f2751 (patch) | |
tree | 7ccba69806bebf24d2adc790adc363cb184b5e2b /lib/private/user.php | |
parent | ecf2d178b1c3db3000f4d9c9d65f08ec3890488e (diff) | |
parent | 12b22c275974ef544adff2029a542d97210c8087 (diff) | |
download | nextcloud-server-2bafb1c6493d67360f9ac6f4997a56664f3f2751.tar.gz nextcloud-server-2bafb1c6493d67360f9ac6f4997a56664f3f2751.zip |
Merge pull request #21894 from owncloud/refactor-csrf
Add new CSRF manager for unit testing purposes
Diffstat (limited to 'lib/private/user.php')
-rw-r--r-- | lib/private/user.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index 7d1f21cc409..ae98bb9b01a 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -162,6 +162,8 @@ class OC_User { public static function login($loginname, $password) { $result = self::getUserSession()->login($loginname, $password); if ($result) { + // Refresh the token + \OC::$server->getCsrfTokenManager()->refreshToken(); //we need to pass the user name, which may differ from login name $user = self::getUserSession()->getUser()->getUID(); OC_Util::setupFS($user); @@ -328,7 +330,7 @@ class OC_User { return $backend->getLogoutAttribute(); } - return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(OC_Util::callRegister()) . '"'; + return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(\OCP\Util::callRegister()) . '"'; } /** |