Wicket
  1. Wicket
  2. WICKET-5098

PackageResourceBlockedException under Windows for *.js files in web app's own packages, not in jars

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Windows 7

      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)

        Issue Links

          Activity

          Jenny Brown created issue -
          Jenny Brown made changes -
          Field Original Value New Value
          Attachment packageResourceGuardPatch.txt [ 12573613 ]
          Igor Vaynberg made changes -
          Assignee Igor Vaynberg [ ivaynberg ]
          Igor Vaynberg made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.7.0 [ 12323964 ]
          Resolution Fixed [ 1 ]
          Sven Meier made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Igor Vaynberg made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Alexander Morozov made changes -
          Link This issue breaks WICKET-5851 [ WICKET-5851 ]

            People

            • Assignee:
              Igor Vaynberg
              Reporter:
              Jenny Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development