Jasig CAS Client for Java
  1. Jasig CAS Client for Java
  2. CASC-122

CasSingleSignOutFilter affects character encoding when integrated with Confluence

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.11
    • Fix Version/s: 3.2.0
    • Component/s: Java
    • Labels:
      None
    • Environment:
      Confluence 3.2 std build 1810, encoding set to UTF-8.
      Linux 2.6.26-2-686, Apache Tomcat/6.0.14, Sun Microsystems Java 1.6.0_18, JVM implementaion 16.0-b13.
      Locale set to en_US.UTF-8.

      Description

      Download the java-client source code from tag 3.1.1 using SVN and built the cas-client-core-3.1.1.jar and cas-client-integration-atlassian-3.1.1.jar.

      Configure Confluence according to instructions here - https://wiki.jasig.org/display/CASC/Configuring+Confluence+with+JASIG+CAS+Client+for+Java+3.1

      Open Confluence and navigate to character encoding test page at relative URL /admin/encodingtest.action and copy-paste the text "Iñtërnâtiônàlizætiøn" as instructed and press Submit. The resulting page shows that the expected and actual strings do not match.

      Now reconfigure Confluence by commenting out the filter mapping for CasSingleSignOutFilter. Navigate to the same character encoding test page and proceed as before. The resulting page shows that now the expected and actual strings match.

        Issue Links

          Activity

          Hide
          Andrus Suitsu added a comment -

          The VT filter helped me too.

          Show
          Andrus Suitsu added a comment - The VT filter helped me too.
          Hide
          Benjamin SECLIER added a comment -

          The VT filter worked for me too (thanks).

          But I don't understand why this issue is Resolved...
          I tried with CAS client 3.2.0 and 3.2.1, the problem still appears.

          Show
          Benjamin SECLIER added a comment - The VT filter worked for me too (thanks). But I don't understand why this issue is Resolved... I tried with CAS client 3.2.0 and 3.2.1, the problem still appears.
          Hide
          Kevin Merigot added a comment - - edited

          The VT filter worked for me too.

          However, indeed this issue is NOT resolved as the problem still exists and there is no documentation at all except this ticket, which is not really easy to find.

          If someone found out this issue and do not know how to manage VT filter, here is the explanation for both Confluence and Jira, I guess it should work for other Java/Spring based eb application with the same issue :

          • Download the last version (2.0.2 today) of vt servlet filters here : http://code.google.com/p/vt-middleware/downloads/list
          • extract the file on your server, copy jars/vt-servlet-filters-xxx.jar (with xxx = 2.0.2 for me) in CONFLUENCE_HOME/WEB-INF/lib (or JIRA_HOME/WEB-INF/lib for Jira)
          • modify [CONFLUENCE_HOME|JIRA_HOM]/WEB-INF/web.xml already CASified as well :
            • BEFORE all CAS filters, and especially before CasSingleSignOutFilter filter, add :
              <filter>
                <filter-name>CharacterEncodingFilter</filter-name>
                <filter-class>edu.vt.middleware.servlet.filter.CharacterEncodingFilter</filter-class>
                <init-param>
                  <param-name>requestCharsetName</param-name>
                  <param-value>UTF-8</param-value>
                </init-param>
                <init-param>
                  <param-name>responseCharsetName</param-name>
                  <param-value>UTF-8</param-value>
                </init-param>
              </filter>
              
            • BEFORE all filter-mapping CAS parameters, and especially before "CasSingleSignOutFilter" filter-mapping, add the following :
              <filter-mapping>
              <filter-name>CharacterEncodingFilter</filter-name>
              <url-pattern>/*</url-pattern>
              </filter-mapping>
              
          • Restart Confluence (or Jira). It should work.

          However, writing down this procedure in a Jira ticket CANNOT be considered as a "resolution" IMHO.

          Show
          Kevin Merigot added a comment - - edited The VT filter worked for me too. However, indeed this issue is NOT resolved as the problem still exists and there is no documentation at all except this ticket, which is not really easy to find. If someone found out this issue and do not know how to manage VT filter, here is the explanation for both Confluence and Jira, I guess it should work for other Java/Spring based eb application with the same issue : Download the last version (2.0.2 today) of vt servlet filters here : http://code.google.com/p/vt-middleware/downloads/list extract the file on your server, copy jars/vt-servlet-filters-xxx.jar (with xxx = 2.0.2 for me) in CONFLUENCE_HOME/WEB-INF/lib (or JIRA_HOME/WEB-INF/lib for Jira) modify [CONFLUENCE_HOME|JIRA_HOM] /WEB-INF/web.xml already CASified as well : BEFORE all CAS filters, and especially before CasSingleSignOutFilter filter, add : <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>edu.vt.middleware.servlet.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>requestCharsetName</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>responseCharsetName</param-name> <param-value>UTF-8</param-value> </init-param> </filter> BEFORE all filter-mapping CAS parameters, and especially before "CasSingleSignOutFilter" filter-mapping, add the following : <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Restart Confluence (or Jira). It should work. However, writing down this procedure in a Jira ticket CANNOT be considered as a "resolution" IMHO.
          Hide
          Scott Battaglia added a comment -

          If you feel the documentation is not complete enough, please take a moment to update the documentation. We're all volunteers here and greatly appreciate when people can assist us with that. You seem to have documented it well enough in your comment, so please feel free to add it to the wiki node!

          Thanks!
          Scott

          Show
          Scott Battaglia added a comment - If you feel the documentation is not complete enough, please take a moment to update the documentation. We're all volunteers here and greatly appreciate when people can assist us with that. You seem to have documented it well enough in your comment, so please feel free to add it to the wiki node! Thanks! Scott
          Hide
          Kevin Merigot added a comment -

          Quickly added and adapted to the wiki node : https://wiki.jasig.org/display/CASC/Configuring+Confluence+with+JASIG+CAS+Client+for+Java+3.1

          I also made a link on the Jira config page, dunno if it fits your best practices.

          Hope it helps.

          Show
          Kevin Merigot added a comment - Quickly added and adapted to the wiki node : https://wiki.jasig.org/display/CASC/Configuring+Confluence+with+JASIG+CAS+Client+for+Java+3.1 I also made a link on the Jira config page, dunno if it fits your best practices. Hope it helps.

            People

            • Assignee:
              Scott Battaglia
              Reporter:
              Andrus Suitsu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: