use of org.craftercms.commons.validation.validators.impl.SecurePathValidator in project core by craftercms.
the class FileSystemContentStoreAdapterTest method setUpTestStoreAdapter.
private void setUpTestStoreAdapter() throws IOException {
ResourceLoader resourceLoader = mock(ResourceLoader.class);
when(resourceLoader.getResource(CLASSPATH_STORE_ROOT_FOLDER_PATH)).thenReturn(new ClassPathResource(CLASSPATH_STORE_ROOT_FOLDER_PATH));
storeAdapter = new FileSystemContentStoreAdapter();
storeAdapter.setCacheTemplate(cacheTemplate);
storeAdapter.setResourceLoader(resourceLoader);
storeAdapter.setDescriptorFileExtension(DESCRIPTOR_FILE_EXTENSION);
storeAdapter.setMetadataFileExtension(METADATA_FILE_EXTENSION);
storeAdapter.setPathValidator(new SecurePathValidator("path"));
}
Aggregations