passwordauth: Fix url in password recovery email to be absolute.
This got broken when cgiurl began often returning a relative url. Added a cgiurl_abs for the things that need a guaranteed absolute cgiurl.master
parent
1d1ef20034
commit
f9e96b0c32
|
@ -1092,6 +1092,11 @@ sub cgiurl (@) {
|
|||
join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params);
|
||||
}
|
||||
|
||||
sub cgiurl_abs (@) {
|
||||
eval q{use URI};
|
||||
URI->new_abs(cgiurl(@_), $config{cgiurl});
|
||||
}
|
||||
|
||||
sub baseurl (;$) {
|
||||
my $page=shift;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ sub notify (@) {
|
|||
$template->param(
|
||||
wikiname => $config{wikiname},
|
||||
url => $url,
|
||||
prefsurl => $config{cgiurl}."?do=prefs",
|
||||
prefsurl => IkiWiki::cgiurl_abs(do => 'prefs'),
|
||||
showcontent => $showcontent,
|
||||
content => $content,
|
||||
);
|
||||
|
|
|
@ -296,7 +296,7 @@ sub formbuilder (@) {
|
|||
my $template=template("passwordmail.tmpl");
|
||||
$template->param(
|
||||
user_name => $user_name,
|
||||
passwordurl => IkiWiki::cgiurl(
|
||||
passwordurl => IkiWiki::cgiurl_abs(
|
||||
'do' => "reset",
|
||||
'name' => $user_name,
|
||||
'token' => $token,
|
||||
|
|
|
@ -11,6 +11,7 @@ ikiwiki (3.20120204) UNRELEASED; urgency=low
|
|||
the old hook name is called for now for back-compat.
|
||||
* meta: Support keywords header. Closes: #664780
|
||||
Thanks, Martin Michlmayr
|
||||
* passwordauth: Fix url in password recovery email to be absolute.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 21 Mar 2012 14:33:14 -0400
|
||||
|
||||
|
|
Loading…
Reference in New Issue