aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-11-12 18:48:15 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-11-12 18:48:15 +0100
commit72755c5193d778152fda455454a87174ef0e42f6 (patch)
tree3046e29342935df95b4e634cdf17b6138492dfc6 /page.cgi
parentBug 808300: Requesting data for your own account using User.get should also r... (diff)
downloadbugzilla-72755c5193d778152fda455454a87174ef0e42f6.tar.gz
bugzilla-72755c5193d778152fda455454a87174ef0e42f6.tar.bz2
bugzilla-72755c5193d778152fda455454a87174ef0e42f6.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 e5192ab50..e042f5eb7 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 = (