Issue Details (XML | Word | Printable)

Key: APF-880
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Matt Raible
Reporter: spotlight2001
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

messages.jsp - cross site scripting

Created: 12/Sep/07 03:41 AM   Updated: 17/Sep/08 09:51 PM   Resolved: 13/Sep/07 05:35 PM
Component/s: Web - JSF, Web - Spring, Web - Tapestry
Affects Version/s: 2.0-RC1
Fix Version/s: 2.0 Final

Environment: winxp, jetty, postgres, IE


 Description  « Hide
I use addError(...) to reflect messages to user - including user input

if user input is something like <script>alert('hi');</script> - JS is being executed.

old:
<c:out value="${msg}" escapeXml="false"/>

I suggest:
<c:out value="${msg}" escapeXml="true"/>

same goes with errors. -> ${error}

Sort Order: Ascending order - Click to sort in descending order
Matt Raible added a comment - 13/Sep/07 04:36 PM
It's unfortunate to have to change this because we use HTML to make certain parts of messages more apparent:

User information for <strong>{0}</strong> has been added successfully.

Oh well, XSS is more important I suppose.