Allow Math diagrams to be rendered without restriction on Wiki and Readme.MD
Similar to what we did for Mermaid diagrams, in #331076 (closed), we'll lift all restrictions on character limit for Math diagrams on Wiki and Readme.MD (file preview blob).
Summary
Current limitations on Math rendering is 1000 total characters per page OR 2000ms of runtime, whichever happens first, helps in preventing a DoS attack on all pages where we can render GFM.
This is non-ideal for pages like Wikis where
- There is no user-generated content.
- The math diagrams can quickly rack up
2000msof runtime or1000chars.
Security concerns
Since editing and creating a Wiki or Readme.md file requires a Developer or higher role, we can trust the actor to not abuse the uplifted limits.
Proposal
Maintain an allowlist of all the pages where we can trust the actor, and uplift all limits on the Math diagram blocks.
Allowlist:
- Wiki
- All repository markdown files
Edited by Gabe Weaver