Access-Control-Allow-Origin header returns wrong value using SockJS [SPR-16304] #20851
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Richard Janík opened SPR-16304 and commented
Example of websocket configuration using SockJS
When we set allowed origin to https://example.com and we make call to server let's say /ws/info/ with header (I will exclude others just to show example)
the server returns correctly Http status response 403 - forbidden.
But it returns also
The issue is that incorrect origin was sent and it returns as allowed.
I've found that
returns wildcard every time.
The check is done in OriginHandshakeInterceptor.java but the headers are created in
DefaultCorsProcessor.java - at line 121 -
(I assume this is occurring also on newer versions because I didn't find any problems regarding this topic)
Affects: 4.3.9
Backported to: 4.3.14
The text was updated successfully, but these errors were encountered: