Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exempt flatpages from the HTML restrictions #1431

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

Ninjaclasher
Copy link
Member

As bleach is only activated for flatpages that use the markdown.html and markdown_math.html templates, a staff could bypass the HTML restrictions by simply using another template (e.g default.html). Changing template names does not require any additional permissions.

I think someone who creates a flatpage would expect full HTML access by default, so disallowing full HTML access for all the flatpage templates doesn't seem like the correct move (of course, I could be wrong). If required, this PR could be modified to disallow full HTML access for all the templates.

As bleach is only activated for flatpages that use the `markdown.html`
and `markdown_math.html` templates, a staff could bypass the HTML
restrictions by simply using another template (e.g `default.html`).
Changing template names does not require any additional permissions.
@codecov-commenter
Copy link

Codecov Report

Merging #1431 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1431   +/-   ##
=======================================
  Coverage   38.44%   38.44%           
=======================================
  Files         201      201           
  Lines       11398    11398           
=======================================
  Hits         4382     4382           
  Misses       7016     7016           
Impacted Files Coverage Δ
dmoj/settings.py 97.61% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66403cc...e55706a. Read the comment docs.

Copy link
Member

@Xyene Xyene left a comment

Choose a reason for hiding this comment

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

This sounds appropriate to me, thanks!

@Xyene Xyene merged commit 7cf4481 into DMOJ:master Jun 6, 2020
@Ninjaclasher Ninjaclasher deleted the flatpage-html branch June 6, 2020 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants