]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/emailauth.pm
New upstream version 3.20180105
[git.ikiwiki.info.git] / IkiWiki / Plugin / emailauth.pm
index 6674fe3d6b07b91ec9daf0d3276fa8936fc66378..44311400adeed3c0ccb65392859376d3de2725eb 100644 (file)
@@ -76,7 +76,7 @@ sub email_auth ($$$$) {
        $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,
                ),
@@ -148,7 +148,7 @@ sub gentoken ($$) {
        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") : "");