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

JSUP parser silently accepts invalid input that is a single identifier then EOF #5391

Open
philrz opened this issue Oct 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philrz
Copy link
Contributor

philrz commented Oct 30, 2024

tl;dr

This shows no output, despite the fact that the naked foo is invalid ZSON input.

$ echo 'foo' | super -i jsup -z -c 'yield typeof(this)' -
[no output]

Details

Repro is with super commit 49b1add. I bumped into this while working on the docs updates in #5386.

If I mix the invalid input value among valid ones, I do get the syntax error I would expect.

$ super -version
Version: v1.18.0-71-g49b1addb

$ echo '1 foo 2' | super -i jsup -z -c 'yield typeof(this)' -
stdio:stdin: Super JSON syntax error

When reacting to this in #5386 comments, @mccanne said:

This is a bug in the jsup parser for any input that is a single identifier then EOF. It shouldn't be too hard to fix.

@philrz philrz added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant