Results 1 to 2 of 2

Thread: authenticationFailureUrl redirect

  1. #1
    Join Date
    Aug 2004
    Posts
    14

    Default authenticationFailureUrl redirect

    Hi,
    if the user fails to login (ex. wrong password), I want to redirect him to a loginerror.jsp page.
    I have defined that the login page (acegilogin.jsp) requires a secure channel (via channelProcessingFilter) but I forgot to specify (should I?) that also the loginerror.jsp page use the same channel.

    With this situation I had a very strange behavior:

    When the AbstractProcessingFilter.doFilter() method fails to attemptAuthentication() [line 296] it decides the failureUrl and calls httpResponse.sendRedirect(httpResponse.encodeRedir ectURL(httpRequest .getContextPath() + failureUrl)); [line 335]

    Unfortunately since my failureUrl requires a different channel (insecure) the application is not able to the forward to loginerror page. Tomcat goes in loop (class Http11Processor.java beetween lines 754 and 859) and the browser waits an answer forever.

    Now I have defined loginerror.jsp requires a secure channel and everything works ok....

    My question is, is it possible to generate an exception for this kind of error so that it is easier for the developer to find out the problem? or, should it be possible to redirect to a page with a different channel?, how?

    thanks in advance,
    yanke

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I've looked at the AbstractProcessingFilter code but cannot see why this would cause an infinite loop.

    Is some Acegi Security code looping? Or is it solely within Tomcat? Would it be possible to give me some clue as to what code is looping and why? Alternatively, if you develop a check for the problematic configuration I would be happy to check it into CVS.

Similar Threads

  1. [cas] why I redirect to https
    By iamteri in forum Security
    Replies: 2
    Last Post: Sep 4th, 2007, 09:35 AM
  2. Redirect expose jsp path?
    By jackysee in forum Web
    Replies: 2
    Last Post: Jun 28th, 2005, 10:01 PM
  3. Redirect issue
    By neeraj_cmu in forum Web
    Replies: 4
    Last Post: Jun 7th, 2005, 09:38 AM
  4. redirect: prefix and view resolver
    By sjivan in forum Web
    Replies: 2
    Last Post: Dec 20th, 2004, 03:28 PM
  5. Spring FormController lacks POST -> REDIRECT support.
    By DaVinci79 in forum Architecture
    Replies: 2
    Last Post: Oct 21st, 2004, 03:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •