fix lowercase
This commit is contained in:
parent
8e11c3da83
commit
2c47bc7e14
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue