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:
Feanil Patel
2025-10-16 15:19:56 -04:00
parent 1ebe64db56
commit 28ab2ceb67
10 changed files with 1 additions and 151 deletions

View File

@@ -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):
"""

View File

@@ -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
""",