Fixes unicode profile names in backend.

This commit is contained in:
Dominik Picheta 2018-05-25 22:00:51 +01:00
commit 3054be9111

View file

@ -1391,11 +1391,12 @@ routes:
get "/profile/@username": get "/profile/@username":
cond "username" in request.params cond "username" in request.params
let username = decodeUrl(@"username")
const threadsQuery = const threadsQuery =
sql"""select name from person where name = ? and isDeleted = 0;""" sql"""select name from person where name = ? and isDeleted = 0;"""
let value = getValue(db, threadsQuery, @"username") let value = getValue(db, threadsQuery, username)
if value == @"username": if value == username:
pass pass
else: else:
redirect uri("/404") redirect uri("/404")