Skip to content

Commit 5dcd3b2

Browse files
Jami CogswellJami Cogswell
authored andcommitted
clean up files
1 parent 32f7348 commit 5dcd3b2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

java/ql/lib/semmle/code/java/security/RegexInjection.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private class RegexSanitizationCall extends RegexInjectionSanitizer {
4343
}
4444

4545
/**
46-
* A call to the `Pattern.quote` method, which gives metacharacters or escape sequences
46+
* A call to the `Pattern.quote` method, which gives meta-characters or escape sequences
4747
* no special meaning.
4848
*/
4949
private class PatternQuoteCall extends RegexInjectionSanitizer {
@@ -56,7 +56,7 @@ private class PatternQuoteCall extends RegexInjectionSanitizer {
5656
}
5757

5858
/**
59-
* Use of the `Pattern.LITERAL` flag with `Pattern.compile`, which gives metacharacters
59+
* Use of the `Pattern.LITERAL` flag with `Pattern.compile`, which gives meta-characters
6060
* or escape sequences no special meaning.
6161
*/
6262
private class PatternLiteralFlag extends RegexInjectionSanitizer {
@@ -72,7 +72,7 @@ private class PatternLiteralFlag extends RegexInjectionSanitizer {
7272
}
7373

7474
/**
75-
* The methods of the class `java.lang.String` that take a regular expression
75+
* A method of the class `java.lang.String` that takes a regular expression
7676
* as a parameter.
7777
*/
7878
private class StringRegexMethod extends Method {
@@ -83,7 +83,7 @@ private class StringRegexMethod extends Method {
8383
}
8484

8585
/**
86-
* The methods of the class `java.util.regex.Pattern` that take a regular
86+
* A method of the class `java.util.regex.Pattern` that takes a regular
8787
* expression as a parameter.
8888
*/
8989
private class PatternRegexMethod extends Method {
@@ -94,7 +94,7 @@ private class PatternRegexMethod extends Method {
9494
}
9595

9696
/**
97-
* The methods of the class `org.apache.commons.lang3.RegExUtils` that take
97+
* A methods of the class `org.apache.commons.lang3.RegExUtils` that takes
9898
* a regular expression of type `String` as a parameter.
9999
*/
100100
private class ApacheRegExUtilsMethod extends Method {

java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,3 @@ public boolean literalTest(javax.servlet.http.HttpServletRequest request) {
199199
return Pattern.compile(pattern, Pattern.LITERAL).matcher(input).matches(); // Safe
200200
}
201201
}
202-
203-
// ! see the following for potential additional test case ideas: https://www.baeldung.com/regular-expressions-java

0 commit comments

Comments
 (0)