fix lowercase
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user