From 608b923a384298be20caae4ed22c0364db0f67f6 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 1 Nov 2009 19:49:24 +0000 Subject: Bug 525025: Custom field names having UTF8-characters in them crash Bugzilla - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Field.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/Field.pm') diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index 077c67e20..7b1569c52 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -273,7 +273,7 @@ sub _check_name { my $name_regex = qr/^[\w\.]+$/; # Custom fields have more restrictive name requirements than # standard fields. - $name_regex = qr/^\w+$/ if $is_custom; + $name_regex = qr/^[a-zA-Z0-9_]+$/ if $is_custom; # Custom fields can't be named just "cf_", and there is no normal # field named just "cf_". ($name =~ $name_regex && $name ne "cf_") -- cgit v1.2.3-24-g4f1b