[
https://issues.apache.org/jira/browse/WICKET-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105122#comment-14105122
]
Mennat Mokhtar commented on WICKET-5678:
----------------------------------------
Thank you Martin.
I did add the absolute path in the code I put in the description and it worked.
However the original code causing the problem is still not funcitoning.
This is it:
IRequestHandler handler = new ResourceReferenceRequestHandler( new
JavaScriptResourceReference( HtmlTextArea.class, "ckeditor" ) );
String ckeditorBasePath = RequestCycle.get().urlFor( handler ).toString();
I believe because the Package class when joining the absolutePath doesn't add
the / at the beginning
Package class line 117
At the end of
public static String absolutePath(final String packageName, final String path)
you find
return absolutePath.join("/");
> SecurePackageResourceGuard blocking static page
> ------------------------------------------------
>
> Key: WICKET-5678
> URL: https://issues.apache.org/jira/browse/WICKET-5678
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.16.0
> Environment: Fedora20 Tomcat 8
> Reporter: Mennat Mokhtar
> Labels: easyfix
>
> IPackageResourceGuard packageResourceGuard =
> application.getResourceSettings().getPackageResourceGuard();
> if( packageResourceGuard instanceof SecurePackageResourceGuard
> ){
> SecurePackageResourceGuard securePackageResourceGuard =
> (SecurePackageResourceGuard) packageResourceGuard;
> securePackageResourceGuard.addPattern(
> "+com/seanergie/wicket/markup/html/form/ckeditor/" );
> boolean accept = securePackageResourceGuard.accept(
> null, "com/seanergie/wicket/markup/html/form/ckeditor/" );
> }
> /********************************************************************************************/
> The above code results in accept being false.
> After tracing the problem seems to be in the loop matching the pattern line
> 190 in SecurePackageResourceGuard.
> The same code is returning true when running under tomcat 7 and returning
> false when running under tomcat 8.
--
This message was sent by Atlassian JIRA
(v6.2#6252)