summaryrefslogtreecommitdiffstats
path: root/editsettings.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'editsettings.cgi')
-rwxr-xr-xeditsettings.cgi6
1 files changed, 2 insertions, 4 deletions
diff --git a/editsettings.cgi b/editsettings.cgi
index b5e810ba9..80a8921d5 100755
--- a/editsettings.cgi
+++ b/editsettings.cgi
@@ -54,11 +54,9 @@ sub SaveSettings{
my $old_value = $vars->{'settings'}->{$name}->{'default_value'};
my $enabled = defined $cgi->param("${name}-enabled") || 0;
my $value = $cgi->param("${name}");
+ my $setting = new Bugzilla::User::Setting($name);
- # remove taint
- if ($value =~ /^(\w+)$/ ) {
- $value = $1;
- }
+ $setting->validate_value($value);
if ( ($old_enabled != $enabled) ||
($old_value ne $value) ) {