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

Strict parser for HSTS #2386

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Strict parser for HSTS #2386

merged 1 commit into from
Aug 28, 2023

Conversation

drwetter
Copy link
Owner

@drwetter drwetter commented Aug 28, 2023

As suggested in #2381 this parses strictly the value for max-age in the HSTS header line. While it is implemented only in run_hsts() it could be extracted to a separate function in the future and used elsewhere too.

The improvement is strict and catches also e.g. '==' signs and issues a warning. See https://www.rfc-editor.org/rfc/rfc6797#section-6.1.1 .

Also it is picky regarding quotes now which are only allowed enclosing the value.

As suggested in #2381 this parses strictly the value for mag-age
in the HSTS header line. While it is implemented only in run_hsts()
it could be extracted to a separate functioni in the future and used
elsewhere too.

The improvement is more strict and catches e.g. '==' signs and issues
a warning. See https://www.rfc-editor.org/rfc/rfc6797#section-6.1.1 .

Also it is picky regarding quotes now which are only allowed enclosing
the value.
@drwetter drwetter merged commit 765b585 into 3.2 Aug 28, 2023
3 checks passed
@drwetter drwetter deleted the strict_parsing_HSTS branch August 28, 2023 17:56
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.

1 participant