Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON parser is too permissive #6943

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

JSON parser is too permissive #6943

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2020-08-05 16:22:50 +0200
From: @kutsurak
To: SQL devs <>
Version: 11.37.11 (Jun2020-SP1)

Last updated: 2020-10-19 11:06:21 +0200

Comment 27971

Date: 2020-08-05 16:22:50 +0200
From: @kutsurak

The JSON parser accepts the following while it should not:

select json.isvalid('{"str":"str":"str":"str"}'); -- true
select json.isvalid('"str":"str"'); -- true

etc

The problem is that the recursive descent parser accepts the token ':' after the end of any string.

Comment 27978

Date: 2020-08-13 16:06:58 +0200
From: @kutsurak

Test: https://dev.monetdb.org/hg/MonetDB/rev/36c85bacfd35
Fix: https://dev.monetdb.org/hg/MonetDB/rev/d2a1dd68289a

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants