]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/httpauth.pm
Don't use --noprefix for the patch
[git.ikiwiki.info.git] / IkiWiki / Plugin / httpauth.pm
index 76d574b2a899df7e77cb71f2a4f27ee078e76b43..041eaebc93054029c0477d5c6d710b7691ef57b5 100644 (file)
@@ -66,7 +66,7 @@ sub auth ($$) {
        my $cgi=shift;
        my $session=shift;
 
-       if (defined $cgi->remote_user()) {
+       if (length $cgi->remote_user()) {
                $session->param("name", $cgi->remote_user());
        }
 }
@@ -80,7 +80,7 @@ sub formbuilder_setup (@) {
        my $buttons=$params{buttons};
 
        if ($form->title eq "signin" &&
-           ! defined $cgi->remote_user() && defined $config{cgiauthurl}) {
+           ! length $cgi->remote_user() && defined $config{cgiauthurl}) {
                my $button_text="Login with HTTP auth";
                push @$buttons, $button_text;
 
@@ -97,7 +97,7 @@ sub canedit ($$$) {
        my $cgi=shift;
        my $session=shift;
 
-       if (! defined $cgi->remote_user() &&
+       if (! length $cgi->remote_user() &&
            (! defined $session->param("name") ||
              ! IkiWiki::userinfo_get($session->param("name"), "regdate")) &&
            defined $config{httpauth_pagespec} &&