SQL injection · Question 12 of 12
A plugin sorts by a parameter sort and builds orderBy($sort). Which measures are right?
2 answers are correct. Hard
Show answer
Answer
- A Fall back to a default column for unknown values
- D Check the value against a fixed list of allowed columns
Explanation
Identifiers cannot be bound as parameters. An allowlist with a fallback to a safe default is the right way.