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. login.zip
        26 kB
        Robert Kühne
      2. WICKET-4401.patch
        0.6 kB
        Martin Grigorov
      3. WICKET-4401.patch
        2 kB
        Martin Grigorov

        Issue Links

          Activity

          Robert Kühne created issue -
          Hide
          Robert Kühne added a comment -

          quickstart

          Show
          Robert Kühne added a comment - quickstart
          Robert Kühne made changes -
          Field Original Value New Value
          Attachment login.zip [ 12513980 ]
          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.
          Martin Grigorov made changes -
          Attachment WICKET-4401.patch [ 12515258 ]
          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.
          Martin Grigorov made changes -
          Attachment WICKET-4401.patch [ 12515613 ]
          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.
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Martin Grigorov [ mgrigorov ]
          Fix Version/s 1.5.5 [ 12319052 ]
          Fix Version/s 6.0.0 [ 12315431 ]
          Resolution Fixed [ 1 ]
          Sven Meier made changes -
          Link This issue is related to WICKET-4442 [ WICKET-4442 ]

            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