10000 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists by sroze · Pull Request #25151 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists #25151

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
Nov 24, 2017
Merged
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
Automatically enable the CSRF protection if CSRF manager exists
  • Loading branch information
sroze committed Nov 24, 2017
commit fd4340693c86317ba0e301f72c0e76fd8859fe24
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Symfony\Component\Form\Form;
use Symfony\Component\Lock\Lock;
use Symfony\Component\Lock\Store\SemaphoreStore;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Validator\Validation;
Expand Down Expand Up @@ -142,7 +143,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode)
$rootNode
->children()
->arrayNode('csrf_protection')
->canBeEnabled()
->{!class_exists(FullStack::class) && class_exists(CsrfTokenManagerInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->end()
->end()
;
Expand Down
0