@Test public void getLocalResourceWithBreakInAttempt() throws Exception { assertNull(skin.getLocalResource("one/../../two")); assertEquals("Direct access to skin file [/skins/two] refused. Possible break-in attempt!", allLogRule.getMessage(0)); }
@Override public Resource<?> getLocalResource(String resourceName) { String resourcePath = getSkinResourcePath(resourceName); if (this.environment.getResource(resourcePath) != null) { return createResource(resourcePath, resourceName); } return null; }
EnvironmentSkin extends AbstractSkin { @Override public Resource<?> getLocalResource(String resourceName) { String resourcePath = getSkinResourcePath(resourceName); if (this.environment.getResource(resourcePath) != null) { return createResource(resourcePath, resourceName); } return null; } }
EnvironmentSkin extends AbstractSkin { @Override public Resource<?> getLocalResource(String resourceName) { String resourcePath = getSkinResourcePath(resourceName); if (this.environment.getResource(resourcePath) != null) { return createResource(resourcePath, resourceName); } return null; } EnvironmentSkin(String id, InternalSkinManager skinManager, InternalSkinConfiguration configuration,
        Logger logger, Environment environment, Provider<XWikiContext> xcontextProvider,
        URLConfiguration urlConfiguration); }
EnvironmentSkin extends AbstractSkin { @Override public Resource<?> getLocalResource(String resourceName) { String resourcePath = getSkinResourcePath(resourceName); if (this.environment.getResource(resourcePath) != null) { return createResource(resourcePath, resourceName); } return null; } EnvironmentSkin(String id, InternalSkinManager skinManager, InternalSkinConfiguration configuration,
        Logger logger, Environment environment, Provider<XWikiContext> xcontextProvider,
        URLConfiguration urlConfiguration); Configuration getProperties(); String getSkinFolder(); @Override Resource<?> getLocalResource(String resourceName); @Override String getOutputSyntaxString(); }
EnvironmentSkin extends AbstractSkin { @Override public Resource<?> getLocalResource(String resourceName) { String resourcePath = getSkinResourcePath(resourceName); if (this.environment.getResource(resourcePath) != null) { return createResource(resourcePath, resourceName); } return null; } EnvironmentSkin(String id, InternalSkinManager skinManager, InternalSkinConfiguration configuration,
        Logger logger, Environment environment, Provider<XWikiContext> xcontextProvider,
        URLConfiguration urlConfiguration); Configuration getProperties(); String getSkinFolder(); @Override Resource<?> getLocalResource(String resourceName); @Override String getOutputSyntaxString();  }