"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tapestry-core/src/test/java/org/apache/tapestry5/internal/services/assets/ContextAssetRequestHandlerTest.java" between
apache-tapestry-5.7.1-sources.zip and apache-tapestry-5.7.2-sources.zip

About: Apache Tapestry is a framework for creating dynamic, robust, highly scalable web applications in Java. Source code.

ContextAssetRequestHandlerTest.java  (apache-tapestry-5.7.1-sources):ContextAssetRequestHandlerTest.java  (apache-tapestry-5.7.2-sources)
skipping to change at line 33 skipping to change at line 33
public class ContextAssetRequestHandlerTest extends TestBase public class ContextAssetRequestHandlerTest extends TestBase
{ {
@DataProvider @DataProvider
public Object[][] invalid_paths() public Object[][] invalid_paths()
{ {
return new Object[][] return new Object[][]
{ {
{"web-Inf/classes/hibernate.cfg.xml"}, {"web-Inf/classes/hibernate.cfg.xml"},
{"Meta-Inf/MANIFEST.mf"}, {"Meta-Inf/MANIFEST.mf"},
{"Index.tml"}, {"Index.tml"},
{"folder/FolderIndex.TML"}}; {"folder/FolderIndex.TML"},
{"\\WEB-INF/something.jpg"},
{"\\//WEB-INF/something.jpg"},
{"//WEB-INF/something.jpg"},
{"//\\\\WEB-INF/something.jpg"}
};
} }
@Test(dataProvider = "invalid_paths") @Test(dataProvider = "invalid_paths")
public void ensure_assets_are_rejected(String path) throws IOException public void ensure_assets_are_rejected(String path) throws IOException
{ {
ContextAssetRequestHandler handler = new ContextAssetRequestHandler(null , null); ContextAssetRequestHandler handler = new ContextAssetRequestHandler(null , null);
assertFalse(handler.handleAssetRequest(null, null, "fake-checksum/" + pa th), assertFalse(handler.handleAssetRequest(null, null, "fake-checksum/" + pa th),
"Handler should return false for invalid path."); "Handler should return false for invalid path.");
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)