From: lpsolit%gmail.com <> Date: Sun, 1 Nov 2009 19:51:35 +0000 (+0000) Subject: Bug 525025: Custom field names having UTF8-characters in them crash Bugzilla - Patch... X-Git-Tag: bugzilla-3.4.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62758960c70efb45fa84d6318be946805ff8eadd;p=thirdparty%2Fbugzilla.git Bug 525025: Custom field names having UTF8-characters in them crash Bugzilla - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index 1cc89239e6..04e048295e 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -272,7 +272,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_")