Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-17829

[GSS](7.2.z) WFLY-12705 - File upload fails with IllegalStateException when PicketLink SSO is enabled.

    XMLWordPrintable

Details

    • Hide
      • Unzip a fresh installation of JBoss EAP 7.2.4
      • Copy the attached files from JBEAP-17829_reproducer.zip into $JBOSS_HOME/standalone/
      • Start JBoss
      • Open private window of the browser and open link: http://localhost:8080
      • Login in the application using user: jboss and pass: jboss@123
      • Click on "Upload" link.
      • Click on "Upload" button.
      • Below exception occurs.
      java.lang.IllegalStateException: UT000017: Form value is a file, use getFileItem() instead
      	at io.undertow.server.handlers.form.FormData$FormValueImpl.getValue(FormData.java:304)
      	at org.picketlink.identity.federation.bindings.wildfly.sp.SPFormAuthenticationRequestWrapper.getParameter(SPFormAuthenticationRequestWrapper.java:99)
      	...
      ...
      
      Show
      Unzip a fresh installation of JBoss EAP 7.2.4 Copy the attached files from JBEAP-17829 _reproducer.zip into $JBOSS_HOME/standalone/ Start JBoss Open private window of the browser and open link: http://localhost:8080 Login in the application using user: jboss and pass: jboss@123 Click on "Upload" link. Click on "Upload" button. Below exception occurs. java.lang.IllegalStateException: UT000017: Form value is a file, use getFileItem() instead at io.undertow.server.handlers.form.FormData$FormValueImpl.getValue(FormData.java:304) at org.picketlink.identity.federation.bindings.wildfly.sp.SPFormAuthenticationRequestWrapper.getParameter(SPFormAuthenticationRequestWrapper.java:99) ... ...
    • +

    Description

      File Upload is throwing an exception when JBoss 7.2 is configured with SSO enabled(Picketlink).
      For every request param we are calling String getParameter(String name) in https://access.redhat.com/webassets/avalon/d/red-hat-jboss-enterprise-application-platform/7.2.beta/javadocs/javax/servlet/ServletRequest.html#getParameter-java.lang.String-this
      which is wrapped by https://access.redhat.com/webassets/avalon/d/red-hat-jboss-enterprise-application-platform/7.2.beta/javadocs/org/picketlink/identity/federation/bindings/wildfly/sp/SPFormAuthenticationRequestWrapper.html
      and as a result throws the following error when we call getParameter(filename)

      java.lang.IllegalStateException: UT000017: Form value is a file, use getFileItem() instead
              at io.undertow.server.handlers.form.FormData$FormValueImpl.getValue(FormData.java:304) ~[undertow-core-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at org.picketlink.identity.federation.bindings.wildfly.sp.SPFormAuthenticationRequestWrapper.getParameter(SPFormAuthenticationRequestWrapper.java:73) ~[picketlink-wildfly8-2.5.5.SP12-redhat-00005.jar!/:2.5.5.SP12-redhat-00005]
              ...
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:706) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
      

      This error does not occur on JBoss 7.1.0 but breaks on JBoss 7.1.2 may have been introduced by https://issues.jboss.org/browse/JBEAP-10449

      Attachments

        1. JBEAP-17829_reproducer.zip
          170 kB
        2. JBEAP-17829.patch
          1 kB
        3. src.zip
          5 kB

        Issue Links

          Activity

            People

              rhn-support-ivassile Ilia Vassilev
              rhn-support-dguthrie David Guthrie
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: