Apply suggestions from code review for netty DefaultHttpHeaders

Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
Jonathan Leitschuh
2019-10-25 12:30:16 -04:00
committed by GitHub
parent dcbd6e0a11
commit 934eed97df
2 changed files with 14 additions and 1 deletions

View File

@@ -4,6 +4,6 @@ public class ResponseSplitting {
// BAD: Disables the internal response splitting verification
private final DefaultHttpHeaders badHeaders = new DefaultHttpHeaders(false);
// GOOD: Verifies headers passed don't contain CLRF characters
// GOOD: Verifies headers passed don't contain CRLF characters
private final DefaultHttpHeaders badHeaders = new DefaultHttpHeaders();
}

View File

@@ -1,3 +1,16 @@
/**
* @name Disabled Netty HTTP header validation
* @description Disabling HTTP header validation makes code vulnerable to
* attack by header splitting if user input is written directly to
* an HTTP header.
* @kind problem
* @problem.severity error
* @precision high
* @id java/netty-http-response-splitting
* @tags security
* external/cwe/cwe-113
*/
import java
from ClassInstanceExpr new