Skip to content

Bugfix - matching blacklisted_paths on request_target instead of uri. #62

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

Conversation

schroedingerskatze42
Copy link

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets -
Documentation -
License MIT

What's in this PR?

matched the wrong subject; need to match the path of a request, not the uri object

Why?

need to match the path of a request, not the uri object

@dbu
Copy link
Contributor

dbu commented Nov 29, 2019

what is wrong with using the whole uri? i expect it could make sense in some scenarios to also consider the domain in the blacklist, or not?

@dbu
Copy link
Contributor

dbu commented Dec 2, 2019

@nobYsDarling ping - i want to tag a release, but if we change the behaviour we should do it before tagging a release to avoid BC breaks.

@dbu
Copy link
Contributor

dbu commented Dec 9, 2019

ping @nobYsDarling why don't you want to match on the whole url?

@dbu
Copy link
Contributor

dbu commented Dec 16, 2019

hi @nobYsDarling i'd love to wrap this up. can you please tell why you don't want to match the domain?

@Nyholm
Copy link
Member

Nyholm commented Dec 16, 2019

The Uri object is converted to a string. So I think the current implementation is fine. @nobYsDarling could you tell me why we need this change?

@GrahamCampbell
Copy link
Contributor

Maybe it was picked up by a static analyzer or IDE, since the old code could fail if strict types were enabled for the file.

@dbu
Copy link
Contributor

dbu commented Dec 17, 2019

unless i am mistaken, the significant difference here is that getUri gives you the host name as well, but request target is only the path without host name.

what if we (string) $request->getUri()?

@dbu dbu mentioned this pull request Dec 17, 2019
@dbu dbu mentioned this pull request Dec 25, 2019
1 task
@Nyholm Nyholm mentioned this pull request Dec 26, 2019
@Nyholm
Copy link
Member

Nyholm commented Dec 26, 2019

I've reviewed this PR and also looked at the test.
I see that the intention was to only use paths and this PR corrects your original PR where you added that features.

However, I think it is better to include the full URL. That would make this feature even more powerful and flexible.

I'll close this PR, If I still misunderstand you, please reopen it or add a comment.

@Nyholm Nyholm closed this Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants