fix: Drop other references to studiofrontend.
Drop tooling to load studio-frontend components into mako templates and XSS testing features related to it.
This commit is contained in:
@@ -1244,22 +1244,16 @@ class TestMakoTemplateLinter(TestLinter):
|
||||
${x | h}
|
||||
</%static:require_module>
|
||||
${x | h}
|
||||
<%static:studiofrontend page="${x}">
|
||||
${x | h}
|
||||
</%static:studiofrontend>
|
||||
${x | h}
|
||||
""")
|
||||
|
||||
linter._check_mako_file_is_safe(mako_template, results)
|
||||
|
||||
assert len(results.violations) == 7
|
||||
assert len(results.violations) == 5
|
||||
assert results.violations[0].rule == MAKO_LINTER_RULESET.mako_unwanted_html_filter
|
||||
assert results.violations[1].rule == MAKO_LINTER_RULESET.mako_invalid_js_filter
|
||||
assert results.violations[2].rule == MAKO_LINTER_RULESET.mako_unwanted_html_filter
|
||||
assert results.violations[3].rule == MAKO_LINTER_RULESET.mako_invalid_js_filter
|
||||
assert results.violations[4].rule == MAKO_LINTER_RULESET.mako_unwanted_html_filter
|
||||
assert results.violations[5].rule == MAKO_LINTER_RULESET.mako_invalid_js_filter
|
||||
assert results.violations[6].rule == MAKO_LINTER_RULESET.mako_unwanted_html_filter
|
||||
|
||||
def test_check_mako_expressions_javascript_strings(self):
|
||||
"""
|
||||
|
||||
@@ -1359,8 +1359,6 @@ class MakoTemplateLinter(BaseLinter):
|
||||
</%static:require_module(_async)?> | # require js script tag end (optionally the _async version)
|
||||
<%static:webpack.*(?<!/)> | # webpack script tag start
|
||||
</%static:webpack> | # webpack script tag end
|
||||
<%static:studiofrontend.*?(?<!/)> | # studiofrontend script tag start
|
||||
</%static:studiofrontend> | # studiofrontend script tag end
|
||||
<%block[ ]*name=['"]requirejs['"]\w*(?<!/)> | # require js tag start
|
||||
</%block> # require js tag end
|
||||
""",
|
||||
|
||||
Reference in New Issue
Block a user