Description
PackageResourceGuard.acceptAbsolutePath() uses '/' instead of File.separator when manipulating absolute file paths. This causes problems on MS-Windows when trying to parse "C:\com\mycompany\...." resulting in exceptions when trying to load javascript etc files that are not in a jar. The problem shows up for resources accessed via FileResourceStream, but not UrlResourceStream.
org.apache.wicket.request.resource.PackageResource$PackageResourceBlockedException: Access denied to (static) package resource com/mycompany/components/behavior/TinyMceBehavior.js. See IPackageResourceGuard
at org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:460)
at org.apache.wicket.request.resource.PackageResource.getCacheableResourceStream(PackageResource.java:395)
at org.apache.wicket.request.resource.PackageResource.getCacheKey(PackageResource.java:223)
at org.apache.wicket.request.resource.caching.version.RequestCycleCachedResourceVersion.getVersion(RequestCycleCachedResourceVersion.java:81)
Attachments
Attachments
Issue Links
- breaks
-
WICKET-5851 PackageResourceTest#packageResourceGuard test fails under Windows
- Resolved