Force URLs and e-mail to be lowercase (#45)

- Added v2.2 migration to lower existing e-mails
This commit is contained in:
2024-06-18 22:01:41 -04:00
parent 823286255b
commit 7ae15b9e93
7 changed files with 78 additions and 35 deletions

View File

@@ -46,7 +46,7 @@ open Microsoft.AspNetCore.Authentication.Cookies
let doLogOn : HttpHandler = fun next ctx -> task {
let! model = ctx.BindFormAsync<LogOnModel>()
let data = ctx.Data
let! tryUser = data.WebLogUser.FindByEmail model.EmailAddress ctx.WebLog.Id
let! tryUser = data.WebLogUser.FindByEmail (model.EmailAddress.ToLowerInvariant()) ctx.WebLog.Id
match! verifyPassword tryUser model.Password ctx with
| Ok _ ->
let user = tryUser.Value