oc_token should be nc_token

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2017-02-02 21:56:44 +01:00
parent 949fbdef33
commit 5e728d0eda
4 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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

View File

@ -1651,7 +1651,7 @@ class RequestTest extends \Test\TestCase {
'HTTP_REQUESTTOKEN' => 'AAAHGxsTCTc3BgMQESAcNR0OAR0=:MyTotalSecretShareds',
],
'cookies' => [
'oc_token' => 'asdf',
'nc_token' => 'asdf',
],
],
$this->secureRandom,