jboss / mojarra

Fork of Mojarra
10 stars 41 forks source link

ArrayIndexOutOfBoundsException in HtmlResponsewriter (2.3.5.SP) #48

Open mcbros opened 5 years ago

mcbros commented 5 years ago

Placing an EL expression that returns an empty String in a script element (and most certainly anywhere as CDATA) leads to an ArrayIndexOutOfBoundsException with index -2 in jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java line 1499. The case of an empty String is simply uncovered in the method.

fjuma commented 5 years ago

Thanks for creating this issue. Please create a corresponding issue on the upstream issue tracker:

https://github.com/eclipse-ee4j/mojarra/issues

Thanks!

cmunier commented 4 years ago

From my perspective, this is a severe problem that should be handled with high priority.

We are using a component framework where it is common that composite component attributes are used as parameters for encapsulated JavaScript for added functionality. It is a common case that the default value of an optional attribute is empty. So there you now always end up with an Exception. To my mind there is no useful workaround.

aashay5 commented 3 years ago

Hey How to participate in resolving an issue in github