-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the intial implementation of $beginsWith, the range calculation for json indexes mistakenly appends an integer with the size of 8 bits which gets maxed out at FF, rather than building a binary with an extra 3 bytes at the end. This commit fixes the `mango_idx_view:range/5` by correctly appending the `U+FFFF` code point to create a utf-8 encoded binary. Additionally, the Erlang `utf8` binary type ensures the result is a valid utf8 string. If `Arg` is not a utf8 binary, this will throw a badarg error. We expect `Arg` strings to be a valid utf8 but, to be safe, `mango_selector:norm_ops/1` is enhanced to verify that any argument to `$beginsWith` is a utf8 string.
- Loading branch information
1 parent
e9d703c
commit cc4fa13
Showing
3 changed files
with
23 additions
and
9 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