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

Remove panic in Parser::next #44

Merged
merged 1 commit into from Apr 30, 2017

Conversation

Mrmaxmeier
Copy link
Contributor

Hey,
I noticed this panic while passing invalid GraphQL queries to juniper.
I've moved it to the ParseError::UnexpectedEndOfFile error instead of panicking.

@mhallin
Copy link
Member

mhallin commented Apr 30, 2017

Neat! This was a case I thought was unreachable :) Do you have an example of a query that panics the current implementation?

@Mrmaxmeier
Copy link
Contributor Author

The queries I tried were "mutation" and "query".
I've just created a fuzz target for cargo-fuzz and found some other interesting ones:

  • ""
  • "\t"
  • "{..."
  • "))))"
  • "$ \""

@mhallin
Copy link
Member

mhallin commented Apr 30, 2017

Nice finds, thanks a lot.

@mhallin mhallin merged commit 032b03a into graphql-rust:master Apr 30, 2017
@Mrmaxmeier Mrmaxmeier deleted the remove-parser-panic branch April 30, 2017 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants