From 64ca9a921a537baaed8cead9923f24f267f1040a Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 30 Jan 2007 07:21:06 +0000 Subject: * 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. --- IkiWiki/Plugin/openid.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/openid.pm') 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}, ); } #}}} -- cgit v1.2.3