File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/Products/SQLAlchemyDA Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Change log
442.2 (unreleased)
55----------------
66
7+ - Add missing security declarations on the database adapter class
8+ to mitigate arbitrary SQL query execution vulnerability.
9+
710- Add support for Python 3.12.
811
912
Original file line number Diff line number Diff line change 1313
1414from AccessControl import ClassSecurityInfo
1515from AccessControl .class_init import InitializeClass
16+ from AccessControl .Permissions import change_database_connections
1617from AccessControl .Permissions import view_management_screens
1718from OFS .PropertyManager import PropertyManager
1819from OFS .SimpleItem import SimpleItem
@@ -295,6 +296,7 @@ def engine_options(self):
295296 engine_options = dict (self .extra_engine_options )
296297 return engine_options
297298
299+ @security .protected (change_database_connections )
298300 def add_extra_engine_options (self , engine_options ):
299301 """ engine_options is a tuple containing additional
300302 options for sqlalchemy.create_engine.
@@ -346,6 +348,7 @@ def _typesMap(self, proxy):
346348 self ._v_types_map = map
347349 return self ._v_types_map
348350
351+ @security .private
349352 def query (self , query_string , max_rows = None , query_data = None ):
350353 """ *The* query() method as used by the internal ZSQL
351354 machinery.
You can’t perform that action at this time.
0 commit comments