Skip to content

fix: 修复 CodeQL js/polynomial-redos 告警(config.js 去除末尾斜杠改为线性实现)#12

Merged
baobao84 merged 2 commits into
mainfrom
wecomgroup-patch-1
Jul 11, 2026
Merged

fix: 修复 CodeQL js/polynomial-redos 告警(config.js 去除末尾斜杠改为线性实现)#12
baobao84 merged 2 commits into
mainfrom
wecomgroup-patch-1

Conversation

@wecomgroup

Copy link
Copy Markdown
Contributor

Replaces the //+$/ regex (flagged by CodeQL as js/polynomial-redos) with a linear-time character loop to trim trailing slashes from baseUrl. Behavior is unchanged; this only removes the regex-based ReDoS risk pattern. Addresses code scanning alert #22.

Replaces the /\/+$/ regex (flagged by CodeQL as js/polynomial-redos) with a linear-time character loop to trim trailing slashes from baseUrl. Behavior is unchanged; this only removes the regex-based ReDoS risk pattern. Addresses code scanning alert #22.
@baobao84 baobao84 merged commit 3fa46af into main Jul 11, 2026
15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants