Wicket
  1. Wicket
  2. WICKET-4816

Handling of semicolons in form action URLs

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8
    • Fix Version/s: 6.2.0, 1.5.9
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Jetty 8.1.1.v20120215

      Description

      What I expect to happen when there is no semicolon support in Wicket is that a
      URL in a form like below stays intact and will not be cut off at the position of
      the first semicolon:

      <form action="http://localhost:8080/dor/abc_1234:56;023:456_def_78;90.html"
      method="post"><input type="submit" value="Submit" /></form>

      In my application the part abc_1234:56;023:456_def_78;90.html is "named1" in the
      mapping below:

      mount(new MountedMapper("dor/#

      {named1}

      ", TestPage.class, new
      MyPageParametersEncoder()));

      and parsed in MyPageParametersEncoder.

      The officially intended use of semicolons in URLs seems to be specified in "RFC
      1808 - Relative Uniform Resource Locators, 2.4.5."
      (http://www.faqs.org/rfcs/rfc1808.html). But that´s not what I´m looking for.

      If I had not some pages running on this syntax, I could easily swap the
      semicolon with another symbol. Nevertheless and if I´m correctly informed, I
      think those URLs should not be cut off.

      (Quotation from the mailing list)

      The quickstart can be tested with the following URLs:

      http://localhost:8080/dor/abc_1234:56;023:456_def_78;90.html
      http://localhost:8080/dor/abc_1234:56%3B023:456_def_78%3B90.html
      http://localhost:8080/dor/?abc=1234:56%3B023:456&def=78%3B90

      The crucial part is the action attribute in the form in the page´s source code, which contains i.e. "./abc_1234:56?-1.IFormSubmitListener-form".

        Activity

        Hide
        Martin Grigorov added a comment -

        Yes, Strings.stripJSessionId() was the problem.

        Show
        Martin Grigorov added a comment - Yes, Strings.stripJSessionId() was the problem.
        Hide
        Arne Baganz added a comment - - edited

        This might be the source code responsible for the cut:

        org.apache.wicket.util.string.Strings#stripJSessionId(String url)

        where it reads: cut off at ";"

        Show
        Arne Baganz added a comment - - edited This might be the source code responsible for the cut: org.apache.wicket.util.string.Strings#stripJSessionId(String url) where it reads: cut off at ";"
        Hide
        Arne Baganz added a comment -

        The quickstart mentioned above.

        Show
        Arne Baganz added a comment - The quickstart mentioned above.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Arne Baganz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development