Compare commits

...

2 Commits

Author SHA1 Message Date
57c1cfb412 Bumped to v0.2.11 2024-04-22 09:19:38 +02:00
d650542b72 Authentication with lowercased username 2024-04-22 09:19:21 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ func (db *T) Authenticate(username, password string) (authenticated bool, userID
SELECT id SELECT id
FROM _webservice.user FROM _webservice.user
WHERE WHERE
username = $1 AND LOWER(username) = LOWER($1) AND
password = _webservice.password_hash(SUBSTRING(password FROM 1 FOR 32), $2::bytea) password = _webservice.password_hash(SUBSTRING(password FROM 1 FOR 32), $2::bytea)
`, `,
username, username,

2
pkg.go
View File

@ -52,7 +52,7 @@ import (
"strings" "strings"
) )
const VERSION = "v0.2.10" const VERSION = "v0.2.11"
type HttpHandler func(http.ResponseWriter, *http.Request) type HttpHandler func(http.ResponseWriter, *http.Request)