Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
74579a7a
Commit
74579a7a
authored
Apr 30, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in acquisition name check in cases where the name is not a string.
parent
74c40c12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
lib/python/DocumentTemplate/cDocumentTemplate.c
lib/python/DocumentTemplate/cDocumentTemplate.c
+11
-8
No files found.
lib/python/DocumentTemplate/cDocumentTemplate.c
View file @
74579a7a
...
...
@@ -84,7 +84,7 @@
****************************************************************************/
static
char
cDocumentTemplate_module_documentation
[]
=
""
"
\n
$Id: cDocumentTemplate.c,v 1.2
3 1999/04/28 16:29:22
jim Exp $"
"
\n
$Id: cDocumentTemplate.c,v 1.2
4 1999/04/30 19:01:58
jim Exp $"
;
#include "ExtensionClass.h"
...
...
@@ -866,12 +866,15 @@ validate(PyObject *self, PyObject *args)
UNLESS
(
PyArg_ParseTuple
(
args
,
"OOOOO"
,
&
inst
,
&
parent
,
&
name
,
&
value
,
&
md
))
return
NULL
;
UNLESS
(
cname
=
PyString_AsString
(
name
))
return
NULL
;
if
(
*
cname
==
'a'
&&
cname
[
1
]
==
'q'
&&
cname
[
2
]
==
'_'
&&
strcmp
(
cname
,
"aq_explicit"
)
&&
strcmp
(
cname
,
"aq_parent"
))
/* We disallow names beginning with "aq_" unless they are
aq_parent or aq_explicit */
return
PyInt_FromLong
(
0
);
if
(
PyString_Check
(
name
))
{
UNLESS
(
cname
=
PyString_AsString
(
name
))
return
NULL
;
if
(
*
cname
==
'a'
&&
cname
[
1
]
==
'q'
&&
cname
[
2
]
==
'_'
&&
strcmp
(
cname
,
"aq_explicit"
)
&&
strcmp
(
cname
,
"aq_parent"
))
/* We disallow names beginning with "aq_" unless they are
aq_parent or aq_explicit */
return
PyInt_FromLong
(
0
);
}
/*
if hasattr(value, '__roles__'): roles=value.__roles__
...
...
@@ -1022,7 +1025,7 @@ void
initcDocumentTemplate
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.2
3
$"
;
char
*
rev
=
"$Revision: 1.2
4
$"
;
PURE_MIXIN_CLASS
(
cDocument
,
"Base class for documents that adds fast validation method"
,
Document_methods
);
...
...
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