Skip to content

Code review python#29

Open
reub-the-cube wants to merge 1 commit intomainfrom
code-review-python
Open

Code review python#29
reub-the-cube wants to merge 1 commit intomainfrom
code-review-python

Conversation

@reub-the-cube
Copy link
Copy Markdown
Owner

@reub-the-cube reub-the-cube commented Oct 15, 2025

Think about what we've discussed: injection, access control, authentication.

cursor = conn.cursor()

# Find users matching the search
query = f"SELECT username, email FROM users WHERE username LIKE '%{search_term}%'"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SQL injection vulnerability - Attacker can inject string query and return sensitive data

@app.route('/admin')
def admin_panel():
user_role = request.args.get('role')
if user_role == 'admin':
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken access control - Attacker can assign themselves admin role using the URL request

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.

2 participants