The Challenge
As part of a mentoring exercise, I picked a random GitHub repository with real problems: an AngularJS app whose PHP API was open to SQL injection.
The Solution
I rewrote the database layer around PDO with parameterized queries, added input validation and form sanitization, and submitted the pull request.
What I Built
Parameterized Queries
PDO prepared statements separate code from data, closing the injection vector.
Input Validation
User input checked before it reaches the database layer.
Form Sanitization
Submitted data cleaned before processing.
Outcome
- SQL injection vulnerabilities removed from a public codebase
Built With
