jaystack / odata-v4-mongodb

This server component lets you process OData requests over a MongoDB database
30 stars 24 forks source link

Regex special characters are not escaped #13

Closed MathieuCouette closed 4 years ago

MathieuCouette commented 4 years ago

The second argument of a contains, endswith or startswith method call should be regex escaped before being used to create a regex. Otherwise, the method call contains(A, '.') results in the regex /./gi, which matches any one character instead of just ..

WandererInVoids commented 4 years ago

i create package with fix, @MathieuCouette I used urs fix https://github.com/WandererInVoids/odata-v4-mongodb https://www.npmjs.com/package/@wandererin/odata-v4-mongodb