Home / Learn Secure SQL / Common Mistakes, Collected
Common Mistakes, Collected
The recurring mistakes this course has called out, in one list.
The idea, explained simply
Definition
This final lesson collects the specific mistakes flagged throughout the course's examples and fixes (an unbound value, a missing allowlist, an overly broad grant, a leaked internal error, a forgotten length check) into one list, as a final, practical review before finishing the course.
Why you need this
Reviewing the concrete mistakes already seen (rather than abstract rules) sharpens pattern recognition for spotting the same mistakes in new, unfamiliar code going forward.
How it works
Read through this list once at the end of the course, and periodically re-read it when reviewing someone else's database code, as a quick mental checklist of what tends to go wrong.
Where you'll see this
- Web application code review
- Backend development
- Database administration
| Category | Common mistake |
|---|---|
| Query construction | Concatenating a value into SQL text instead of binding it |
| Query construction | Binding a dynamic identifier instead of allowlisting it |
| Access control | Using one broad, shared database account for everything |
| Access control | Hiding a feature only in the UI without a matching database-level restriction |
| Validation | Trusting a client-supplied type/size/content-type header without server-side verification |
| Validation | Accepting and writing every field a client sends (mass assignment) instead of an explicit allowlist |
| Error handling | Returning raw database error text/stack traces to the end user |
| Error handling | Logging too little detail internally to actually debug an incident later |
Test what you just read
1. This course's recurring mistakes mostly fall into which categories?
These four categories recur throughout the course.