Don't allow rpc call on ModelStorage without ModelView
CVE-2012-0215 issue2476 review303001
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Don't allow rpc call on ModelStorage without ModelView (CVE-2012-0215)
|
||||
* Add shared WebDAV
|
||||
* Remove workflow module
|
||||
* Simplify workflow engine
|
||||
|
||||
@@ -26,6 +26,7 @@ from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.cache import LRUDict
|
||||
from trytond.config import CONFIG
|
||||
from .modelview import ModelView
|
||||
|
||||
|
||||
class ModelStorage(Model):
|
||||
@@ -42,18 +43,19 @@ class ModelStorage(Model):
|
||||
|
||||
def __init__(self):
|
||||
super(ModelStorage, self).__init__()
|
||||
self._rpc.update({
|
||||
'create': True,
|
||||
'read': False,
|
||||
'write': True,
|
||||
'delete': True,
|
||||
'copy': True,
|
||||
'search': False,
|
||||
'search_count': False,
|
||||
'search_read': False,
|
||||
'export_data': False,
|
||||
'import_data': True,
|
||||
})
|
||||
if isinstance(self, ModelView):
|
||||
self._rpc.update({
|
||||
'create': True,
|
||||
'read': False,
|
||||
'write': True,
|
||||
'delete': True,
|
||||
'copy': True,
|
||||
'search': False,
|
||||
'search_count': False,
|
||||
'search_read': False,
|
||||
'export_data': False,
|
||||
'import_data': True,
|
||||
})
|
||||
self._constraints = []
|
||||
|
||||
def default_create_uid(self):
|
||||
|
||||
Reference in New Issue
Block a user