mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-15 20:05:13 +02:00
Critical bug fixes and recall improvements (#68)
This commit is contained in:
parent
7d0e7320e2
commit
55247b7fcd
352 changed files with 60069 additions and 900 deletions
20
tests/fixtures/realistic/sqli_xlang/SqliJavaConcat.java
vendored
Normal file
20
tests/fixtures/realistic/sqli_xlang/SqliJavaConcat.java
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Phase 15 — Java JDBC raw-string concat SQLi positive.
|
||||
// `Statement.executeQuery` is a flat SQL_QUERY sink in
|
||||
// `labels/java.rs`; concatenated `request.getParameter` value flows
|
||||
// directly into the SQL string with no parameterisation.
|
||||
package com.example;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class SqliJavaConcat {
|
||||
public ResultSet lookup(HttpServletRequest request) throws Exception {
|
||||
String name = request.getParameter("name");
|
||||
Connection conn = DriverManager.getConnection("jdbc:h2:mem:db");
|
||||
Statement stmt = conn.createStatement();
|
||||
return stmt.executeQuery("SELECT * FROM users WHERE name = '" + name + "'");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue