[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/_proxy.c Merged
from ZopeX3-3.0 branch 26077 & 26078
Jim Fulton
jim at zope.com
Tue Jul 6 15:12:08 EDT 2004
Log message for revision 26129:
Merged from ZopeX3-3.0 branch 26077 & 26078
Added a sanity check to make sure that None isn't passed as a checker.
-=-
Modified: Zope3/trunk/src/zope/security/_proxy.c
===================================================================
--- Zope3/trunk/src/zope/security/_proxy.c 2004-07-06 19:03:40 UTC (rev 26128)
+++ Zope3/trunk/src/zope/security/_proxy.c 2004-07-06 19:12:08 UTC (rev 26129)
@@ -259,6 +259,13 @@
"OO:_Proxy.__new__", kwlist,
&object, &checker))
return NULL;
+
+ if (checker == Py_None)
+ {
+ PyErr_SetString(PyExc_ValueError, "None passed as proxy checker");
+ return NULL;
+ }
+
self = (SecurityProxy *)type->tp_alloc(type, 0);
if (self == NULL)
return NULL;
More information about the Zope3-Checkins
mailing list