projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7ac9c4
)
[IMP] bundles: display warning for forbidden local @imports
author
Fabien Meghazi
<fme@openerp.com>
Thu, 14 Aug 2014 15:27:50 +0000
(17:27 +0200)
committer
Fabien Meghazi
<fme@openerp.com>
Thu, 14 Aug 2014 15:27:50 +0000
(17:27 +0200)
openerp/addons/base/ir/ir_qweb.py
patch
|
blob
|
history
diff --git
a/openerp/addons/base/ir/ir_qweb.py
b/openerp/addons/base/ir/ir_qweb.py
index
48782a9
..
118d98c
100644
(file)
--- a/
openerp/addons/base/ir/ir_qweb.py
+++ b/
openerp/addons/base/ir/ir_qweb.py
@@
-1195,6
+1195,9
@@
class AssetsBundle(object):
if '.' not in ref and line not in imports and not ref.startswith(('.', '/', '~')):
imports.append(line)
return line
+ msg = "Local import '%s' is forbidden for security reasons." % ref
+ _logger.warning(msg)
+ self.css_errors.append(msg)
return ''
source = re.sub(self.rx_preprocess_imports, sanitize, source)