Skip to content

Update gitbook and bs4_book templates to use latest version of MathJax 2.7 from cdnjs - #1355

Merged
yihui merged 2 commits into
rstudio:mainfrom
scarnecchia:main
Jun 30, 2022
Merged

yihui merged 2 commits into
rstudio:mainfrom
scarnecchia:main

Conversation

@scarnecchia

Copy link
Copy Markdown
Contributor

This PR implements the changes discussed in #1354 by updating the source for MathJax in inst/templates/bs4_book.html and inst/templates/github.html to use cloudflare's cdnjs latest for 2.7. This closes an XSS vulnerability (CVE-2018-1999024) found in versions of MathJax in version's earlier than 2.7.4.

I tested this using a couple of input files I had lying around and I can confirm that the version is now MathJax 2.7.9 and that latex is rendering correctly. I did not see an explicit test for math in the test folder. I'd be happy to add one, but not sure I'll get to it today.

@yihui yihui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I noticed that the mode of three files was changed from 644 to 755. Do you know how to revert it?

@CLAassistant

CLAassistant commented Jun 30, 2022 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@scarnecchia

Copy link
Copy Markdown
Contributor Author

Hi @yihui : I've resolved that issue. File mode should be 644 again (and I've updated my git config to prevent that from happening in the future)

@yihui yihui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great! We will use https://mathjax.rstudio.com/latest/ again once if actually points to the latest 2.x version. Thank you very much!

@yihui
yihui merged commit f484d4c into rstudio:main Jun 30, 2022
@cderv cderv linked an issue Aug 24, 2022 that may be closed by this pull request
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[FR] Update MathJax src in gitbook template to latest version of 2.7

3 participants