Skip to content

Commit 504197b

Browse files
xeno6696kwwall
andauthored
Fixes for #588 and #517 (#611)
* Bump release to new release number, 2.2.2.0. * Fixed #517 and #588 with currently only one unit test failing. * Fixed my pom.xml for #588 and #517 * Fixed an encoding bug that was causing an early truncation involving invalid escape sequences. This was causing test input jeff\WILLIAMS to be converted to jeffWILLIAMS and then passing a validation test that it should have been failing. Special thanks to Jeremiah Stacey for the root cause analysis and repair. For #517 and #588. * Fixing unit test to be windows/linux compatible #517 and #588. * #588 reverted 9a84f83 and switched unit test to execute against a build-relative path that should exist no matter the OS. * #588 Re-inserted unit test. * #588 --> Living with failure on windows to keep build alive for the pipeline. Co-authored-by: kwwall <[email protected]> Co-authored-by: xeno6696 <xeno6696[at]gmail.com>
1 parent b8adf7f commit 504197b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/test/java/org/owasp/esapi/reference/ValidatorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ public void testIsValidDirectoryPath() throws IOException {
372372
// Unix specific paths should pass
373373
assertTrue(instance.isValidDirectoryPath("test6", "/", parent, false, errors)); // Root directory
374374
assertTrue(errors.size()==5);
375-
// Note, we used to say that about '/bin', but Ubuntu 20.x
376-
// changed '/bin' to a sym link to 'usr/bin'. We can't use '/etc'
377-
// because under MacOS, that is a sym link to 'private/etc'.
375+
// Note, we used to say that about '/bin', but Ubuntu 20.x
376+
// changed '/bin' to a sym link to 'usr/bin'. We can't use '/etc'
377+
// because under MacOS, that is a sym link to 'private/etc'.
378378
assertTrue(instance.isValidDirectoryPath("test7", "/dev", parent, false, errors)); // Always exist directory
379379
assertTrue(errors.size()==5);
380380

src/test/resources/esapi/validation.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ Validator.CreditCard=^(\\d{4}[- ]?){3}\\d{4}$
4545
Validator.SSN=^(?!000)([0-6]\\d{2}|7([0-6]\\d|7[012]))([ -]?)(?!00)\\d\\d\\3(?!0000)\\d{4}$
4646
#RegexString here is PURELY for regression testing purposes. NOT for production use.
4747
Validator.RegexString=^[^<>]*
48+
Validator.avaloqLooseSafeString=^[+>=<?!%_,~:@|\\-\\/\\*\\&\\;\\.\\#\\n\\r\\p{Pd}\\p{Ps}\\p{Pe}\\p{Pc}\\p{N}\\p{L}\\p{Sc}\\p{Z}]{0,10000}$

0 commit comments

Comments
 (0)