Dev mode 500 error messages do not properly escape < and > from generic bounds

Bug #598698 reported by AMcBain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Undecided
Unassigned

Bug Description

If a Play! app in dev mode triggers an Exception (or compile error) with < and > in it (such as from generic bounds), they are not properly escaped, resulting in parts of the error message being interpreted and displayed differently. This seems to be because the 500 tag prints out error messages with .raw(), because the results contain embedded <strong> tags. So the code which adds the <strong> tags needs to ensure that any < and > in the rest of the error string input is escaped.

What is shown on the 500 page:

The file /app/controllers/Application.java could not be compiled. Error raised is : Bound mismatch: The generic method sort(List) of type Collections is not applicable for the arguments (List>). The inferred type Comparable is not a valid substitute for the bounded parameter >

What is printed to the console:

play.exceptions.JavaCompilationException: Bound mismatch: The generic method sort(List<T>) of type Collections is not applicable for the arguments (List<Comparable<Model>>). The inferred type Comparable<Model> is not a valid substitute for the bounded parameter <T extends Comparable<? super T>>

Tags: 500
Changed in play:
status: New → Fix Committed
milestone: none → 1.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.