]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 525025: Custom field names having UTF8-characters in them crash Bugzilla - Patch...
authorlpsolit%gmail.com <>
Sun, 1 Nov 2009 19:51:35 +0000 (19:51 +0000)
committerlpsolit%gmail.com <>
Sun, 1 Nov 2009 19:51:35 +0000 (19:51 +0000)
Bugzilla/Field.pm

index 1cc89239e62b1e53b216e6fb6cf9b10305f2c26f..04e048295e37e207c7eea543374438e850fa6782 100644 (file)
@@ -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_")