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

[Bug] Apollo server v2 restarts when receives invalid multipart-request operation #1509

Closed
ghost opened this issue Aug 9, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Aug 9, 2018

I was testing my api with postman and found that if incorrect multipart request operation is executed the server just restarts.

Here's the example of request that I send to the server.

operations:{"query":"query ($file:Upload){me(file: $file) { _id }}", "variables" : }
map:{"0": ["variables.file"] }

Notice that I'm passing file variable of type Upload to a me query (where it should not be), as a result I get an error SyntaxError: Unexpected token } in JSON... And the app exits with code 1
I don't think that it's a desirable behaviour in such situation

@ghost ghost changed the title Apollo server v2 restarts when receives invalid multipart-request operation [Bug] Apollo server v2 restarts when receives invalid multipart-request operation Aug 9, 2018
@jaydenseric
Copy link

This is because Apollo Server uses a fork of apollo-upload-server (recently renamed graphql-upload) at an outdated version; v5. This issue, and many others has been fixed in the following several major releases (currently v8): https://github.com/jaydenseric/graphql-upload/blob/master/changelog.md

@edevil
Copy link

edevil commented Oct 24, 2018

As I said in #1703, shouldn't these security issues be reported so that people are aware when they install this package? If the apollo team intends to wait for the node 6 LTS period to end, apollo users are stuck with an insecure version of the upload server (unless the fixes are backported) for a long time to come.

@abernix
Copy link
Member

abernix commented Dec 5, 2018

This should be fixed by #2054. As I've requested in that PR, I'd really appreciate anyone who is utilizing file uploads to try upgrading to the alpha which updates graphql-upload to v8. I've detailed the progress on this matter extensively in #2054, but the high-bit is that this should be ready to tried now in apollo-server@2.3.0-alpha.0. Please any problems (or successes!) you encounter with the upgrade, as the feedback will guide its final release.

Ref: #2054 (comment)

@abernix abernix closed this as completed Dec 5, 2018
@abernix
Copy link
Member

abernix commented Dec 13, 2018

The alpha releases didn't identify any problems so I've graduated this to the official apollo-server-*@2.3.0 releases.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants