$template->param(
wikiname => $config{wikiname},
# Intentionally using short field names to keep link short.
- authurl => IkiWiki::cgiurl_abs(
+ authurl => IkiWiki::cgiurl_abs_samescheme(
'e' => $email,
'v' => $token,
),
.">",
Subject => "$config{wikiname} login | $shorturl",
Message => $template->output,
- ) or error(gettext("Failed to send mail"));
+ ) or error(sprintf(gettext("Failed to send mail: %s"), $Mail::Sendmail::error));
$infodisplayer->(gettext("You have been sent an email, with a link you can open to complete the login process."));
}
my $session=shift;
eval q{use CGI::Session};
error($@) if $@;
- my $token = CGI::Session->new->id;
+ my $token = CGI::Session->new("driver:DB_File", undef, {FileName => "/dev/null"})->id;
IkiWiki::userinfo_set($email, "emailauthexpire", time+(60*60*24));
IkiWiki::userinfo_set($email, "emailauth", $token);
IkiWiki::userinfo_set($email, "emailauthpostsignin", defined $session->param("postsignin") ? $session->param("postsignin") : "");