diff --git a/database/pkg.go b/database/pkg.go index 63598ec..2f149d9 100644 --- a/database/pkg.go +++ b/database/pkg.go @@ -164,7 +164,7 @@ func (db *T) Authenticate(username, password string) (authenticated bool, userID SELECT id FROM _webservice.user WHERE - username = $1 AND + LOWER(username) = LOWER($1) AND password = _webservice.password_hash(SUBSTRING(password FROM 1 FOR 32), $2::bytea) `, username,