mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
Update java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ public class TrustBoundaryViolations extends HttpServlet {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
// GOOD: Bean Validation @Pattern annotation constrains the input via regex.
|
||||
// GOOD: A direct String.matches(...) regex check constrains the input before it is written to the session.
|
||||
String input4 = request.getParameter("input4");
|
||||
if (input4.matches("[a-zA-Z0-9]+")) {
|
||||
request.getSession().setAttribute("input4", input4);
|
||||
|
||||
Reference in New Issue
Block a user