Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-2461

wrong URL encoding of non-ASCII chars when redirected to space homepage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 1.4
    • 1.3
    • None
    • Solaris 9, Tomcat 5.0.x, UTF-8 encoding set in Confluence and also using -Dfile.encoding

    Description

      Reproduction:
      1. Create a new space.
      2. Rename space's home page. Use non-ascii characters in the new name, for instance č (c with carret). Let's say we name it "Home of čžš" (without quote marks).
      3. Go to the dashboar.

      In the "Your Spaces" portlet, there are two ways of accessing the space's home page. One is a link the "Space (Key)" column, another is the home icon in "Operations" column. Second method works, as the URL has been changed to "webapp style", e.g. http://example.com/confluence/pages/viewpage.action?pageId=99. The first method sends you to space URL (e.g. http://example.com/confluence/display/PES, where PES is the space key), which then redirects you (via HTTP 302) to the "wiki style" URL, in this case http://example.com/confluence/display/PES/Home%2Bof%2B%25C4%258D%25C5%25BE%25C5%25A1).

      The problem with this URL is that it does not conform to RFC 2396, paragraph 2.4.1. In practice, this screws Apache's mod_proxy big time.

      I suspect that in the first method the URL went twice through URLEncoder. Java's URLEncoder encodes "Home of čžš" as "Home+of+%C4%8D%C5%BE%C5%A1". That would explain why letter č is encoded as %25C4%258D instead of %C4%8D. Though manually stripping '25' does not yield an URL that Confluence recognizes...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              8bcb1553-196a-4cae-9387-2e155042a50a Deleted Account (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: