aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2017-05-14 15:06:01 +0100
committerSimon McVittie <smcv@debian.org>2017-05-14 15:39:21 +0100
commit60cb2ac458dc8dea3b6a72abe52dcb1cd05617a4 (patch)
treed183ea54c82b4d97e1a78fbe845e387d1dd7d5b1
parent26ded176534a56ff93c464785aa446fb2f8c3cf7 (diff)
downloadikiwiki-60cb2ac458dc8dea3b6a72abe52dcb1cd05617a4.tar
ikiwiki-60cb2ac458dc8dea3b6a72abe52dcb1cd05617a4.tar.gz
cgierror: When the CGI fails, print the error to stderr, not "Died"
$@ could be clobbered by the "exception handler", and in practice it seems that it is. This can be seen on stderr of t/git-cgi.t.
-rw-r--r--IkiWiki/CGI.pm3
-rw-r--r--debian/changelog1
2 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index d20a75923..f1eb31d97 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -490,7 +490,8 @@ sub cgierror ($) {
print "Content-type: text/html\n\n";
print cgitemplate(undef, gettext("Error"),
"<p class=\"error\">".gettext("Error").": $message</p>");
- die $@;
+
+ die $message;
}
1
diff --git a/debian/changelog b/debian/changelog
index 005c811d3..a92e3711e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ikiwiki (3.20170112) UNRELEASED; urgency=medium
* Guard against set-but-empty REMOTE_USER CGI variable on
misconfigured nginx servers, and in general treat sessions with
a set-but-empty name as if they were not signed in.
+ * When the CGI fails, print the error to stderr, not "Died"
-- Simon McVittie <smcv@debian.org> Sun, 14 May 2017 15:34:52 +0100