-
Couldn't load subscription status.
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Lukas Krecan opened SPR-12984 and commented
If DispetcherServlet throwExceptionIfNoHandlerFound is set to true, NoHandlerFoundException is thrown. Unfortunately its message contains headers and thus cookies, which may be a security risk.
In our scenario we serialize the exception to JSON which is returned to the user. Malicious script (for example injected by XSS) can call nonexisting resource and it will get sensitive cookies in the error message.
We have fixed it by overriding noHandlerFound and by throwing custom exception but I am afraid that other users may get to similar situation.
Affects: 4.1.6
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement