Uploaded image for project: 'CXF-Fediz'
  1. CXF-Fediz
  2. FEDIZ-220

http 400 when logout with redirect to constraint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 1.4.5
    • Plugin
    • None

    Description

      I would like to redirect to a page after logout from a SAML authentication with tomcat plugin.

      I have added this in my fediz_config.xml 

       

      <logoutRedirectToConstraint type="String">.*logout.do.*</logoutRedirectToConstraint>
      

       

      Then when I logout, instead of being redirected as expected I have an http 400 because the redirec url (/mycontext/logout.do?display=2) is  url encoded and becomes not valid (because of / and ?).

      I looked in the code and it seems to me the issue is here 

      org.apache.cxf.fediz.core.handler.LogoutHandler.signoutCleanup(HttpServletRequest request, HttpServletResponse response) 

      line 114 

      response.sendRedirect(URLEncoder.encode(wreply, "UTF-8"));
      

      should be replaced with

      response.sendRedirect(response.encodeRedirectURL(wreply);
      

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            amergey Arnaud MERGEY
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: