Bug 346091: editparams.cgi should validate the 'timezone' parameter - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit a=justdave

git-svn-id: svn://10.0.0.236/trunk@215272 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com 2006-11-14 20:45:48 +00:00
parent 59436c2837
commit 728fe40c1c
2 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,7 @@ package Bugzilla::Config::Common;
use strict;
use Socket;
use Time::Zone;
use Bugzilla::Util;
use Bugzilla::Constants;
@ -47,6 +48,7 @@ use base qw(Exporter);
check_opsys check_shadowdb check_urlbase check_webdotbase
check_netmask check_user_verify_class check_image_converter
check_languages check_mail_delivery_method check_notification
check_timezone
);
# Checking functions for the various values
@ -310,6 +312,14 @@ sub check_notification {
return "";
}
sub check_timezone {
my $tz = shift;
unless (tz_offset($tz)) {
return "must be empty or a legal timezone name, such as PDT or JST";
}
return "";
}
# OK, here are the parameter definitions themselves.
#

View File

@ -91,6 +91,7 @@ sub get_param_list {
name => 'timezone',
type => 't',
default => '',
checker => \&check_timezone
},
{