Skip to content

Commit c5e53b8

Browse files
authoredFeb 19, 2024··
doc: add revert doc (#5296)
1 parent 15fb67b commit c5e53b8

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
 

‎site/docs/core/security.md

+18
Original file line numberDiff line numberDiff line change
@@ -668,3 +668,21 @@ This function scans the script tag in the template and automatically adds `nonce
668668
For sites that do not open HTTPS, this function can be limited to preventing ISP hijacking.
669669

670670
[egg-view-nunjucks]: https://github.com/eggjs/egg-view-nunjucks
671+
672+
## Revert CVE
673+
674+
675+
In the security fixes of node.js, there may be breaking changes. For example, in version 18.9.1, a security vulnerability was fixed, which caused some encryption-related code to not function properly. To address this issue, we provide a revert parameter, which is converted to the --security-revert parameter at startup, allowing the bypassing of the CVE fix.
676+
677+
```json
678+
// package.json
679+
{
680+
"egg": {
681+
// Supports two configuration methods
682+
// One is to use a string directly, specifying a CVE
683+
"revert": "CVE-2023-46809",
684+
// The other is to use an array of strings, allowing the specification of multiple CVEs
685+
"revert": [ "CVE-2023-46809" ]
686+
}
687+
}
688+
```

‎site/docs/core/security.zh-CN.md

+17
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,20 @@ exports.security = {
637637
对于未开启 HTTPS 的网站,此函数可以有效防止运营商劫持。
638638

639639
[egg-view-nunjucks]: https://github.com/eggjs/egg-view-nunjucks
640+
641+
## Revert CVE
642+
643+
在 node.js 的安全修复中可能会造成 Breaking change,例如在 18.9.1 版本中修复了一个安全漏洞,导致了一些加密相关的代码无法正常运行。为了解决这个问题,我们提供了一个 `revert` 的参数,在启动时转换为 `--security-revert` 参数,可以绕过 CVE 的修复。
644+
645+
```json
646+
// package.json
647+
{
648+
"egg": {
649+
// 支持两种配置方式
650+
// 一种是直接使用字符串,指定一个 CVE
651+
"revert": "CVE-2023-46809",
652+
// 另一种是使用字符串数组,可以指定多个 CVE
653+
"revert": [ "CVE-2023-46809" ]
654+
}
655+
}
656+
```

0 commit comments

Comments
 (0)
Please sign in to comment.