2 # HTTP basic auth plugin.
3 package IkiWiki::Plugin::httpauth;
11 hook(type => "getsetup", id => "httpauth", call => \&getsetup);
12 hook(type => "auth", id => "httpauth", call => \&auth);
27 if (defined $cgi->remote_user()) {
28 my $user = $cgi->remote_user();
29 $session->param("name", $user);
30 eval IkiWiki::possibly_foolish_untaint($ENV{SSL_CLIENT_S_DN_CN});
31 my $realname = IkiWiki::userinfo_get($user, "realname");
32 if ((!defined $realname || $realname eq "") &&
33 defined $ENV{SSL_CLIENT_S_DN_CN}) {
34 IkiWiki::userinfo_set($user, "realname", $ENV{SSL_CLIENT_S_DN_CN});