Wicket
  1. Wicket
  2. WICKET-4398

Any empty url-parameter will make wicket 1.5 crash

    Details

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

      Description

      Adding an empty parameter to the query string will make wicket crash.

      http://www.example.com/?oneParam&

      How to reproduce in test:

      PageParameters params = new PageParameters();
      params.set("","");
      params.getAllNamed();

      Cause:
      Wicket accepts empty parameters, but when encoding the url for a rendered page it will call params.getAllNamed().

      params.getAllNamed() instantiates new NamedPairs, which calls Args.notEmpty() on the key during instantiation, causing the application to crash.

      The NamedPair constructor should probably allow empty string as a key, and call Args.notNull() on the key in stead.

      1. WICKET-4398.patch
        0.6 kB
        Christoph Leiter
      2. WICKET-4398-2.patch
        0.7 kB
        Christoph Leiter

        Activity

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Johannes Odland
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development