Overview
The easey-account-api has been identified as lacking sufficient input validation. This ticket focuses on implementing input
validation to ensure that all user inputs are correctly sanitized and parameterized to prevent injection attacks and invalid data submissions.
Key Tasks
- Add input validation for account-related endpoints to ensure all inputs are properly sanitized and validated.
- Use decorators to enforce type validation (e.g., string or number) on all incoming data.
- Apply parameterized queries to mitigate the risk of SQL injection.
- Must write unit tests to validate that inputs are properly sanitized and verified.
Acceptance Criteria
- All inputs must be validated for type, length, and content.
- Invalid inputs should trigger a `400 Bad Request` response with detailed error messages.
- SQL injection prevention should be enforced through parameterized queries.
- Unit tests must confirm that validation logic is correctly implemented across all inputs.