Trying to do HttpServletResponse.sendRedirect to an absolute dashboard url causes a 404

XMLWordPrintable

    • 7.01
    • Severity 2 - Major
    • 0

      Trying to do a javax.servlet.http.HttpServletResponse#sendRedirect with an absolute url (which is perfecty valid according to the spec), might cause JIRA to try to forward to that redirect instead.

      This seems to be caused by com.atlassian.jira.web.JiraForwardAuthorizer chosing the url to be forwarded rather than redirected (which is fine-ish), and com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse#resolveLocation not handling absolute urls at all, deciding to forward to the absolute url.

       

      Actual result

      The result is a 404. We've hit it when doing redirection after a redirect.

       

      Expected result

      Normal re-direct happens.

       

      Workaround

      • Include setting the magic SEND_REDIRECT_ONGOING attribute
      • avoid doing absolute redirects.

            Assignee:
            Unassigned
            Reporter:
            Lukasz Pater
            Votes:
            13 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: