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

Network Errors reveal internal ip #95

Closed
jhagel opened this issue Mar 13, 2020 · 2 comments
Closed

Network Errors reveal internal ip #95

jhagel opened this issue Mar 13, 2020 · 2 comments

Comments

@jhagel
Copy link

jhagel commented Mar 13, 2020

It appears as though http errors are being passed back to the browser. This is a potential security issue, revealing internal IPs or potentially other information.

example:

{
  "data": null,
  "errors": [{
    "Op": "Post",
    "URL": "http://consumer.staging:8080/graphql",
    "Err": {
      "Op": "dial",
      "Net": "tcp",
      "Source": null,
      "Addr": {
        "IP": "10.0.0.62",
        "Port": 8080,
        "Zone": ""
      },
      "Err": {
        "Syscall": "connect",
        "Err": 111
      }
    }
  }]
}

I could think of a couple of ways to solve this problem.

  1. Customize the error message to reduce the information provided
  2. Allow errors to be passed through middleware so the response can be modified
@AlecAivazis
Copy link
Member

Hey @jhagel - thanks for reporting this.

I don't think the actual structure of the error payload is coming from the gateway. That does not look like a standard graphql error. That being said, your request for a way to format the error before it is sent to the user does make sense. Do you have an idea for what that middleware could look like?

@AlecAivazis
Copy link
Member

I'm going to close this since it has gone a bit stale

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

No branches or pull requests

2 participants