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

Secuirty/sql injection vector #18

Merged
merged 4 commits into from
Jun 26, 2019
Merged

Conversation

yancyribbens
Copy link
Contributor

This PR sanitizes the input to delete_records here. This delete_records call is used such that if a badge_template was already selected, and next, a different badge_template is selected, the associated table will call delete_records on the previous and insert the most recent. The superfluous code was removed which checked if it existed before deleting and instead simplified to just call delete_records as suggested in #8 regardless of if a record already exists and the tablename is no longer stored in a variable here. Lastly, the ultimate goal is to not allow more than one course_id to exist currently, and so, a constraint was added here to further enforce the expected behavior.

@yancyribbens yancyribbens force-pushed the secuirty/sql-injection-vector branch from 36be9a4 to 0b4b4ec Compare June 26, 2019 04:27
@yancyribbens yancyribbens merged commit 703318a into master Jun 26, 2019
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