Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5181b778
Commit
5181b778
authored
Mar 28, 2016
by
Leigh B Stoller
Browse files
Restore the code that sets the passphrase on the user's encrypted ssl key.
parent
c1611f20
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/aptui/myaccount.ajax
View file @
5181b778
...
...
@@ -230,6 +230,7 @@ function Do_Update()
return
;
}
$formfields
=
$ajax_args
[
"formfields"
];
$target_uid
=
$target_user
->
uid
();
$args
=
array
();
$errors
=
array
();
...
...
@@ -247,13 +248,26 @@ function Do_Update()
SPITAJAX_ERROR
(
2
,
$errors
);
return
;
}
if
(
isset
(
$formfields
[
"password1"
])
&&
$formfields
[
"password1"
]
!=
""
)
{
# Change the passphrase on the SSL key.
$safe_password
=
escapeshellarg
(
$formfields
[
"password1"
]);
# Do not send email, mkusercert sends email and hides the password.
$retval
=
SUEXEC
(
$target_uid
,
"nobody"
,
"webmkusercert -C -p
$safe_password
$target_uid
"
,
SUEXEC_ACTION_IGNORE
);
if
(
$retval
)
{
SPITAJAX_ERROR
(
-
1
,
"Could not reset password on SSL private key"
);
return
;
}
}
#
# The user can change their email on this pass, but the backend
# does not allow that, so have to call tbacct directly with an
# extra option to tell it to skip the admin check.
#
if
(
$formfields
[
"email"
]
!=
$target_user
->
email
())
{
$target_uid
=
$target_user
->
uid
();
$safe_email
=
$formfields
[
"email"
];
if
(
!
HASREALACCOUNT
(
$target_uid
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment