Skip to content

hsts: skip expired HSTS entries read from file#21186

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/hsts-add-expired
Closed

hsts: skip expired HSTS entries read from file#21186
bagder wants to merge 1 commit intomasterfrom
bagder/hsts-add-expired

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 1, 2026

Extend test 780 to verify

@github-actions github-actions bot added the tests label Apr 1, 2026
@bagder bagder marked this pull request as ready for review April 1, 2026 07:17
@bagder bagder requested a review from Copilot April 1, 2026 07:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates HSTS cache loading so that expired HSTS entries read from a cache file are ignored, and extends test 780 to exercise that behavior.

Changes:

  • Skip already-expired HSTS entries when loading from an HSTS cache file.
  • Extend test 780 input HSTS cache with an explicitly expired entry to validate the skip behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/hsts.c Adds an expiry check during HSTS file parsing to ignore expired entries.
tests/data/test780 Adds an expired HSTS cache entry to ensure expired lines are not persisted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 4478a10 Apr 1, 2026
@bagder bagder deleted the bagder/hsts-add-expired branch April 1, 2026 08:49
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.

2 participants