Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8220

Assets with space on its filename makes CSRFTokenSecurityFilter to log an error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Outdated
    • Neutral
    • None
    • None
    • None

    Description

      Steps to reproduce

      1. Upload an asset with a white space on its filename
      2. Create a component which retrieves the asset using damfn.getAsset
      3. Use the component on a page and check that, tho the image is displayed, the error

        ERROR info.magnolia.cms.security.CsrfTokenSecurityFilter: An error occurred while trying to ASCII encode the request servlet path /dam/jcr:ae3c0301-d6c3-467d-84ac-28f7ac3be810/images space.jpeg
        java.net.URISyntaxException: Illegal character in path at index 52: /dam/jcr:ae3c0301-d6c3-467d-84ac-28f7ac3be810/images space.jpeg

      is displayed on the log.

      Expected results

      No error is thrown

      Actual results

      Image is displayed but error is printed

      Workaround

      Customize CsrfTokenSecurityFilter class to suppress white spaces on generateCookie method

      Development notes

      It happens only for Magnolia 6.2.12 when the generateCookie method was introduced.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                ccantalapiedra Carlos Cantalapiedra
                Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD