Ctoic / Task-Manager

Todo App using Pyhton Flask.
https://task-manager-ctoic.vercel.app
Other
4 stars 5 forks source link

Address Security and Input Validation Issues #4

Closed PB2204 closed 11 months ago

PB2204 commented 11 months ago

Title: Address Security and Input Validation Issues

Description:

This pull request addresses several security and input validation issues in the Flask application. The following changes have been made:

  1. Introduced an validate_input function to sanitize user inputs by stripping leading and trailing spaces.

  2. Replaced query.filter_by(id=id) with query.get(id) to prevent SQL injection vulnerabilities when retrieving records by their primary key.

  3. Modified the delete route to use the HTTP POST method for secure deletion.

  4. Applied input validation consistently to all user inputs to prevent potential security vulnerabilities.

  5. Enhanced the search route to check if the search query is not empty before performing the search and validated the input.

  6. Included comments and improved code readability.

These changes improve the overall security and reliability of the application.

Files Affected:

Testing:

Checklist:

Ctoic commented 11 months ago

Thank You so much for your contribution. You made some amazing changes and you explained things pretty well.