You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@struts.apache.org by "lukaszlenart (via GitHub)" <gi...@apache.org> on 2026/04/08 09:18:03 UTC

Re: [PR] fix(core): WW-5623 HTML-encode form action in PostbackResult to prevent XSS [struts]

lukaszlenart commented on PR #1653:
URL: https://github.com/apache/struts/pull/1653#issuecomment-4205171361

   Please add a focused unit test for this change in `PostbackResultTest`, covering a malicious `finalLocation` with characters like `"`, `&`, `<`, and `>` and asserting they are properly escaped in the rendered `action` attribute. The fix looks correct for WW-5623, but it should include regression coverage. Also, for consistency with the rest of Struts core, you may want to use `StringEscapeUtils.escapeHtml4(...)` instead of a custom `encodeHtml()` helper.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org