Uploaded image for project: 'atlassian-seraph'
  1. atlassian-seraph
  2. SER-174

BaseLoginFilter continues after redirect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.5.2
    • 2.5.1
    • true

    Description

      The end of the doFilter method in BaseLoginFilter contains this code:

      
                  // if we successfully logged in - look for an original URL to forward to
                  if (LOGIN_SUCCESS.equals(status) && redirectToOriginalDestination(httpServletRequest, httpServletResponse))
                  {
                      return;
                  }
                  // NOTE : LOGIN_NOATTEMPT is a symbolic constant for null which is a language level symbolic constant for...well...null
                  //noinspection StringEquality
                  if (status == LOGIN_NOATTEMPT)
                  {
                      issuePossibleRedirectIfUserIsAlreadyLoggedIn(httpServletRequest, httpServletResponse);
                  }
              }
              filterChain.doFilter(httpServletRequest, httpServletResponse);
      

      The problem is that if issuePossibleRedirectIfUserIsAlreadyLoggedIn does in fact issue a redirect, it should exit immediately rather than continuing the filter chain, which can lead to an IllegalStateException.

      Attachments

        Activity

          People

            tmoore Tim Moore [Atlassian]
            tmoore Tim Moore [Atlassian]
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 26 weeks, 6 days ago