Commit f148c8a8 authored by Leigh Stoller's avatar Leigh Stoller

Do not call out to addpubkey to regen the authkeys files, when the

user does not have a real account (frozen, unapproved, webonly, etc).
Thats a error condition for addpubkey, since it gets called as user
"nobody" and only certain operations are allowed as nobody, and regen
is not one of them!
parent 50a1bacd
......@@ -133,9 +133,14 @@ DBQueryFatal("delete from user_pubkeys ".
"where uid='$target_uid' and idx='$key'");
#
# update authkeys files and nodes.
# update authkeys files and nodes, but only if user has a real account.
# The -w option can only be used on real users, and deleting a key does
# not require anything by the outside script if not a real user; it
# will complain and die!
#
ADDPUBKEY($uid, "webaddpubkey -w $target_uid");
if (HASREALACCOUNT($target_uid)) {
ADDPUBKEY($uid, "webaddpubkey -w $target_uid");
}
header("Location: showpubkeys.php3?target_uid=$target_uid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment