diff options
author | travis%sedsystems.ca <> | 2005-03-02 03:34:25 +0100 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-03-02 03:34:25 +0100 |
commit | 70486766bd51504b7e96a8a3cf726f31d3a77f78 (patch) | |
tree | 847e06f26f40f0bc2707962d1ff9349b58f8ff31 /editflagtypes.cgi | |
parent | 62383feb65362bffbfd660e0ba8fe616d213b405 (diff) | |
download | bugzilla-70486766bd51504b7e96a8a3cf726f31d3a77f78.tar.gz bugzilla-70486766bd51504b7e96a8a3cf726f31d3a77f78.tar.xz |
Bug 238802 : Input filter for integer sort key gives bad error output
Patch by Frederic Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'editflagtypes.cgi')
-rwxr-xr-x | editflagtypes.cgi | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi index c28fda4ba..9c14219d2 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -445,8 +445,10 @@ sub deactivate { ################################################################################ sub validateID { + # $::FORM{'id'} is destroyed if detaint_natural fails. + my $flagtype_id = $::FORM{'id'}; detaint_natural($::FORM{'id'}) - || ThrowCodeError("flag_type_id_invalid", { id => $::FORM{'id'} }); + || ThrowCodeError("flag_type_id_invalid", { id => $flagtype_id }); SendSQL("SELECT 1 FROM flagtypes WHERE id = $::FORM{'id'}"); FetchOneColumn() @@ -499,10 +501,12 @@ sub validateComponent { } sub validateSortKey { + # $::FORM{'sortkey'} is destroyed if detaint_natural fails. + my $sortkey = $::FORM{'sortkey'}; detaint_natural($::FORM{'sortkey'}) && $::FORM{'sortkey'} < 32768 || ThrowUserError("flag_type_sortkey_invalid", - { sortkey => $::FORM{'sortkey'} }); + { sortkey => $sortkey }); } sub validateTargetType { |