antlr / antlr4-lab

A client/server for trying out and learning about ANTLR
MIT License
36 stars 11 forks source link

"BAD JSON RESPONSE" #32

Closed kaby76 closed 1 year ago

kaby76 commented 1 year ago

For several grammars, I'm getting "BAD JSON RESPONSE" after trying to run the parser. It looks like this is because the grammar contains actions in some target language.

parrt commented 1 year ago

Yes I've run into some weird problems. I think that the strings are encoded properly for JSON, but apparently not. I keep a log of everything so I can look into this.

I doubt I can support arbitrary code execution on the server; too much of a risk... Would be trivial to bring the server down buy some bad actor. Probably we should simply detect actions and say something about it

kaby76 commented 1 year ago

This was just logged in StackOverflow today. https://stackoverflow.com/q/74102851/4779853

parrt commented 1 year ago

Just fixed. Was a JSON issue with parse tree. Forgot you created issue. I made dup by mistake but fixed: https://github.com/antlr/antlr4-lab/issues/46