* Fix openid signin secret generation code. This fixes the bug that made
[ikiwiki.git] / IkiWiki / Plugin / openid.pm
index f43c4db7ffc8806f1ba09e79c6d09757f6aa8484..4a7255069928c7d2b3bafb23730f7ef4783462c1 100644 (file)
@@ -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},
        );
 } #}}}