mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
user update -p without argument allowed
when not giving an argument (to avoid clear passwords in bash history) to "yunohost user update -p", now you are prompted for a password
This commit is contained in:
parent
e479b32674
commit
c2a730f26c
2 changed files with 6 additions and 1 deletions
|
@ -165,8 +165,11 @@ user:
|
||||||
full: --change-password
|
full: --change-password
|
||||||
help: New password to set
|
help: New password to set
|
||||||
metavar: PASSWORD
|
metavar: PASSWORD
|
||||||
|
nargs: "?"
|
||||||
|
const: 0
|
||||||
extra:
|
extra:
|
||||||
pattern: *pattern_password
|
pattern: *pattern_password
|
||||||
|
comment: good_practices_about_user_password
|
||||||
--add-mailforward:
|
--add-mailforward:
|
||||||
help: Mailforward addresses to add
|
help: Mailforward addresses to add
|
||||||
nargs: "*"
|
nargs: "*"
|
||||||
|
|
|
@ -325,7 +325,9 @@ def user_update(operation_logger, username, firstname=None, lastname=None, mail=
|
||||||
if lastname and firstname:
|
if lastname and firstname:
|
||||||
new_attr_dict['cn'] = new_attr_dict['displayName'] = [firstname + ' ' + lastname]
|
new_attr_dict['cn'] = new_attr_dict['displayName'] = [firstname + ' ' + lastname]
|
||||||
|
|
||||||
if change_password:
|
if change_password is not None:
|
||||||
|
if not change_password:
|
||||||
|
change_password = msignals.prompt(m18n.n("ask_password"), True, True)
|
||||||
# Ensure sufficiently complex password
|
# Ensure sufficiently complex password
|
||||||
assert_password_is_strong_enough("user", change_password)
|
assert_password_is_strong_enough("user", change_password)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue