Skip to content

Commit

Permalink
4.x: Update RestrictedPython to 5.4 to mitigate a security issue. (#…
Browse files Browse the repository at this point in the history
…1147)

Make linter happy: E721 do not compare types.
  • Loading branch information
icemac committed Aug 31, 2023
1 parent f5a21fe commit 403d5de
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://zope.readthedocs.io/en/2.13/CHANGES.html
4.8.9 (unreleased)
------------------

- Nothing changed yet.
- Update ``RestrictedPython`` to 5.4 to mitigate a security issue.


4.8.8 (2023-06-20)
Expand Down
5 changes: 3 additions & 2 deletions requirements-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Persistence==3.6
Products.BTreeFolder2==4.4
Products.ZCatalog==5.4
Record==3.6
RestrictedPython==5.3
RestrictedPython==5.4
WSGIProxy2==0.4.6; python_version == '2.7'
WSGIProxy2==0.4.6; python_version == '3.5'
WSGIProxy2==0.4.6; python_version == '3.6'
Expand Down Expand Up @@ -70,7 +70,8 @@ zope.cachedescriptors==4.4
zope.component==5.0.1
zope.componentvocabulary==2.3.0
zope.configuration==4.4.1
zope.container==4.10
zope.container==4.10; python_version < '3.7'
zope.container==5.1; python_version >= '3.7'
zope.contentprovider==4.2.1
zope.contenttype==4.6
zope.datetime==4.3.0
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/PropertyManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _wrapperCheck(self, object):

def _setPropValue(self, id, value):
self._wrapperCheck(value)
if type(value) == list:
if isinstance(value, list):
value = tuple(value)
setattr(self, id, value)

Expand Down
2 changes: 1 addition & 1 deletion src/OFS/PropertySheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def _updateProperty(self, id, value, meta=None):
props.append(prop)
pself._properties = tuple(props)

if type(value) == list:
if isinstance(value, list):
value = tuple(value)
setattr(self.v_self(), id, value)

Expand Down
10 changes: 9 additions & 1 deletion versions-prod.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Products.BTreeFolder2 = 4.4
Products.ZCatalog = 5.4
Record = 3.6
# RestrictedPython >= 6 no longer supports Zope 4
RestrictedPython = 5.3
RestrictedPython = 5.4
WSGIProxy2 = 0.5.1
WebOb = 1.8.7
WebTest = 3.0.0
Expand Down Expand Up @@ -143,3 +143,11 @@ PasteDeploy = 2.1.1
WSGIProxy2 = 0.4.6
# waitress 2.1 requires Python 3.7 or higher
waitress = 2.0.0

[versions:python37]
# Older versions have build problems
zope.container = 5.1

[versions:python38]
# Older versions have build problems
zope.container = 5.1

0 comments on commit 403d5de

Please sign in to comment.