fix(490): Add question mark to escaped chars in TokenEscaper#519
Open
shchepinova wants to merge 2 commits intoredis:mainfrom
Open
fix(490): Add question mark to escaped chars in TokenEscaper#519shchepinova wants to merge 2 commits intoredis:mainfrom
shchepinova wants to merge 2 commits intoredis:mainfrom
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
vishal-bala
requested changes
Mar 2, 2026
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.
This PR adds question mark
?to the escape characters inTokenEscaper.The "Expand TokenEscaper to escape ? and | characters" issue also mentions adding the pipe character
|, but this will causeTestMultiPrefixTextQuery.test_text_query_returns_both_prefixes, which uses the pipe character as a logical OR in its text search, to fail.Note
Low Risk
Low risk: small change to query-escaping behavior plus test updates; main impact is that literal
?will now be escaped unless wildcards are being preserved.Overview
TokenEscapernow treats?as a character that must be escaped in RediSearch query strings, and updates the referenced Redis docs link.Unit tests are updated to assert
?is escaped in both general text and tag-like inputs, replacing prior TODO/expected-failure cases.Written by Cursor Bugbot for commit fa0316f. This will update automatically on new commits. Configure here.