IkiWiki::Plugin::openid: as a precaution, do not call non-coderefs

We're running under "use strict" here, so if CGI->param's array-context
misbehaviour passes an extra non-ref parameter, it shouldn't be executed
anyway... but it's as well to be safe.

[commit message added by smcv]
master
Amitai Schlair 2014-10-15 23:52:43 +01:00 committed by Simon McVittie
parent cfbcbda0ad
commit 09e7c1ad99
1 changed files with 3 additions and 1 deletions

View File

@ -119,7 +119,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 {