Wicket
  1. Wicket
  2. WICKET-4401

Redirect after sign in with SignInPanel does not always reach homepage

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.5, 6.0.0-beta1
    • Component/s: wicket
    • Labels:
      None

      Description

      Im using SingInPanel for login and lately I observed some weird behaviour which I initially couldn't reproduce. It seems that the redirect which is happening after the login sometimes fails and I finally managed to build a quickstart. The bug does only show up when using tomcat (6.0.29) and not in jetty. I guess it is because of the context path which is not used in jetty in the default configuration. The quickstart eclipse project is named "login" which results in the context path you see below.

      Do the following to see the bug:

      I dug around the request cycle which didn't help too much. Another guess is that the MountedMapper might do something bad here.

      1. WICKET-4401.patch
        0.6 kB
        Martin Grigorov
      2. WICKET-4401.patch
        2 kB
        Martin Grigorov
      3. login.zip
        26 kB
        Robert Kühne

        Issue Links

          Activity

          Hide
          Robert Kühne added a comment -

          quickstart

          Show
          Robert Kühne added a comment - quickstart
          Hide
          Robert Kühne added a comment -

          Unmounting the login page (comment out mountPage("/user/login", LoginPage.class) in WicketApplication) seems to solve the issue as a workaround. Though, the nice mount is gone and you have to use: http://localhost:8080/login/wicket/bookmarkable/de.rob.login.LoginPage

          This seems to back the theory of a broken MountedMapper (or related code).

          Show
          Robert Kühne added a comment - Unmounting the login page (comment out mountPage("/user/login", LoginPage.class) in WicketApplication) seems to solve the issue as a workaround. Though, the nice mount is gone and you have to use: http://localhost:8080/login/wicket/bookmarkable/de.rob.login.LoginPage This seems to back the theory of a broken MountedMapper (or related code).
          Hide
          Martin Grigorov added a comment -

          I think it is related to how Tomcat's handles urls which end with '..'.
          This patch appends '/' if the url ends with '..' and seems to solve the problem.

          Show
          Martin Grigorov added a comment - I think it is related to how Tomcat's handles urls which end with '..'. This patch appends '/' if the url ends with '..' and seems to solve the problem.
          Hide
          Robert Kühne added a comment -

          I tested the patch and can confirm that it works for me, too.

          Show
          Robert Kühne added a comment - I tested the patch and can confirm that it works for me, too.
          Hide
          Martin Grigorov added a comment -

          Here is another patch which I believe is better.

          Show
          Martin Grigorov added a comment - Here is another patch which I believe is better.
          Hide
          Bartosz Jakubowski added a comment -

          I'm using Jetty 6.1.26 and had the same issue. Patch works for me also.

          Show
          Bartosz Jakubowski added a comment - I'm using Jetty 6.1.26 and had the same issue. Patch works for me also.

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Robert Kühne
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development