Skip to content

mgr/cephadm: do not escape HTML for custom templates - #37411

Merged
jschmid1 merged 1 commit into
ceph:masterfrom
p-se:fix-cephadm-custom-template-escaping
Sep 30, 2020
Merged

jschmid1 merged 1 commit into
ceph:masterfrom
p-se:fix-cephadm-custom-template-escaping

Conversation

@p-se

@p-se p-se commented Sep 25, 2020

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/47648

Signed-off-by: Patrick Seidensal [email protected]

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

self.env = Environment(
loader=PackageLoader('cephadm', 'templates'),
autoescape=select_autoescape(['html', 'xml']),
autoescape=select_autoescape(['html', 'xml'], default_for_string=False),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just out of curiosity, why do we need select_autoescape(['html', 'xml']. cc @bk201 ?

@bk201 bk201 Sep 26, 2020 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code was taken from the official document, it's recommended for security reason for rendering web pages. I don't think we need it. Maybe removing these two extensions together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants