Skip to content

feat: a possible better way to enter password#59

Open
stceum wants to merge 1 commit intoneucn:masterfrom
stceum:possibly_better_way_to_enter_passwd
Open

feat: a possible better way to enter password#59
stceum wants to merge 1 commit intoneucn:masterfrom
stceum:possibly_better_way_to_enter_passwd

Conversation

@stceum
Copy link
Contributor

@stceum stceum commented Oct 7, 2024

  • 一种可能更好的输入密码的方式。

    之前:(需要密码,该密码可能存在于 bash/zsh/... 历史记录中):

    $ ipgw config account add -u xxxxxxx -p xxx...xxx # 可能不安全

    现在:

    $ ipgw config account add -u xxxxxxx
    Enter Password: # 输入时不回显

  • A possible better way to enter password.

    previous (password is required which may exist in the bash/zsh/... history):

    $ ipgw config account add -u xxxxxxx -p xxx...xxx # Potentially unsafe

    current:

    $ ipgw config account add -u xxxxxxx
    Enter Password: # type in without echo

}

password := ctx.String("password")
if password == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果使用者用 set 只是想把账号设置成 default 而不涉及密码的话,这样处理是有问题的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我疏忽了这里🫢,有空我再改一下这里的逻辑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants