-
Notifications
You must be signed in to change notification settings - Fork 7
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
[SDKNEW-3192] url decoding reserved characters & filter by custom function #42
Conversation
d6f1b78
to
1ffcc21
Compare
if sum(1 for _ in filter(lambda whitelist_route_item: re.match(whitelist_route_item, request.path), config.whitelist_routes_regex)) > 0 or \ | ||
sum(1 for _ in filter(lambda whitelist_route_item: request.path == whitelist_route_item, config.filter_by_route)) > 0: | ||
return True | ||
if config.filter_by_custom_function: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the custom function be the first condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - it should be the last condition in case other (simpler) configurations filter it out first and we can prevent needing to call the function unnecessarily
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks very good.
Please fix the failed unit tests
c799bb3
to
462d3d0
Compare
3476881
to
6e5362b
Compare
https://perimeterx.atlassian.net/browse/SDKNEW-3192