From 2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 12 Nov 2012 18:46:48 +0100 Subject: Bug 676844: Replace ThrowCodeError() by ThrowUserError() when the error is not triggered by the code itself r=glob a=LpSolit --- quips.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'quips.cgi') diff --git a/quips.cgi b/quips.cgi index 4ed40a547..bbe53c86e 100755 --- a/quips.cgi +++ b/quips.cgi @@ -123,8 +123,7 @@ if ($action eq "delete") { action => "delete", object => "quips"}); my $quipid = $cgi->param("quipid"); - ThrowCodeError("need_quipid") unless $quipid =~ /(\d+)/; - $quipid = $1; + detaint_natural($quipid) || ThrowUserError("need_quipid"); check_hash_token($token, ['quips', $quipid]); ($vars->{'deleted_quip'}) = $dbh->selectrow_array( -- cgit v1.2.3-24-g4f1b