Skip to content

Fix for crash when key contains ~#108

Open
zackcam wants to merge 1 commit into
valkey-io:unstablefrom
zackcam:JSON-del
Open

Fix for crash when key contains ~#108
zackcam wants to merge 1 commit into
valkey-io:unstablefrom
zackcam:JSON-del

Conversation

@zackcam
Copy link
Copy Markdown
Contributor

@zackcam zackcam commented Jun 5, 2026

Fix for issue: #104

Follow RFC 6901 where we set ~ as ~0 to distinguish a regular ~ compared to a ~ created from parsing a /. This fix will set ~ as ~0 for parsing. This will prevent crashes where we originally saw a ~ and expected it to be the start of parsing for a /. We have the order of tilde first so we don't double replace in the loop.

Tests: To make sure this doesnt get changed in the future we have the two scenarios listed in the issues as unit tests now. Without this change the tests would crash causing failures.

Signed-off-by: zackcam <zackcam@amazon.com>
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.

1 participant