Export page to PDF leads to 403 - wrong encoding of file names

XMLWordPrintable

    • 2
    • Severity 2 - Major

      When exporting page/space to PDF, the URL generated to download the file (and the file itself) contains a readable form of the current date and time.

      If you export a single page to PDF via Tools -> Export to PDF, the name of temp directory where the export is generated and the name of the file are wrongly encoded in the download URL for languages where the name of the month contains non ISO Latin 1 characters.

      The URL contains a time stamp token formatted as upon the default locale of the JVM.

      E.g. in Hungarian:

      Page export leads to download URL:
      http://localhost:8080/download/temp/pdfexport-20100608-08j%FAn.10-1014DE-7/PDF-Home-08j%FAn.10-1014DE-8.pdf?contentType=application/pdf

      Trying to download the PDF via this URL, I get 403 errors. Although the file is correctly generated in the file system.

      While space export leads to download URL:
      http://localhost:8080/download/temp/pdfexport-20100608-08j%C3%BAn.10-1017DE-11/PDF-08j%C3%BAn.10-1017DE-12.pdf

      This URL works fine, PDF can be downloaded.

      The problem comes from the wrong encoding of the timestamp token: "08j%FAn.10-1014DE", which should be "08jún.10-1004DE".

      Note: The name of the month in Hungarian is "jún". The letter "ú" is encoded as "%FA" (ISO Latin 1 encoding) in the first case (Export page to PDF), while as "%C3%BA" (UTF8 encoding) in the other case (Export space to PDF).

      Please make sure the URLs are properly encoded like in Export space to PDF.

      BTW: the same is true for Export page to Word.

      This is a new bug as up to Confluence 3.1 exports contained the space key and numbers.

            Assignee:
            Unassigned
            Reporter:
            Tibor Hegyi [META-INF]
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: