8000 merged branch TerjeBr/persistent-token-provider (PR #6149) · symfony/symfony@150a138 · GitHub
[go: up one dir, main page]

Skip to content

Commit 150a138

Browse files
committed
merged branch TerjeBr/persistent-token-provider (PR #6149)
This PR was merged into the master branch. Commits ------- 373be62 Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices Discussion ---------- Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #6055 Todo: - License of the code: MIT By a mistake setting of new cookies did not work for other RememberMe services than PersistentTokenBasedRememberMeServices --------------------------------------------------------------------------- by TerjeBr at 2012-12-01T17:28:08Z Ping. Any feedback on this?
2 parents 9ab4a96 + 373be62 commit 150a138

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ final public function loginSuccess(Request $request, Response $response, TokenIn
195195
$this->logger->debug('Remember-me was requested; setting cookie.');
196196
}
197197

198+
// Remove attribute from request that sets a NULL cookie.
199+
// It was set by $this->cancelCookie()
200+
// (cancelCookie does other things too for some RememberMeServices
201+
// so we should still call it at the start of this method)
202+
$request->attributes->remove(self::COOKIE_ATTR_NAME);
203+
198204
$this->onLoginSuccess($request, $response, $token);
199205
}
200206

src/Symfony/Component/Securi 7FC1 ty/Http/RememberMe/PersistentTokenBasedRememberMeServices.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
133133
)
134134
);
135135

136-
$request->attributes->remove(self::COOKIE_ATTR_NAME);
137136
$response->headers->setCookie(
138137
new Cookie(
139138
$this->options['name'],

0 commit comments

Comments
 (0)
0