Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Check whether the value is legal Before setting the header #72

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

Open
GuanyuChen wants to merge 4 commits into eggjs:master
base: master
Choose a base branch
Loading
from GuanyuChen:master

Conversation

@GuanyuChen
Copy link

@GuanyuChen GuanyuChen commented Dec 5, 2021

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

add utils.checkInvalidHeaderChar, check whether the value is legal Before setting the header, the illegal header will not be set

@GuanyuChen GuanyuChen marked this pull request as draft December 6, 2021 06:54
@GuanyuChen GuanyuChen marked this pull request as ready for review December 6, 2021 06:54
Copy link
Author

@dead-horse 大佬有时间帮忙 review 一下不?

}
const headerString = bufArray.join(';');
ctx.set(finalHeader, headerString);
ctx.set('x-csp-nonce', ctx.nonce);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该在设置 nonce 的时候做参数校验逻辑,而不是在响应返回的时候,这个时机太晚了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fengmk2 fengmk2 fengmk2 left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /