[IMP] bundles: display warning for forbidden local @imports

This commit is contained in:
Fabien Meghazi
2014-08-14 17:27:50 +02:00
parent e7ac9c46c5
commit 20ea65f9f6
+3
View File
@@ -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)