Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid use of regexps for parsing parameter keys
This avoids a RegexpError when trying to parse long key input. It also avoids an invalid InvalidParameterError when trying to parse non-UTF8 keys, which was only raised previously because regexps were used without marking them as ASCII-8BIT. Flip the depth parameter to QueryParser#normalize_params to be the current parsing depth, instead of a downward counter from the maximum depth. Fix a bunch of questionable behavior in parameter parsing when using [ and ] outside cases that are expected. Treat [ and ] as normal characters if the occur outside expected usage. This leaves one questionable parameter parsing behavior that also existed previously, which is that: a[b]c is parsed the same as a[b][c]. Fixes #1704.
- Loading branch information
1 parent
0f8bb0f
commit c1e5fbb
Showing
4 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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