From bdaaf0aefe30c5cdcf97c64fa97d471e2eedbccb Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 19 Sep 2013 21:46:35 -0700 Subject: [PATCH] Handle case where validation command produces no output http://virtualmin.com/node/29763 --- useradmin/lang/en | 1 + useradmin/user-lib.pl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/useradmin/lang/en b/useradmin/lang/en index 8f728048f..a0aa488a0 100644 --- a/useradmin/lang/en +++ b/useradmin/lang/en @@ -177,6 +177,7 @@ usave_epasswd_re=Password does not match regexp $1 usave_epasswd_dict=Password is a dictionary word usave_epasswd_same=Password contains or is the same as username usave_epasswd_mindays=Password was changed less than $1 days ago +usave_epasswd_cmd=Password validation command failed usave_eothers=The user was successfully saved, but an error occured in another module : $1 gedit_title=Edit Group diff --git a/useradmin/user-lib.pl b/useradmin/user-lib.pl index 7e3ce19d1..06294373c 100755 --- a/useradmin/user-lib.pl +++ b/useradmin/user-lib.pl @@ -1560,7 +1560,7 @@ if ($config{'passwd_prog'}) { $out = &backquote_command("$config{'passwd_prog'} <$temp 2>&1"); } if ($?) { - return $out; + return $out || $text{'usave_epasswd_cmd'}; } } if ($config{'passwd_mindays'} && $uinfo ne "none") {