Skip to content

altsvc: only accept 17 bytes dates from files#20259

Closed
bagder wants to merge 2 commits intomasterfrom
bagder/altsvc-date
Closed

altsvc: only accept 17 bytes dates from files#20259
bagder wants to merge 2 commits intomasterfrom
bagder/altsvc-date

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 12, 2026

Since the date format is fixed there is no need to accept more data.

Update test355 to verify reject of too long date in alt-svc file

This test case was originally supposed to verify alt-svc loading from a
file but never did because it was done incorrectly.

Now it verifies that a too long date in the input file makes curl
disregard the entry.

Closes #20259

@github-actions github-actions bot added the tests label Jan 12, 2026
@bagder bagder force-pushed the bagder/altsvc-date branch from 19891e9 to ab45700 Compare January 12, 2026 07:13
bagder added a commit that referenced this pull request Jan 12, 2026
Since the date format is fixed there is no need to accept more data.

Update test355 to verify reject of too long date in alt-svc file

This test case was originally supposed to verify alt-svc loading from a
file but never did because it was done incorrectly.

Now it verifies that a too long date in the input file makes curl
disregard the entry.

Closes #20259
@bagder bagder force-pushed the bagder/altsvc-date branch from 3a1e3ce to e54696a Compare January 12, 2026 07:20
@bagder bagder changed the title test355: verify reject of too long date in file altsvc: only accept 17 bytes dates from files Jan 12, 2026
@bagder bagder marked this pull request as ready for review January 12, 2026 07:20
Since the date format is fixed there is no need to accept more data.

Update test355 to verify reject of too long date in alt-svc file

This test case was originally supposed to verify alt-svc loading from a
file but never did because it was done incorrectly.

Now it verifies that a too long date in the input file makes curl
disregard the entry.

Closes #20259
@bagder
Copy link
Member Author

bagder commented Jan 12, 2026

augment review

@augmentcode
Copy link

augmentcode bot commented Jan 12, 2026

🤖 Augment PR Summary

Summary: Constrains alt-svc cache-file expiry dates to the fixed 17-byte YYYYMMDD HH:MM:SS format, rejecting longer strings.
Changes: Lowers MAX_ALTSVC_DATELEN and adjusts test355 to load an alt-svc file containing an overlong timestamp so the entry is ignored.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

If the date is accepted, it connects to the wrong host and fails the
test.
@bagder bagder force-pushed the bagder/altsvc-date branch from e54696a to 24e9e0d Compare January 12, 2026 07:39
@bagder bagder closed this in 31fbbb3 Jan 12, 2026
@bagder bagder deleted the bagder/altsvc-date branch January 12, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant