-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix: 存在潜在的 ReDoS 漏洞或低效正则表达式 #17619
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
Merged
Merged
fix: 存在潜在的 ReDoS 漏洞或低效正则表达式 #17619
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Poem
|
This was referenced May 3, 2025
@mmmsssttt404 同学修复一下 lint 问题 |
刚才已经进行修改,将多余的分号和空格删除了 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17619 +/- ##
========================================
Coverage 58.37% 58.37%
========================================
Files 469 469
Lines 27230 27230
Branches 5973 5953 -20
========================================
Hits 15895 15895
- Misses 9810 9935 +125
+ Partials 1525 1400 -125
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Single-Dancer
approved these changes
May 6, 2025
This was referenced May 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
这个 PR 做了什么? (简要描述所做更改)
报告项目中潜在正则表达式拒绝服务 (ReDoS) 漏洞或低效的正则表达式。在上下文中使用特制的输入字符串时,可能会导致极高的 CPU 使用率、应用程序冻结或拒绝服务攻击。
taro/packages/css-to-react-native/src/index.js
Line 62 in d28acca
taro/packages/css-to-react-native/src/transforms/rem.js
Line 2 in d28acca
将正则改为
https://github.com/mmmsssttt404/taro/blob/196bc7a5b880890c3894c85c37977098bb75c5dd/packages/css-to-react-native/src/index.js#L62
https://github.com/mmmsssttt404/taro/blob/e41414ff8e402e8366bf3476fc658ce470bcd21b/packages/css-to-react-native/src/transforms/rem.js#L2
改之前 测试指令后程序一直运行
改之后
步骤
1.git clone https://gitclone.com/github.com/mmmsssttt404/taro.git
2.cd tero
3.pnpm i
4.pnpm build
5.pnpm --filter taro-css-to-react-native test
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit