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

CVE-2022-37620 & switch to htmlnano #2802

Open
kevbarns opened this issue Jan 8, 2024 · 8 comments
Open

CVE-2022-37620 & switch to htmlnano #2802

kevbarns opened this issue Jan 8, 2024 · 8 comments

Comments

@kevbarns
Copy link

kevbarns commented Jan 8, 2024

it appears the CVE-2022-37620 won't get fixed in the html-minify package, not maintained anymore as it appears, see kangax/html-minifier#1135

On alternative would be to switch to https://github.com/posthtml/htmlnano.

@iRyusa
Copy link
Member

iRyusa commented Jan 8, 2024

Might be a good alternative as its roughly the same size as html-minifier

@santialbo
Copy link

has anyone found a combination of htmlnano options and preset that works well everywhere?

I tried

  • minifyCss: false
  • preset "safe"

but emails are rending blank for some customers of us...

@santialbo
Copy link

has anyone found a combination of htmlnano options and preset that works well everywhere?

I tried

* minifyCss: false

* preset "safe"

but emails are rending blank for some customers of us...

fixed by posthtml/htmlnano#278

@spotlesscoder
Copy link

any updates on this?

@PeterJCLaw
Copy link

https://github.com/terser/html-minifier-terser might be another alternative. From my experience (one fairly small project, CLI usage only) the options are pretty much completely compatible, so making the move miiight be simpler than htmlnano.

@iRyusa
Copy link
Member

iRyusa commented May 14, 2024 via email

@iRyusa
Copy link
Member

iRyusa commented May 18, 2024 via email

@azuisleet
Copy link

The first call to mjmlto2html on the experimental branch seems to take a long time. It appears htmlnano is lazily loading a bunch of modules. The ANR stack trace I have shows htmlnano/minifyCss as the culprit, but I don't really know why since it's explicitly disabled:

https://github.com/mjmlio/mjml/blob/fix/replace-html-minifier/packages/mjml-core/src/index.js#L404

For now I'm warming this call on application start until I can investigate this further.

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

No branches or pull requests

6 participants