Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed SQL injection vulnerability in register.php #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

takkamdarios
Copy link

This pull request addresses a critical SQL injection vulnerability in the register.php file, specifically in the user registration functionality. The original implementation directly used user input in SQL queries, which posed a security risk.

To mitigate this, I have implemented prepared statements with parameter binding for the SQL queries. This technique separates user input from the SQL query itself, treating it as data rather than executable code. It effectively prevents the possibility of SQL injection attacks, which is crucial for any system handling user inputs and interacting with databases.

The changes include:

*Modifying the user data insertion query to use prepared statements.

*Ensuring all user inputs are properly sanitized before being used in the query.

These modifications follow widely accepted best practices for database interactions in PHP and enhance the overall security of the system. While I have conducted basic tests to ensure functionality, further testing and review are recommended to confirm the effectiveness of these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant