JAVA-002 / Beginner
JDBC Statement with string concatenation
Why is this a problem?
Authentication can be bypassed with ' OR '1'='1.
How to fix it
java
PreparedStatement ps = conn.prepareStatement("SELECT * FROM users WHERE id = ?");
ps.setString(1, id);