Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-16664

Encoding/decoding URL issue with Tomcat 7.0.70

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Won't Fix
    • Affects Version/s: 5.1.1
    • Fix Version/s: None
    • Component/s: Installer
    • Labels:
      None
    • Environment:
      Tomcat 7.0.70
    • Bug Priority:
      Category 2
    • ACT Numbers:

      00692456, 00689803

      Description

      Problem description

      We've had a couple of instances recently of customers raising issues against Tomcat 7.0.70. The problems centre around URL encoding/decoding.

      For example, the request from the browser to Share is ok:
      GET /share/service/components/documentlibrary/data/doclist/all/node/alfresco/user/home/Shared/test%20folder?…
      But, the request from Share to the repository is badly encoded:
      GET /alfresco/s/slingshot/doclib2/doclist/all/node/alfresco/user/home/Shared/test%2520folder?…ARGS… HTTP/1.1

      • resulting in the answer from the repo 404 not found (It should be ‘test%20folder’ but is ‘test%2520folder’ instead)
      Steps to reproduce
      1. Go to Repository/Shared
      2. Create a folder and name it “Test Folder” (important to put the space)
      3. Once the folder is created click to enter on it
      4. The screenshot shows what you will see problem.png

      Additional steps for reproduction, here we see that %40 is not decoded to @

      1. Create a user user with a username john-smith@alfresco.com
      2. Launch the below URL and you will see the page without any problem
        http://localhost:8080/share/proxy/alfresco/api/people/john-smith%40alfresco.com/preferences
      • and you will now get a "404 Not Found" error (on previous versions of Tomcat this works)
        {{"message" : "Person john-smith%40alfresco.com does not exist", }}
      Analysis

      For the first reproduction steps, the response is:

      HTTP/1.1 404 Not Found
      Server: Apache-Coyote/1.1
      Cache-Control: no-cache
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Pragma: no-cache
      Content-Type: application/json;charset=UTF-8
      Transfer-Encoding: chunked
      Date: Thu, 11 Aug 2016 12:19:42 GMT
      
      160
      {
          "status" : 
        {
          "code" : 404,
          "name" : "Not Found",
          "description" : "Requested resource is not available."
        },  
        
        "message" : "Path not found: 'Shared\/test%20folder'",  
        "exception" : "",
        
        "callstack" : 
        [ 
            
        ],
        
        "server" : "Enterprise v5.1.0 (r122924-b17) schema 9,017",
        "time" : "11-Aug-2016 13:19:43"
      }
      

      Possibly caused by 59317 where it seems that Apache introduced a new control mechanism of URLs which breaks all the urls which contain spaces.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedissues Closed Issues
                  Reporter:
                  astrachan Alex Strachan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 6 hours, 15 minutes
                    6h 15m

                      Structure Helper Panel