Skip to content

Commit

Permalink
Update SQLInjectionExample.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mobbeitan authored Jan 22, 2024
1 parent ff0ff4f commit 17f7f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/SQLInjectionExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
try {
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/db");

String query = "SELECT * FROM users WHERE username = '" + request.getParameter("username") + "';";
String query = "SELECT * FROM users WHERE username = '" + request.getParameter("username") + "';";
Statement stmt = con.createStatement();

stmt.executeQuery(query);
Expand Down

0 comments on commit 17f7f66

Please sign in to comment.