Skip to content

Commit

Permalink
Fix code scanning alert no. 106: Code injection
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 95f1fe7 commit 892d4f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routes/user_submit_quest_routes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import random, string, base64
import random, string, base64, json
from datetime import datetime
from flask import Blueprint, render_template, redirect, url_for, flash, current_app, request
from flask_login import login_required, current_user
Expand Down Expand Up @@ -242,7 +242,7 @@ def approve_submited_quest(quest_id):
@login_required
def post_comment():
submited_quest_id = request.form.get('submited_quest_id')
all_comments = eval(request.form.get('submited_quest_comments'))
all_comments = json.loads(request.form.get('submited_quest_comments'))
comment = request.form.get('submited_quest_comment')
user_id = current_user.user_id
user_role = current_user.user_role
Expand Down

0 comments on commit 892d4f0

Please sign in to comment.