You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2008/07/11 17:48:31 UTC

[jira] Resolved: (WICKET-1728) remove obsolete check from LocalizedImageResource

     [ https://issues.apache.org/jira/browse/WICKET-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1728.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-M4
                   1.3.5

> remove obsolete check from LocalizedImageResource
> -------------------------------------------------
>
>                 Key: WICKET-1728
>                 URL: https://issues.apache.org/jira/browse/WICKET-1728
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.5, 1.4-M4
>
>         Attachments: wicket-1728-for-1.3.x.patch, wicket-1728-for-1.4.x.patch
>
>
> 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 :-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.