chkal/pf-issue-test — Issue #86: Uncaught IllegalArgumentException from URLDecoder
Author: chkal
Created: 2012-03-06 07:31:27+00:00
State: open

Originally filed by **jonphoff...@gmail.com** on 2011-02-02T17:03:19

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=88

Any valid jsf invoked through mapping or directly with bad query/param values can provoke an unhandled exception.

Examples:

http://localhost:8080/testapp/jontest.jsf?foo=%=
http://localhost:8080/testapp/jontest?foo=%=

Throws:

java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
java.net.URLDecoder.decode(URLDecoder.java:168)
com.ocpsoft.pretty.faces.url.QueryString.addParameters(QueryString.java:245)
com.ocpsoft.pretty.faces.url.QueryString.build(QueryString.java:71)
com.ocpsoft.pretty.PrettyContext.(PrettyContext.java:91)
com.ocpsoft.pretty.PrettyContext.newDetachedInstance(PrettyContext.java:174)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:69)

Expect this to be caught.

Seen on:
prettyfaces-jsf2-3.2.0.jar
apache-tomcat-6.0.29
jsf-api-2.0.4-b09.jar
jsf-impl-2.0.4-b09.jar