mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
change "mox setaccountpassword" to use an account name as parameter, not email address
because with the name you would expect an account name. and the email-resolving behaviour is surprising: with wildcard addresses you can use any address, including a typo. you would change the password of the address with the wildcard, without any warning. accounts are more precise and less error-prone. for issue #68 by x8x
This commit is contained in:
6
ctl.go
6
ctl.go
@ -355,15 +355,15 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
|
||||
case "setaccountpassword":
|
||||
/* protocol:
|
||||
> "setaccountpassword"
|
||||
> address
|
||||
> account
|
||||
> password
|
||||
< "ok" or error
|
||||
*/
|
||||
|
||||
addr := ctl.xread()
|
||||
account := ctl.xread()
|
||||
pw := ctl.xread()
|
||||
|
||||
acc, _, err := store.OpenEmail(addr)
|
||||
acc, err := store.OpenAccount(account)
|
||||
ctl.xcheck(err, "open account")
|
||||
defer func() {
|
||||
if acc != nil {
|
||||
|
Reference in New Issue
Block a user