mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5205] [MERGED] fix: validate CA cert parsing and add missing ReadHeaderTimeout #5169
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/5205
Author: @fatedier
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @fatedier
Base:
dev← Head:new📝 Commits (1)
b9afc80fix: validate CA cert parsing and add missing ReadHeaderTimeout📊 Changes
3 files changed (+8 additions, -3 deletions)
View changed files
📝
pkg/plugin/client/http2http.go(+2 -1)📝
pkg/plugin/client/http2https.go(+2 -1)📝
pkg/transport/tls.go(+4 -1)📄 Description
Summary
newCertPoolignoresAppendCertsFromPEMreturn value. If the CA file is malformed (DER-encoded, empty, corrupted), the cert pool is empty and TLS verification silently fails with a confusing error later. Now returns a clear error immediately.ReadHeaderTimeoutwas explicitly set to 0 (no timeout), while all other plugins in the same directory use 60s. Fixed to 60s for consistency and slowloris protection.ReadHeaderTimeoutfix.Context
ReadHeaderTimeoutonly controls request header read time, not backend processing or response time (confirmed via Go source code). Setting 60s has no impact on long-running requests.AppendCertsFromPEMcheck already exists correctly inpkg/auth/oidc.go:53.Test plan
make buildpassesmake testpasses🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.