Confluence encoding test goes wrong from submission stage due to a Kerberos or custom authenticator
The content on this page relates to platforms which are not supported for Confluence. Consequently, Atlassian can not guarantee providing any support for the steps described on this page. Please be aware that this material is provided for your information only and that you use it at your own risk.
Symptoms
The encoding test shows that the string passed for database round-trip is wrong and the string is modified after submission.
Cause
- Confluence is configured to use Kerberos Authenticator in
<installation-directory>/Confluence/WEB-INF/classes/seraph-config.xml
- Confluence is configured to use a Custom Authenticator in
<installation-directory>/Confluence/WEB-INF/classes/seraph-config.xml
. A filter mapping has been added to web.xml above the 'encoding' filters.
Resolution #1
Add the following mapping filter in
<installation dir>/confluence/WEB-INF/web.xml:
<filter-mapping> <filter-name>login</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
More details about this configuration explained here
After editing the web.xml
file, you will need to restart Confluence for your change to take effect.
Resolution #2
Ensure that no filters exist in
<installation dir>/confluence/WEB-INF/web.xml above the 'encoding' filters (as shown below):
<!-- THIS MUST REMAIN AS THE TOP FILTER SO THAT THE ENCODING CAN BE SET BEFORE ANYTHING ELSE TOUCHES IT (well, except the header sanitiser)--> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>*.vm</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/display/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/download/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/plugins/servlet/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/label/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/s/*</url-pattern> </filter-mapping> <<--New filters should be added here
After editing the web.xml
file, you will need to restart Confluence for your change to take effect.