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

Allow parentheses in validation for value strings #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

roelnoort
Copy link

Hi,

I made this pull request to solve the issue in described in:
vercel/serve#649

In short:

  1. The serve library can be used to set up security headers.
  2. One new header, the Permissions-Policy has a changed syntax which is currently rejected because it fails the schema validation imposed by this repository.
  3. The schema validation does not allow parentheses () to be used. I added this by changing this regex pattern:
"^[a-zA-Z0-9_!#$%&'*+.;/:, =^`|~-]+$"

to this pattern:

"^[a-zA-Z0-9_!#$%&()'*+.;/:, =^`|~-]+$"

Also, I noticed that, after cloning and running npm install, I could not run npm test as yarn was not being installed. Therefore I added yarn as a development dependency to package.json.

Best, Roel

…xample in Content Security Policy headers which get validated by this pattern
@paulshryock
Copy link

Is anything blocking this from being merged?

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