Skip to content

Commit 258a53e

Browse files
MarkLee131Copilot
andauthored
Update java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 345b842 commit 258a53e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
3232
} catch (Exception e) {
3333
}
3434

35-
// GOOD: Bean Validation @Pattern annotation constrains the input via regex.
35+
// GOOD: A direct String.matches(...) regex check constrains the input before it is written to the session.
3636
String input4 = request.getParameter("input4");
3737
if (input4.matches("[a-zA-Z0-9]+")) {
3838
request.getSession().setAttribute("input4", input4);

0 commit comments

Comments
 (0)