-
Notifications
You must be signed in to change notification settings - Fork 235
JCR-5233: commons-fileupload (1.6) restricts header size in upload pa… #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,6 @@ | |
| import static org.junit.Assert.assertTrue; | ||
| import static org.mockito.Mockito.*; | ||
|
|
||
|
|
||
| import javax.servlet.ServletInputStream; | ||
| import java.io.ByteArrayInputStream; | ||
| import java.io.IOException; | ||
|
|
@@ -212,12 +211,13 @@ public void testMultipartPostWithShorterFilename() throws Exception { | |
|
|
||
| @Test(expected=IOException.class) | ||
| public void testMultipartPostWithExtremelyLongFilename() throws Exception { | ||
| buildRequestWithFilenameOfVaryingLength(1000); | ||
| // tests against the new default value of 4096 | ||
| buildRequestWithFilenameOfVaryingLength(5000); | ||
| File testTmpDir = tempFolder.newFolder("jackrabbit_long_filename"); | ||
| RequestData requestData = new RequestData(mockRequest, testTmpDir); | ||
| try { | ||
| assertTrue( | ||
| requestData.getParameter("fileUpload").length() > 950); | ||
| requestData.getParameter("fileUpload").length() > 4900); | ||
|
reschke marked this conversation as resolved.
Outdated
|
||
| } finally { | ||
| requestData.dispose(); | ||
| } | ||
|
|
@@ -226,13 +226,13 @@ public void testMultipartPostWithExtremelyLongFilename() throws Exception { | |
| @Test | ||
| public void testMultipartPostWithExtremelyLongFilenameNButHigherConfig() throws Exception { | ||
| try { | ||
| System.setProperty("jackrabbit-server-PartHeaderSizeMax", "2048"); | ||
| buildRequestWithFilenameOfVaryingLength(1000); | ||
| System.setProperty("jackrabbit-server-PartHeaderSizeMax", "8192"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nits: the method name |
||
| buildRequestWithFilenameOfVaryingLength(7500); | ||
| File testTmpDir = tempFolder.newFolder("jackrabbit_long_filename"); | ||
| RequestData requestData = new RequestData(mockRequest, testTmpDir); | ||
| try { | ||
| assertTrue( | ||
| requestData.getParameter("fileUpload").length() > 950); | ||
| requestData.getParameter("fileUpload").length() > 7500); | ||
| } finally { | ||
| requestData.dispose(); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.