Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-853

WikiEngine#createContext(Request, String) parses wrong page name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.10.1
    • Fix Version/s: None
    • Component/s: Core & storage
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              astriffler Albrecht Striffler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: