summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-02-02 21:56:44 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-02-02 21:56:44 +0100
commit5e728d0eda85710b667b6399dbae8c2cbab8e72d (patch)
treed24d3fb3e0ce57060731d04cbee5a412bd4814ba
parent949fbdef33c527ef481bcf1cb44c9d8c4a781000 (diff)
downloadnextcloud-server-5e728d0eda85710b667b6399dbae8c2cbab8e72d.tar.gz
nextcloud-server-5e728d0eda85710b667b6399dbae8c2cbab8e72d.zip
oc_token should be nc_token
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--core/Controller/LoginController.php2
-rw-r--r--lib/private/AppFramework/Http/Request.php2
-rw-r--r--tests/Core/Controller/LoginControllerTest.php4
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php2
4 files changed, 5 insertions, 5 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 52bd2213954..e9911d01912 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -98,7 +98,7 @@ class LoginController extends Controller {
* @return RedirectResponse
*/
public function logout() {
- $loginToken = $this->request->getCookie('oc_token');
+ $loginToken = $this->request->getCookie('nc_token');
if (!is_null($loginToken)) {
$this->config->deleteUserValue($this->userSession->getUser()->getUID(), 'login_token', $loginToken);
}
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 62d7fc7ed30..404c31879d2 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -490,7 +490,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* @return bool
*/
private function cookieCheckRequired() {
- if($this->getCookie(session_name()) === null && $this->getCookie('oc_token') === null) {
+ if($this->getCookie(session_name()) === null && $this->getCookie('nc_token') === null) {
return false;
}
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index a1a4452abf8..72f921724a5 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -89,7 +89,7 @@ class LoginControllerTest extends TestCase {
$this->request
->expects($this->once())
->method('getCookie')
- ->with('oc_token')
+ ->with('nc_token')
->willReturn(null);
$this->config
->expects($this->never())
@@ -108,7 +108,7 @@ class LoginControllerTest extends TestCase {
$this->request
->expects($this->once())
->method('getCookie')
- ->with('oc_token')
+ ->with('nc_token')
->willReturn('MyLoginToken');
$user = $this->getMockBuilder('\\OCP\\IUser')->getMock();
$user
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index b1515b0efb5..6c6504b4de8 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -1651,7 +1651,7 @@ class RequestTest extends \Test\TestCase {
'HTTP_REQUESTTOKEN' => 'AAAHGxsTCTc3BgMQESAcNR0OAR0=:MyTotalSecretShareds',
],
'cookies' => [
- 'oc_token' => 'asdf',
+ 'nc_token' => 'asdf',
],
],
$this->secureRandom,