Skip to content
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

Merged
merged 11 commits into from
Nov 20, 2023

Conversation

ori-gold-px
Copy link
Collaborator

@ori-gold-px ori-gold-px force-pushed the feature/url-decode-reserved-characters branch from d6f1b78 to 1ffcc21 Compare November 7, 2023 16:43
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:
Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Contributor

@chen-zimmer-px chen-zimmer-px left a 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

@ori-gold-px ori-gold-px force-pushed the feature/url-decode-reserved-characters branch from c799bb3 to 462d3d0 Compare November 16, 2023 21:20
@ori-gold-px ori-gold-px force-pushed the feature/url-decode-reserved-characters branch from 3476881 to 6e5362b Compare November 18, 2023 00:21
@ori-gold-px ori-gold-px merged commit 1fef621 into dev Nov 20, 2023
3 checks passed
@ori-gold-px ori-gold-px deleted the feature/url-decode-reserved-characters branch November 20, 2023 21:28
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.

2 participants