-
Notifications
You must be signed in to change notification settings - Fork 365
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
Some of this appears to have been already covered in PR #663 #670
Merged
Merged
Changes from 23 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
f8ac3fd
Signed key history for MATT SEIL begins here.
87c4c4e
Signed key history for MATT SEIL begins here. Fixed email typo.
8cd4ab2
Merge branch 'develop' of https://github.com/xeno6696/esapi-java-lega…
xeno6696 304ee3e
Revert "Signed key history for MATT SEIL begins here. Fixed email ty…
xeno6696 fe6ed91
Merging.
xeno6696 0fb6613
created file on main.
xeno6696 dc16afd
Deleted foo.txt
xeno6696 2e8694c
Bump release to new patch version #.
kwwall eebcc8f
Merged with upstream/develop
xeno6696 a3967b6
Merge remote-tracking branch 'upstream/develop' into develop
xeno6696 9fa2a53
#661 Added ability to generate OSGi metadata with the command 'mvn or…
xeno6696 1d92c37
Updated to AntiSamy 1.6.5.
xeno6696 c7e431e
Merge remote-tracking branch 'upstream/develop' into develop
xeno6696 ccf203b
Revert "#661 Added ability to generate OSGi metadata with the command…
xeno6696 9934557
Merge remote-tracking branch 'upstream/develop' into develop
xeno6696 d975a8a
#656 --> Parameterized cookie name length and value to correspond wi…
xeno6696 5246396
Adjusted regex to allow for zero-length matches.
xeno6696 f1a7169
Added per review comments for PR #663
xeno6696 78c6fb4
Merge remote-tracking branch 'upstream/develop' into develop
xeno6696 d859556
#656 Finished sweep looking for headername, headervalue, and header v…
xeno6696 30920c2
Merged with upstream.
xeno6696 f684e2a
#663 Fixed a missed unit test.
xeno6696 39d8a8a
Antisamy 1.6.6, Antisamy regression test for analysis 1. A handful o…
xeno6696 8db0fc1
Attempting to fix classfile differences with antisamy dependencies.
xeno6696 14c914d
Fixed typo on exclusion.
xeno6696 6bc6891
Added xerces exclusion to antisamy in the pom.xml
xeno6696 fd1a323
Added test cases 2 & 3.
xeno6696 d2f4149
Added test cases 2 & 3. @Ignore on test case 3 from AntiSamy as the …
xeno6696 6135173
merged with Dave Wichers' kind changes.
xeno6696 d6589cd
Forced my version to match Wichers.
xeno6696 a473f17
Added a pair of unit tests for canoncialization to prove out an issue…
xeno6696 1d91f03
Merge branch 'develop' into develop
kwwall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1040,15 +1040,13 @@ public void testHeaderLengthChecks(){ | |
|
||
@Test | ||
public void testGetHeaderNames() { | ||
//testing Validator.HTTPHeaderName | ||
MockHttpServletRequest request = new MockHttpServletRequest(); | ||
SecurityWrapperRequest safeRequest = new SecurityWrapperRequest(request); | ||
request.addHeader("d-49653-p", "pass"); | ||
request.addHeader("<img ", "fail"); | ||
// Note: Max length in ESAPI.properties as per | ||
// Validator.HTTPHeaderName regex is 256, but upper | ||
// bound is configurable by the property HttpUtilities.MaxHeaderNameSize | ||
SecurityConfiguration sc = ESAPI.securityConfiguration(); | ||
request.addHeader(TestUtils.generateStringOfLength(255), "pass"); | ||
request.addHeader(TestUtils.generateStringOfLength(257), "fail"); | ||
assertEquals(2, Collections.list(safeRequest.getHeaderNames()).size()); | ||
|
@@ -1130,5 +1128,13 @@ public void testavaloqLooseSafeString(){ | |
boolean isValid = v.isValidInput("RegexString", ""test"", "avaloqLooseSafeString", 2147483647, true, true); | ||
assertFalse(isValid); | ||
} | ||
|
||
@Test | ||
public void testStandardHeader() { | ||
Validator v = ESAPI.validator(); | ||
boolean expected = false; | ||
boolean result = v.isValidInput("HTTPHeaderValue ", "[email protected]", "HTTPHeaderValue", 2147483647, true, true); | ||
assertEquals(expected, result); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, why not just a
ssertFalse()
here instead of settingexpected
to false and usingassertEquals()
here? I'd recommend parting it after the previous test (lines 1128-1129).