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

OAuth2 redirection flows are intercepted and continued with wrong content type #170

Closed
almereyda opened this issue Jul 15, 2020 · 3 comments

Comments

@almereyda
Copy link

While the plugin continues to work here, in opposition to the observation from #168, and successfully takes over Firefox' native JSON rendering, it appears it also interferes with some OAuth2 redirection flows and does not allow them to complete sufficiently.

During the callback dance, some requests respond with JSON, and redirect to HTML pages afterwards. Unfortunately, Firefox will try to interpret those as JSON, when the plugin is left active.

This happened during local development and a dance between http://localhost:3000 and an OAuth2 provider on https.

@jonwolski
Copy link

jonwolski commented Aug 28, 2020

I scripted a tiny http server to demonstrate the problem:

https://gist.github.com/jonwolski/27f6b974474051b8ccd3440ff68dba54

It seems to arise when there is a content-type on a redirect response. The subsequent response gets interpreted with the redirect response's content-type.

It doesn't even have to be OAuth2, but that is where I see this the most, though. My company's IdP server sends content-type: application/json on the HTTP/2 302 redirect responses.

UPDATE:

I should mention that I experience this in 2.1.0. From reading the code, it looks like #172 would fix this. I cannot tell if that has been released, and if so, what the release version is.

In fact, I'm pretty confident this is a duplicate of #172 (though this one came first :-) ). Also, the repro case on #173 is much simpler than mine. kudos, to @tlaundal

@bhollis
Copy link
Owner

bhollis commented Aug 29, 2020

Yup I just haven't gotten around to releasing a new version

@bhollis
Copy link
Owner

bhollis commented Sep 5, 2020

Published a new version. It's out for Firefox, still in review for Chrome

@bhollis bhollis closed this as completed Sep 5, 2020
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

3 participants