X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/912521ef0711204965aa2319d41c7741bd3f4f4c..29e6ff03b078a0c6abb659c9e81343d523d3b13a:/IkiWiki/Plugin/openid.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index f43c4db7f..5d387fbc6 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -59,7 +59,7 @@ sub formbuilder_setup (@) { #{{{ elsif ($form->title eq "preferences") { if (! defined $form->field(name => "name")) { $form->field(name => "OpenID", disabled => 1, value => - $session->param("name"), size => 30, force => 1); + $session->param("name"), size => 50, force => 1); } } } @@ -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}, ); } #}}}