Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10452

adjust HTTP status code for invalid :redirect value for modifyAce/deleteAce post request

    XMLWordPrintableJSON

Details

    Description

      When the modifyAce/deleteAce servlets receive an illegal or invalid :redirect parameter it should return a status code of 422 instead of 200 because the request was not fully successful.

      Currently, the illegal :redirect parameter value is detected and a warning is logged.  The request continues to be processed without the redirect occurring.  The client has no indication that something went wrong without reviewing the server logs.

      For example:

      Illegal redirect 

      curl -F principalId=myuser -F privilege@jcr:read=granted -F :redirect=https://sling.apache.org http://localhost:8080/test/node.modifyAce.html
      

       invalid redirect

      curl -F principalId=myuser -F privilege@jcr:read=granted -F :redirect=https:// http://localhost:8080/test/node.modifyAce.html

      Attachments

        Issue Links

          Activity

            People

              enorman Eric Norman
              enorman Eric Norman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h