Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4398

Any empty url-parameter will make wicket 1.5 crash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.3
    • 1.5.5, 6.0.0-beta1
    • wicket
    • 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.

      Attachments

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

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            johannes.odland@gmail.com Johannes Odland
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: