Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
c2f38f17
Commit
c2f38f17
authored
Oct 20, 2006
by
olav%bkor.dhs.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 357005: 'cf_' should not be allowed as a custom field name
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk
parent
ea199cfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
editfields.cgi
editfields.cgi
+2
-2
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+2
-1
No files found.
editfields.cgi
View file @
c2f38f17
...
...
@@ -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
;
...
...
template/en/default/global/user-error.html.tmpl
View file @
c2f38f17
...
...
@@ -319,7 +319,8 @@
[% ELSIF error == "customfield_invalid_name" %]
[% title = "Invalid Custom Field Name" %]
'[% name FILTER html %]' is not a valid name for a custom field.
A name may contain only letters, numbers, and the underscore character.
A name may contain only letters, numbers, and the underscore character. The
name should also be different from 'cf_'.
[% ELSIF error == "customfield_nonexistent" %]
[% title = "Unknown Custom Field" %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment