Skip to content

Conversation

GuanyuChen
Copy link

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
@GuanyuChen
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants