aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm5
-rw-r--r--IkiWiki/Plugin/notifyemail.pm2
-rw-r--r--IkiWiki/Plugin/passwordauth.pm2
-rw-r--r--debian/changelog1
4 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2a83777e6..f68797ae3 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -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;
diff --git a/IkiWiki/Plugin/notifyemail.pm b/IkiWiki/Plugin/notifyemail.pm
index 58f0c9920..9f5a255ae 100644
--- a/IkiWiki/Plugin/notifyemail.pm
+++ b/IkiWiki/Plugin/notifyemail.pm
@@ -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,
);
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm
index 6a5153efd..ac955dc50 100644
--- a/IkiWiki/Plugin/passwordauth.pm
+++ b/IkiWiki/Plugin/passwordauth.pm
@@ -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,
diff --git a/debian/changelog b/debian/changelog
index ca1f92116..23c6dc5e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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