8000 Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices by TerjeBr · Pull Request #6149 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices #6149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ final public function loginSuccess(Request $request, Response $response, TokenIn
$this->logger->debug('Remember-me was requested; setting cookie.');
}

// Remove attribute from request that sets a NULL cookie.
// It was set by $this->cancelCookie()
// (cancelCookie does other things too for some RememberMeServices
// so we should still call it at the start of this method)
$request->attributes->remove(self::COOKIE_ATTR_NAME);

$this->onLoginSuccess($request, $response, $token);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
)
);

$request->attributes->remove(self::COOKIE_ATTR_NAME);
$response->headers->setCookie(
new Cookie(
$this->options['name'],
Expand Down
0