Fix all high and medium severity security issues found by Bandit

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-07 19:35:40 +00:00
parent 68143a2689
commit edd1acb3a1
13 changed files with 55 additions and 23 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ async def whoami_handler(request: Request):
raise HTTPException(status_code=400, detail="User has no email in session")
# Generate Gravatar URL from email
email_hash = md5(email.strip().lower().encode()).hexdigest()
# MD5 is used here for Gravatar's URL generation (not for security), so usedforsecurity=False
email_hash = md5(email.strip().lower().encode(), usedforsecurity=False).hexdigest()
gravatar_url = f"https://www.gravatar.com/avatar/{email_hash}?d=identicon"
# Add the gravatar URL to the user object instead of creating a new response