diff --git a/lib/MongoLite/Database.php b/lib/MongoLite/Database.php index 968b4484e..2ee88bebc 100644 --- a/lib/MongoLite/Database.php +++ b/lib/MongoLite/Database.php @@ -290,6 +290,10 @@ public static function buildCondition($criteria, $concat = ' && ') { $d = '$document'; + if (\strpos($key, '(') !== false) { + throw new \InvalidArgumentException('Unallowed characters used in filter keys'); + } + if (\strpos($key, '.') !== false) { $keys = \explode('.', $key);