QuestionQ34

VerifiedSecure Coding Practices for Input Validation

During a secure code review, John, an independent application security expert, discovered that the developer used the Java code highlighted in the following screenshot. What security mistake did the developer make?

Question Image

Explanation

A parameterized SQL query uses ? placeholders and binds values separately through methods such as setString. Concatenating uname and pwd into the SQL text produces a non-parameterized query, allowing input to alter the query syntax and creating SQL-injection risk.

Community Discussion

No comments yet. Be the first to start the discussion!