X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/c849a9f409e8b3cd5091dd8b674670850d7bd3b9..ea8c7a7e024e0574ce0d4f6e42f267256980fba4:/IkiWiki/Plugin/openid.pm diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index e3b9982f2..107c6adcb 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -104,7 +104,6 @@ sub formbuilder_setup (@) { size => 1, force => 1, fieldset => "login", comment => $session->param("name")); - $form->field(name => "email", type => "hidden"); } } @@ -119,7 +118,9 @@ sub validate ($$$;$) { my $claimed_identity = $csr->claimed_identity($openid_url); if (! $claimed_identity) { if ($errhandler) { - $errhandler->($csr->err); + if (ref($errhandler) eq 'CODE') { + $errhandler->($csr->err); + } return 0; } else { @@ -223,7 +224,7 @@ sub auth ($$) { } elsif (defined $q->param('openid_identifier')) { # myopenid.com affiliate support - validate($q, $session, $q->param('openid_identifier')); + validate($q, $session, scalar $q->param('openid_identifier')); } } @@ -238,10 +239,10 @@ sub getobj ($$) { my $ua; eval q{use LWPx::ParanoidAgent}; if (! $@) { - $ua=LWPx::ParanoidAgent->new; + $ua=LWPx::ParanoidAgent->new(agent => $config{useragent}); } else { - $ua=LWP::UserAgent->new; + $ua=useragent(); } # Store the secret in the session.