summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-30 07:21:06 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-30 07:21:06 +0000
commit64ca9a921a537baaed8cead9923f24f267f1040a (patch)
tree6d509a488a9036d7bce8ec1b77ab69ecd428fb6b /IkiWiki
parent7945928cd11330d54ad29251ed2caee72ea092b1 (diff)
* Fix openid signin secret generation code. This fixes the bug that made
all openid signins fail the first time, and then succeed the second time.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/openid.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index f43c4db7f..4a7255069 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -140,13 +140,14 @@ sub getobj ($$) { #{{{
# Store the secret in the session.
my $secret=$session->param("openid_secret");
if (! defined $secret) {
- $secret=$session->param(openid_secret => time);
+ $secret=rand;
+ $session->param(openid_secret => $secret);
}
return Net::OpenID::Consumer->new(
ua => $ua,
args => $q,
- consumer_secret => $secret,
+ consumer_secret => sub { return shift()+$secret },
required_root => $config{cgiurl},
);
} #}}}