fetch icon indicating copy to clipboard operation
fetch copied to clipboard

CORB: 3xx redirects, 304, 401, and 407 responses

Open annevk opened this issue 7 years ago • 6 comments

Should we apply the CORB check to these responses as well?

Currently we only do it for the final response, but if that's not good enough for From-Origin, is it good enough for CORB in general? A test for this would be somewhat involved, but you could imagine:

HTTP/1.1 302 HEY
Location: elsewhere
Content-Type: text/html
X-Content-Type-Options: nosniff

annevk avatar May 22 '18 11:05 annevk

cc @anforowicz @mikewest @jakearchibald

annevk avatar May 22 '18 11:05 annevk

I would not be sad if we blocked redirect responses based on their MIME types. That said, I think we'd need to gather some data to determine how web-compatible it would be to tighten things here. I can imagine that servers accidentally rely on this kind of thing being ignored in the presence of Location headers.

mikewest avatar May 22 '18 11:05 mikewest

If we're following redirects within fetch, that seems fine from a CORB point of view, since the body isn't going back to the content process.

jakearchibald avatar May 22 '18 13:05 jakearchibald

cc @csreis

anforowicz avatar May 22 '18 15:05 anforowicz

Whether we do this or not, we should add a test to ensure implementations are consistent.

annevk avatar May 22 '18 17:05 annevk

I think I agree that we shouldn't inspect redirects. But in light of #1132 401 and 407 might be important as with the changes discussed there they could reach attacker-controlled processes.

annevk avatar May 17 '22 12:05 annevk