Merge pull request #3511 from nextcloud/backport-3362-stable11

[stable11] Fix cookie name (nc_token instead of oc_token)
This commit is contained in:
Morris Jobke 2017-02-16 11:33:02 -06:00 committed by GitHub
commit 6431f009de
2 changed files with 3 additions and 3 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

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