From a87831846d1f82c0da851e55c6599f6f5a24791f Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 14 Mar 2021 13:30:59 +0100 Subject: use lower() for register, search and login --- api/social/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/social') diff --git a/api/social/search.py b/api/social/search.py index a9bb385..ccc62e5 100644 --- a/api/social/search.py +++ b/api/social/search.py @@ -13,7 +13,7 @@ def index(): if not query: return "", 400 if len(query) < 3: return "", 403 - results = cursor.execute("select user_id from users where levenshtein(username, ?, 3)", [query]).fetchmany(20); + results = cursor.execute("select user_id from users where levenshtein(lower(username), lower(?), 3)", [query]).fetchmany(20); formatted = { "results": [] } -- cgit v1.2.3