Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def login():
db = get_db()

# Intentionally vulnerable to SQL Injection in the username field
query = f"SELECT * FROM users WHERE username = '{username}' AND password = '{hashed_password}'"
query = f"SELECT * FROM users WHERE username = '{username}' AND password = '{hashed_password}'"
print(f"Executing SQL Query: {query}") # Debug the SQL query being executed

result = db.execute(query).fetchone()
Expand Down Expand Up @@ -170,6 +170,7 @@ def xss_demo():
if 'username' not in session:
flash("You must be logged in to access the XSS demo.", "danger")
return redirect(url_for('login'))


search = request.args.get('search')
if request.method == 'POST':
Expand Down Expand Up @@ -235,4 +236,4 @@ def create_ticket():

@app.route('/admin/tickets')
def view_tickets():
return render_template('admin_tickets.html', tickets=tickets)
return render_template('admin_tickets.html', tickets=tickets)
Loading