summaryrefslogtreecommitdiffstats
path: root/editfields.cgi
diff options
context:
space:
mode:
authorolav%bkor.dhs.org <>2006-10-21 01:56:25 +0200
committerolav%bkor.dhs.org <>2006-10-21 01:56:25 +0200
commitc2f38f17cfa3aad8a13ee6eb02944b52d9e79037 (patch)
tree0ad5cc9691700db94e4f2df94e7a3ecdefc42c55 /editfields.cgi
parentea199cfceb3b847c3f136ebc91ca35643009c1c6 (diff)
downloadbugzilla-c2f38f17cfa3aad8a13ee6eb02944b52d9e79037.tar.gz
bugzilla-c2f38f17cfa3aad8a13ee6eb02944b52d9e79037.tar.xz
Bug 357005: 'cf_' should not be allowed as a custom field name
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk
Diffstat (limited to 'editfields.cgi')
-rw-r--r--editfields.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/editfields.cgi b/editfields.cgi
index a77aafe77..f7a059016 100644
--- a/editfields.cgi
+++ b/editfields.cgi
@@ -63,8 +63,8 @@ elsif ($action eq 'new') {
# Validate these fields.
$name || ThrowUserError('customfield_missing_name');
# Don't want to allow a name that might mess up SQL.
- $name =~ /^\w+$/ || ThrowUserError('customfield_invalid_name',
- { name => $name });
+ $name =~ /^\w+$/ && $name ne "cf_"
+ || ThrowUserError('customfield_invalid_name', { name => $name });
# Prepend cf_ to the custom field name to distinguish it from standard fields.
if ($name !~ /^cf_/) {
$name = 'cf_' . $name;