Skip to content

Commit

Permalink
Change RSQL custom operator regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizcko committed Feb 1, 2023
1 parent 4cbc3b8 commit 4ccd2e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rsql-mongodb",
"version": "1.5.3",
"version": "2.0.0",
"description": "Converting RSQL queries to MongoDB queries",
"main": "rsql-mongodb.js",
"typings": "rsql-mongodb.ts",
Expand Down
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ describe('rsql-mongodb', function () {
});
it("Test errors", function () {
expect(function () { rsqlMongoDB('azerty') }).to.throw('Wrong RSQL query. No operator found.');
expect(function () { rsqlMongoDB('lastName=~do*') }).to.throw('Wrong RSQL query. No operator found.');
expect(function () { rsqlMongoDB("name=='SELECT (CHaR(75)||CHaR(76)||CHaR(77))'") }).to.throw('Wrong RSQL query. No operator found.');
expect(function () { rsqlMongoDB('firstName=={ $where: [ { lastName : "doe" } ] }') }).to.throw('Injection detected.');
expect(function () { rsqlMongoDB('birthday==1959-21-12') }).to.throw('Invalid Date.');
Expand Down

0 comments on commit 4ccd2e7

Please sign in to comment.