X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=update.cgi;h=1ff3d004cb6e97298773c6f6cacecdb14610a5e5;hb=c4f7f37b019553aabda9ae50d88c71d7ac7cf5e5;hp=ddb8052be31984a74df35d58128d01b357e2fc4f;hpb=2833afc99423e6cc0abe0fa6d0fafbf9275c8f2d;p=mirror%2Fuserdir-ldap-cgi.git
diff --git a/update.cgi b/update.cgi
index ddb8052..1ff3d00 100755
--- a/update.cgi
+++ b/update.cgi
@@ -25,8 +25,16 @@ my $proto = ($ENV{HTTPS} ? "https" : "http");
my $id = $query->param('id');
my $authtoken = $query->param('authtoken');
-my $password = &Util::CheckAuthToken($authtoken);
-my $editdn = $query->param('editdn');
+
+my $password = undef;
+
+if ($authtoken || $id) {
+ $password = Util::TouchAuthToken($authtoken, $id);
+} else {
+ $password = '';
+ $id = '';
+ $authtoken = '';
+}
if ($proto eq "http" || !($id && $password)) {
print "Location: https://$ENV{SERVER_NAME}/$config{webloginhtml}\n\n";
@@ -45,6 +53,7 @@ sub DieHandler {
}
#$SIG{__DIE__} = \&DieHandler;
+my $editdn = "uid=$id,$config{basedn}";
$ldap = Net::LDAP->new($config{ldaphost});
&Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False';
@@ -173,7 +182,7 @@ if (!($query->param('doupdate'))) {
}
};
if ($confirmstring ne '') {
- $confirmstring = "
To confirm your new sudo passwords send signed mail to changes\@db.debian.org with a signed body containing these lines:
$confirmstring"; + $confirmstring = "
$confirmstring"; } my $sudopasswordhosts = '