Skip to content

hsts: skip expired HSTS entries read from file - #21186

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

bagder wants to merge 1 commit into
masterfrom
bagder/hsts-add-expired

Conversation

@bagder

@bagder bagder commented Apr 1, 2026

Copy link
Copy Markdown
Member

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

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread lib/hsts.c Resolved
@bagder bagder closed this in 4478a10 Apr 1, 2026
@bagder
bagder deleted the bagder/hsts-add-expired branch April 1, 2026 08:49
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
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