aboutsummaryrefslogtreecommitdiffstats
path: root/page.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-11-12 18:46:48 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-11-12 18:46:48 +0100
commit2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461 (patch)
tree0267c67f18e8099384bc7ae15f58a4459ed71f63 /page.cgi
parent34a9d58c4ab24390a21595edc08442651cfbe312 (diff)
downloadbugs-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar
bugs-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar.gz
bugs-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar.bz2
bugs-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar.xz
bugs-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.zip
Bug 676844: Replace ThrowCodeError() by ThrowUserError() when the error is not triggered by the code itself
r=glob a=LpSolit
Diffstat (limited to 'page.cgi')
-rwxr-xr-xpage.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/page.cgi b/page.cgi
index be0dcd7ff..a2aa9d883 100755
--- a/page.cgi
+++ b/page.cgi
@@ -54,13 +54,13 @@ if ($id) {
# Be careful not to allow directory traversal.
if ($id =~ /\.\./) {
# two dots in a row is bad
- ThrowCodeError("bad_page_cgi_id", { "page_id" => $id });
+ ThrowUserError("bad_page_cgi_id", { "page_id" => $id });
}
# Split into name and ctype.
$id =~ /^([\w\-\/\.]+)\.(\w+)$/;
if (!$2) {
# if this regexp fails to match completely, something bad came in
- ThrowCodeError("bad_page_cgi_id", { "page_id" => $id });
+ ThrowUserError("bad_page_cgi_id", { "page_id" => $id });
}
my %vars = (