Apply #whitelist_payload_shape and #filter_parameters at the same time#136
Merged
UberMouse merged 1 commit intoMindscapeHQ:masterfrom Dec 17, 2018
blacklane:filter_parameters_and_whitelist
Merged
Apply #whitelist_payload_shape and #filter_parameters at the same time#136UberMouse merged 1 commit intoMindscapeHQ:masterfrom blacklane:filter_parameters_and_whitelist
UberMouse merged 1 commit intoMindscapeHQ:masterfrom
blacklane:filter_parameters_and_whitelist
Conversation
Contributor
|
I'm sitting here racking my brain trying to remember why I implemented it this way, but I can't think of any reason to keep the current behavior. It does make more sense to give you the option to filter using both methods, so I'll be merging this. Thanks for bringing it to my attention. |
Contributor
Author
|
@UberMouse thanks! will you make a gem release any time soon? |
Contributor
|
I made the gem release yesterday. I bumped it to 3.0.0 as it's technically a breaking change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a use case where we'd like to apply both
whitelist_payload_shapeand thefilter_parametersat the same time: we usewhitelist_payload_shapeto filter out theAuthorizationheader from requests, while we usefilter_parametersfor regular form & query fields.As a workaround, we extended our
whitelist_payload_shapeto also filter out form & query fields but it looks pretty ugly, especially because we have to copy over thefilter_params_with_blacklistandfilter_params_with_arraylogic into our code base. I was wondering why the two configurations are mutually exclusive and I couldn't see a reason why, hence my PR.What do you think?