SQL injection · Question 9 of 12

A column name for sorting comes from user input. How do you handle it correctly?

1 answer is correct. Medium

Show answer

Answer

  • C Check it against a list of allowed columns

Explanation

Parameters only bind values, not identifiers such as columns or tables. Only an allowlist helps for them, additionally quoteIdentifier().

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications