jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Gao <david...@gmail.com>
Subject Support for DBCS page names
Date Tue, 04 Mar 2008 07:35:33 GMT
Hi,

It seems JSPWiki 2.6.0 has problem for DBCS (eg. Chinese characters) 
page names. The problem is quite weird.  The page name is changed to 
something else (NOT the expected UTF-8 string) when editing a page with 
DBCS string after login.  Could anyone advise if this is a JSPWiki bug?

To avoid misleading, I would like describe my issue in a defect like 
manner below:
----------------------------------------------------------------------------------------------------------------

Environment:
Tomcat 5.5.26 with URIEncoding=utf-8 enabled using AJP
JSPWiki 2.6.0

JSPWiki Configuration:
* jspwiki.encoding = UTF-8
* jspwiki.breakTitleWithSpaces = true
* Web container authorization via LDAP (Sun One Directory Server)
* Security constraint enabled in web.xml with default setting ( Users 
need to login first before editing or commenting)

Recreation Scenario:
DBCS String used for page name:  测试 (codepoint: U+6D4B U+8BD5, UTF-8 
String: %E6%B5%8B%E8%AF%95) // I'm not sure if you can read Chinese 
characters in this mail)

1. Create & Savie a new page with the above string (U+6D4B U+8BD5) as 
the page name with a valid login
2. Logout JSPWiki after creating the page. Clear cookies.
3. Browse to the page and click on the Edit link. This will direct you 
to the login page
4. Login with a valid user name
5. The page name displayed in main area will change to "Ƶ È" and page 
content becomes blank
6. Choose Cancel. And the page name in URL becomes "%C3%86%C2%B5%C3%88". 
Wiki prompts to create a new page.

------------------
Security Constraint in web.xml
   <security-constraint>
       <web-resource-collection>
           <web-resource-name>Authenticated area</web-resource-name>
           <url-pattern>/Edit.jsp</url-pattern>
           <url-pattern>/Comment.jsp</url-pattern>
           <url-pattern>/Login.jsp</url-pattern>
           <url-pattern>/NewGroup.jsp</url-pattern>
           <url-pattern>/Rename.jsp</url-pattern>
           <url-pattern>/Upload.jsp</url-pattern>
           <http-method>DELETE</http-method>
           <http-method>GET</http-method>
           <http-method>HEAD</http-method>
           <http-method>POST</http-method>
           <http-method>PUT</http-method>
       </web-resource-collection>

       <web-resource-collection>
           <web-resource-name>Read-only Area</web-resource-name>
           <url-pattern>/attach</url-pattern>
           <http-method>DELETE</http-method>
           <http-method>POST</http-method>
           <http-method>PUT</http-method>
       </web-resource-collection>

       <auth-constraint>
           <role-name>tomcat-admin</role-name>
           <role-name>LGE-SH</role-name>

       </auth-constraint>
      <!--
       <user-data-constraint>
           <transport-guarantee>CONFIDENTIAL</transport-guarantee>
       </user-data-constraint>
       -->
   </security-constraint>

   <login-config>
       <auth-method>FORM</auth-method>
       <form-login-config>
           <form-login-page>/LoginForm.jsp</form-login-page>
           <form-error-page>/LoginForm.jsp</form-error-page>
       </form-login-config>
   </login-config>

   <security-role>
       <description>
           This logical role includes all authenticated users
       </description>
       <role-name>LGE-SH</role-name>
   </security-role>

   <security-role>
       <description>
           This logical role includes all administrative users
       </description>
       <role-name>tomcat-admin</role-name>
   </security-role>

-- 
David Gao (davidgjm@gmail.com)


Mime
View raw message