fix: Normalize username before getting pfp
All checks were successful
Build Docker / Build Docker (push) Successful in 33s

This commit is contained in:
Nathan Woodburn 2024-06-21 18:01:06 +10:00
parent b60f0f2074
commit c25bcbef84
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -601,6 +601,8 @@ def profile(username):
@bp.route("/u/<username>/avatar.png")
def avatar(username):
username = username.lower().strip().replace("/", "")
user = User.query.filter_by(username=username).first()
if not user:
print("User not found")