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

fix: domain-policy regex #5815

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

dspo
Copy link
Contributor

@dspo dspo commented Apr 13, 2023

What this PR does / why we need it:

fix: domain policy regex

网关的鉴权模型, 会使用正则表达式去匹配 http 请求的域名, 如果能匹配上, 则将鉴权策略应用于该次请求.
鉴权模型里有个 "^(xxx\.com)" 这样的正则表达式, 当请求 xxx.com.cn 这个域名时, 也会被这个正则表达式命中, 因此对 xxx.com.cn 这个域名的请求会被鉴权策略拦截.

本 PR 修复 erda 上关于这段正则表达式生成的部分代码, 使其正确匹配请求的域名.

Which issue(s) this PR fixes:

  • Fixes #your-issue_number
  • [Erda Cloud Issue Link](paste your link here)

Specified Reviewers:

/assign @your-reviewer

ChangeLog

Language Changelog
🇺🇸 English fix: domain policy regex
🇨🇳 中文 修复 domain-policy 正则表达式错误的问题

Need cherry-pick to release versions?

Add comment like /cherry-pick release/1.0 when this PR is merged.

For details on the cherry pick process, see the cherry pick requests section under CONTRIBUTING.md.

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #5815 (e6036eb) into master (4bd72c7) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5815   +/-   ##
=======================================
  Coverage   22.19%   22.19%           
=======================================
  Files        1837     1837           
  Lines      203756   203756           
=======================================
  Hits        45223    45223           
+ Misses     153338   153336    -2     
- Partials     5195     5197    +2     

see 8 files with indirect coverage changes

@wangzhuzhen
Copy link
Contributor

/lgtm

@sfwn
Copy link
Member

sfwn commented Apr 14, 2023

/approve

@erda-bot erda-bot merged commit fb3972a into erda-project:master Apr 14, 2023
@sfwn
Copy link
Member

sfwn commented Apr 14, 2023

/cherry-pick release/2.3

erda-bot pushed a commit to erda-bot/erda that referenced this pull request Apr 14, 2023
erda-bot added a commit that referenced this pull request Apr 14, 2023
Co-authored-by: 悟空 <rainchan365@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants