Skip to content

Commit

Permalink
fixed possible reflected XSS when fetching avatar images from a malic…
Browse files Browse the repository at this point in the history
…ious URL
  • Loading branch information
albogdano committed Aug 19, 2021
1 parent c2a0539 commit 1f71ee2
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -151,6 +151,9 @@ public String bulkEdit(@RequestParam(required = false) String[] selectedUsers,
@GetMapping("/avatar")
public void avatar(@RequestParam(required = false) String url,
HttpServletRequest req, HttpServletResponse res, Model model) {
// prevents reflected XSS. see https://brutelogic.com.br/poc.svg
// for some reason the CSP header is not sent on these responses by the ScooldInterceptor
utils.setSecurityHeaders(utils.getCSPNonce(), req, res);
HttpUtils.getAvatar(url, req, res);
}
}

0 comments on commit 1f71ee2

Please sign in to comment.