diff --git a/lib/routes/apiv1.js b/lib/routes/apiv1.js index 5c7e0986..c6fe3575 100644 --- a/lib/routes/apiv1.js +++ b/lib/routes/apiv1.js @@ -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; }