You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Juan Pablo Santos Rodríguez (Jira)" <ji...@apache.org> on 2021/11/15 13:45:00 UTC

[jira] [Closed] (JSPWIKI-853) WikiEngine#createContext(Request, String) parses wrong page name

     [ https://issues.apache.org/jira/browse/JSPWIKI-853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan Pablo Santos Rodríguez closed JSPWIKI-853.
-----------------------------------------------

> WikiEngine#createContext(Request, String) parses wrong page name
> ----------------------------------------------------------------
>
>                 Key: JSPWIKI-853
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-853
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core &amp; storage
>    Affects Versions: 2.10.1
>            Reporter: Albrecht Striffler
>            Priority: Major
>
> We are using JSPWiki at an API level. Currently, we are transitioning from using JSPWiki 2.8.2 to using 2.10.1 (the changed package names held us back for a while). Since then, we have a problem with the method 
> createContext(HttpServletRequest request, String requestContext) 
> in the WikiEngine. While parsing the page name from the Request, the url encoded page name is given to the util method MarkupParser.wikifyLink(String) in the class CommandResolver line 302. There, non-word and non-digit characters are removed. Since the page name is still encoded, it can contain for example %20 for white spaces, which is then reduced to 20, which obviously breaks stuff.
> Example: A page name like "My Page" will be become "My20Page".
> I think a fix should be very easy, just url-decode the string before cleaning it. Somewhere in class CommandResolver line 440.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)