Description
If an origin https://*.example.com
is allowed and a client sends a request with a header Origin: https://github.com,https://test.example.com
the wildcard match is performed against the comma separated origin header value and succeeds.
This leads to an unexpected and according to the specification invalid response header Access-Control-Allow-Origin: https://github.com,https://test.example.com
. Also it was never intended that https://github.com
should be allowed.
As far as I know current Browser implementations never send comma separated values in origin headers (and never multiple headers) and I'm not even sure if the specification would allow this. However, I think it would make sense to validate the origin header's format and reject requests with an unexpected format (not sure on how to do this backward compatible?).
Activity