fix: Normalize username before getting pfp
All checks were successful
Build Docker / Build Docker (push) Successful in 33s
All checks were successful
Build Docker / Build Docker (push) Successful in 33s
This commit is contained in:
parent
b60f0f2074
commit
c25bcbef84
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user