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

remove obsolete check from LocalizedImageResource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.5, 1.4-RC1
    • wicket
    • None

    Description

      LocalizedImageResource contains an unnecessary check for parent-relative resources that is not needed anymore:

      WicketRuntimeException: "The 'src' attribute must not contain
      any of the following strings: '..', './', '/.': ........

      Since WICKET-1428 was successfully closed wicket can handle parent-relative (..) links (in both 1.3 and 1.4).

      So please remove this check:

      org.apache.wicket.markup.html.image.resource.LocalizedImageResource:

      private void loadStaticImage(final String path)
      {
      if ((path.indexOf("..") != -1) || (path.indexOf("./") != -1) || (path.indexOf("/.") != -1))

      { throw new WicketRuntimeException( "The 'src' attribute must not contain any of the following strings: '..', './', '/.': path=" + path); }

      // .... SNIP ....
      }

      I did several tests with 1.3 and 1.4. Everything works like a charm now (once that nasty check is away

      Attachments

        1. wicket-1728-for-1.3.x.patch
          3 kB
          Peter Ertl
        2. wicket-1728-for-1.4.x.patch
          3 kB
          Peter Ertl

        Activity

          People

            ivaynberg Igor Vaynberg
            pete Peter Ertl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: