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

[GSS](7.2.z) PLINK-792 - Need to set default encoding for FormParserFactory in SPFormAuthenticationMechanism

    XMLWordPrintable

Details

    Description

      The default-encoding is not set for formParserFactory object*1*2 in SPFormAuthenticationMechanism.

      org.picketlink.identity.federation.bindings.wildfly.sp.SPFormAuthenticationMechanism
          public SPFormAuthenticationMechanism(FormParserFactory parserFactory, String name, String loginPage, String errorPage, ServletContext servletContext, PicketLinkType configuration, PicketLinkAuditHelper auditHelper) {
              super(parserFactory, name, loginPage, errorPage);
              this.servletContext = servletContext;
              this.configuration = configuration;
              this.spConfiguration = (SPType) configuration.getIdpOrSP();
              this.auditHelper = auditHelper;
              // we need to create a new formParserFactory to be able to process Multi-Part messages
              this.formParserFactory = FormParserFactory.builder(true).build();                            <- *1
              startPicketLink();
          }
      
      io.undertow.server.handlers.form.FormParserFactory
          public static Builder builder(boolean includeDefault) {
              Builder builder = new Builder();
              if (includeDefault) {
                  builder.addParsers(new FormEncodedDataDefinition(), new MultiPartParserDefinition());    <- *2
              }
              return builder;
          }
      
          public static class Builder {
      
              ...
      
              public FormParserFactory build() {
                  if(defaultCharset != null) {
                      for (ParserDefinition parser : parsers) {
                          parser.setDefaultEncoding(defaultCharset);
                      }
                  }
                  return new FormParserFactory(parsers);
              }
      
          }
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tmiyargi Teresa Miyar Gil (Inactive)
              rhn-support-enagai Eiichi Nagai (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: