Skip to content

Commit

Permalink
Restrict XSLT permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Mar 10, 2023
1 parent ad1a82f commit d083b56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/publish/nunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from publish.junit import JUnitTree, ParsedJUnitFile, progress_safe_parse_xml_file, xml_has_root_element

with (pathlib.Path(__file__).resolve().parent / 'xslt' / 'nunit3-to-junit.xslt').open('r', encoding='utf-8') as r:
transform_nunit_to_junit = etree.XSLT(etree.parse(r))
transform_nunit_to_junit = etree.XSLT(etree.parse(r), regexp=False, access_control=etree.XSLTAccessControl.DENY_ALL)


def is_nunit(path: str) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion python/publish/trx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from publish.junit import JUnitTree, ParsedJUnitFile, progress_safe_parse_xml_file, xml_has_root_element

with (pathlib.Path(__file__).resolve().parent / 'xslt' / 'trx-to-junit.xslt').open('r', encoding='utf-8') as r:
transform_trx_to_junit = etree.XSLT(etree.parse(r))
transform_trx_to_junit = etree.XSLT(etree.parse(r), regexp=False, access_control=etree.XSLTAccessControl.DENY_ALL)


def is_trx(path: str) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion python/publish/xunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from publish.junit import JUnitTree, ParsedJUnitFile, progress_safe_parse_xml_file, xml_has_root_element

with (pathlib.Path(__file__).resolve().parent / 'xslt' / 'xunit-to-junit.xslt').open('r', encoding='utf-8') as r:
transform_xunit_to_junit = etree.XSLT(etree.parse(r))
transform_xunit_to_junit = etree.XSLT(etree.parse(r), regexp=False, access_control=etree.XSLTAccessControl.DENY_ALL)


def is_xunit(path: str) -> bool:
Expand Down

0 comments on commit d083b56

Please sign in to comment.