Skip to content

Commit 934eed9

Browse files
Apply suggestions from code review for netty DefaultHttpHeaders
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
1 parent dcbd6e0 commit 934eed9

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ public class ResponseSplitting {
44
// BAD: Disables the internal response splitting verification
55
private final DefaultHttpHeaders badHeaders = new DefaultHttpHeaders(false);
66

7-
// GOOD: Verifies headers passed don't contain CLRF characters
7+
// GOOD: Verifies headers passed don't contain CRLF characters
88
private final DefaultHttpHeaders badHeaders = new DefaultHttpHeaders();
99
}

java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
* @name Disabled Netty HTTP header validation
3+
* @description Disabling HTTP header validation makes code vulnerable to
4+
* attack by header splitting if user input is written directly to
5+
* an HTTP header.
6+
* @kind problem
7+
* @problem.severity error
8+
* @precision high
9+
* @id java/netty-http-response-splitting
10+
* @tags security
11+
* external/cwe/cwe-113
12+
*/
13+
114
import java
215

316
from ClassInstanceExpr new

0 commit comments

Comments
 (0)