summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-11-01 20:49:24 +0100
committerlpsolit%gmail.com <>2009-11-01 20:49:24 +0100
commit608b923a384298be20caae4ed22c0364db0f67f6 (patch)
treeef1314605fe3911763071787a5231cd00976f83a /Bugzilla/Field.pm
parent86e901444f9b940291014c77a00829a32be799b9 (diff)
downloadbugzilla-608b923a384298be20caae4ed22c0364db0f67f6.tar.gz
bugzilla-608b923a384298be20caae4ed22c0364db0f67f6.tar.xz
Bug 525025: Custom field names having UTF8-characters in them crash Bugzilla - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Field.pm')
-rw-r--r--Bugzilla/Field.pm2
1 files changed, 1 insertions, 1 deletions
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_")