0ef333f8ea
* core: bump bandit from 1.7.4 to 1.7.5 Bumps [bandit](https://github.com/PyCQA/bandit) from 1.7.4 to 1.7.5. - [Release notes](https://github.com/PyCQA/bandit/releases) - [Commits](https://github.com/PyCQA/bandit/compare/1.7.4...1.7.5) --- updated-dependencies: - dependency-name: bandit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
13 lines
303 B
Python
13 lines
303 B
Python
"""XML Utilities"""
|
|
from lxml.etree import XMLParser, fromstring # nosec
|
|
|
|
|
|
def get_lxml_parser():
|
|
"""Get XML parser"""
|
|
return XMLParser(resolve_entities=False)
|
|
|
|
|
|
def lxml_from_string(text: str):
|
|
"""Wrapper around fromstring"""
|
|
return fromstring(text, parser=get_lxml_parser()) # nosec
|