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);
}
}
}
# 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},
);
} #}}}