Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention #16722

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

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
[Security] Throw an exception if both "intention" and "csrf_token_id"…
… options are defined
  • Loading branch information
jakzal committed Nov 28, 2015
commit 50856caf1c729e5b8c3688a9a451a415862456ce
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $http
}

if (isset($options['intention'])) {
if (isset($options['csrf_token_id'])) {
throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__));
}

@trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED);

$options['csrf_token_id'] = $options['intention'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
}

if (isset($options['intention'])) {
if (isset($options['csrf_token_id'])) {
throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__));
}

@trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED);

$options['csrf_token_id'] = $options['intention'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
}

if (isset($options['intention'])) {
if (isset($options['csrf_token_id'])) {
throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__));
}

@trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED);

$options['csrf_token_id'] = $options['intention'];
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.