Skip to content

Commit

Permalink
Merge pull request joeferner#298 from sseide/quote_redis_pattern
Browse files Browse the repository at this point in the history
quote all special redis pattern characters according to documentation…
  • Loading branch information
joeferner committed Oct 19, 2018
2 parents db5f61f + f446a43 commit e4bb681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/apiv1.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ function getKeysTree (req, res, next) {
console.log(sf('loading keys by prefix "{0}"', prefix));
let search;
if (prefix) {
search = prefix.replace('*', '\\*') + foldingCharacter + '*';
search = prefix.replace(/[\*\[\]\?]/, '\\$&') + foldingCharacter + '*';
} else {
search = rootPattern;
}
Expand Down

0 comments on commit e4bb681

Please sign in to comment.