Merge pull request #3511 from nextcloud/backport-3362-stable11
[stable11] Fix cookie name (nc_token instead of oc_token)
This commit is contained in:
commit
6431f009de
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue