diff options
author | Frédéric Buclin <LpSolit@netscape.net> | 2017-02-24 18:31:30 +0100 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2017-02-24 23:21:29 +0100 |
commit | 10841ca8e2ab3824db98113f7149b7743f98645a (patch) | |
tree | 38e07d176a7a34c67ea683a4e62263dc50b7699d /USER | |
parent | 223eb12f03a0d778f18891d29d83ae2e99e42b84 (diff) | |
download | userdrake-10841ca8e2ab3824db98113f7149b7743f98645a.tar userdrake-10841ca8e2ab3824db98113f7149b7743f98645a.tar.gz userdrake-10841ca8e2ab3824db98113f7149b7743f98645a.tar.bz2 userdrake-10841ca8e2ab3824db98113f7149b7743f98645a.tar.xz userdrake-10841ca8e2ab3824db98113f7149b7743f98645a.zip |
Do not encrypt the empty password (mga#19318)
Diffstat (limited to 'USER')
-rw-r--r-- | USER/USER.xs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/USER/USER.xs b/USER/USER.xs index bb11612..086580b 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -206,7 +206,8 @@ Admin_UserSetPass(self, ent, userPasswd) char *userPasswd PPCODE: USER__ERR *error = NULL; - gboolean crypted = FALSE; + /* If no password is set, do not encrypt the empty string. (mga#19318) */ + gboolean crypted = (strlen(userPasswd) == 0) ? TRUE : FALSE; if (lu_user_setpass(self, ent, userPasswd, crypted, &error) == FALSE) { croak(_("Failed to set password: '%s'.\n"), error ? error->string : _("unknown error")); if (error) { lu_error_free(&error); } |