Don't allow rpc call on ModelStorage without ModelView

CVE-2012-0215
issue2476
review303001
This commit is contained in:
Cédric Krier
2012-03-28 19:02:41 +02:00
parent e7b1f97390
commit d059ebb792
2 changed files with 15 additions and 12 deletions
+1
View File
@@ -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
+14 -12
View File
@@ -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):