fix lowercase

This commit is contained in:
Aine
2022-10-28 08:44:09 +03:00
parent 8e11c3da83
commit 2c47bc7e14
2 changed files with 2 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ func (b *Bot) AllowAuth(email, password string) bool {
return false
}
roomID, ok := b.GetMapping(utils.Mailbox(email))
roomID, ok := b.getMapping(utils.Mailbox(email))
if !ok {
return false
}

View File

@@ -97,6 +97,7 @@ func (b *Bot) setOption(ctx context.Context, name, value string) {
}
if name == roomOptionPassword {
value = b.parseCommand(evt.Content.AsMessage().Body, false)[1] // get original value, without forced lower case
value, err = argon2pw.GenerateSaltedHash(value)
if err != nil {
b.Error(ctx, evt.RoomID, "failed to hash password: %v", err)