Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[SecurityBundle] Allow for custom logout request matcher#22572

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ro0NL wants to merge1 commit intosymfony:3.4fromro0NL:logout-requestmatcher
Closed

[SecurityBundle] Allow for custom logout request matcher#22572

ro0NL wants to merge1 commit intosymfony:3.4fromro0NL:logout-requestmatcher

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedApr 28, 2017
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes/no
Fixed tickets#22473
LicenseMIT
Doc PRsymfony/symfony-docs#...

So you can do something like

logout:path:~request_matcher:my_logout_matcher

and bypass path-matching, or combine it with a custom check afterwards.

Should go after#22574 and#22584

* Sets a request matcher.
*
* @param RequestMatcherInterface $requestMatcher
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Cannot it be passed as a new optional constructor argument rather than by using a method call?

I'm not sure someone is supposed to replace the abstract service definition, so it shouldn't be an issue.

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneApr 28, 2017
fabpot added a commit that referenced this pull requestApr 28, 2017
This PR was squashed before being merged into the 2.7 branch (closes#22574).Discussion----------[Security] Fix phpdoc logout listener| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->Separated from#22572Commits-------e843924 [Security] Fix phpdoc logout listener
@ro0NL
Copy link
ContributorAuthor

Looking at thefirewall configuration, which allows eitherrequest_matcher orpattern. So i think this should follow the same approach, as well as#22578

Status: needs work

@ro0NL
Copy link
ContributorAuthor

Then again.. the logout path is needed for url generation and enables using routes (also for matching). So tend to keep it as is :)

Status: needs review

fabpot added a commit that referenced this pull requestMay 11, 2017
… path (ro0NL)This PR was merged into the 2.7 branch.Discussion----------[Security] Avoid unnecessary route lookup for empty logout path| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no-ish| Deprecations? | no| Tests pass?   | yes/no| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->i first included this with#22572 where having `logout: { path: ~ }` makes more sense for disabling logout path matching/generation. But currently it's already allowed and causes an unneeded route lookup and url generation.Commits-------2967807 [Security] Avoid unnecessary route lookup for empty logout path
@nicolas-grekasnicolas-grekas changed the base branch frommaster to3.4May 23, 2017 17:03
@nicolas-grekas
Copy link
Member

rebase needed

return$this->httpUtils->checkRequestPath($request,$this->options['logout_path']);
if (!isset($this->options['logout_path']) &&null ===$this->requestMatcher) {
returnfalse;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should this condition be allowed at all? This seems invalid: you should pass one or the other. We could catch this with validation inMainConfiguration (and an exception here). We should probably also not allowboth to be set.

@nicolas-grekas
Copy link
Member

Moving to 4.1. Rebase on master might be needed, where PHP 7.1 features can be used btw.

@nicolas-grekasnicolas-grekas modified the milestones:3.4,4.1Oct 8, 2017
@nicolas-grekasnicolas-grekas modified the milestones:4.1,nextApr 20, 2018
@ro0NLro0NL closed thisNov 25, 2018
@ro0NLro0NL deleted the logout-requestmatcher branchNovember 25, 2018 17:37
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@weaverryanweaverryanweaverryan requested changes

+1 more reviewer

@ogizanagiogizanagiogizanagi left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

5 participants

@ro0NL@nicolas-grekas@weaverryan@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp