如何修复html-pdf节点模块任意文件读取漏洞?

问题描述 投票:0回答:1

我想将html转换为pdf文档。使用html-pdf npm模块,其中包含漏洞。https://snyk.io/vuln/SNYK-JS-HTMLPDF-467248

请提出替代解决方案。

node.js security npm html-pdf node-html-pdf
1个回答
0
投票

[pdf有json。 https://www.npmjs.com/package/pdfkit非常受欢迎。您必须将现有模板从html转换为json,但它可以工作。

此外,您也可以使用config提供phantomjs参数

phantomArgs: ['--local-url-access=false']

Full details

© www.soinside.com 2019 - 2024. All rights reserved.