We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497ffbd commit b0a4372Copy full SHA for b0a4372
tamuctf2018/sql/solution.md
@@ -2,3 +2,14 @@
2
3
> I created a login form for my web page. Somehow people are logging in as admin without my password though!
4
Can you fix my login code for me?
5
+
6
+Simple SQL injection attack bypassing auththentication. Use real_escape_string to sanitise input.
7
8
+Changes:
9
+```
10
+16 - $user = $_POST['username'];
11
+17 - $pass = $_POST['password'];
12
+16 + $user = $conn->real_escape_string($_POST['username']);
13
+17 + $pass = $conn->real_escape_string($_POST['password']);
14
15
0 commit comments