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

Security risk in xhr.status if response is spoofed #621

Closed
1 of 2 tasks
christopher-kiss opened this issue Aug 23, 2019 · 0 comments · Fixed by #622
Closed
1 of 2 tasks

Security risk in xhr.status if response is spoofed #621

christopher-kiss opened this issue Aug 23, 2019 · 0 comments · Fixed by #622

Comments

@christopher-kiss
Copy link
Contributor

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

If status is not 200 or 1223, the status is passed straight into the error handler which is then propagated out to socket 'connect_error' handlers provided by developers.

Steps to reproduce (if the current behaviour is a bug)

Use XHR polling transport type
Intercept the http request and spoof the response for status to an invalid value.

Expected behaviour

Error handler should always return a valid status code which is of type number.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/status

Setup

  • OS: any
  • browser: any
  • engine.io version: 2.1.1

Other information (e.g. stacktraces, related issues, suggestions how to fix)

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 a pull request may close this issue.

1 participant