-
Notifications
You must be signed in to change notification settings - Fork 358
Comparing changes
Open a pull request
base repository: prometheus/common
base: v0.68.1
head repository: prometheus/common
compare: v0.69.0
- 18 commits
- 31 files changed
- 4 contributors
Commits on May 27, 2026
-
config: strip credentials on cross-host redirects
When FollowRedirects is true, credentials (Authorization header, Cookie headers set via HTTPHeaders) were forwarded to any redirect target, including cross-host redirects. Fix by detecting cross-host redirects via isCrossHostRedirect, which walks the req.Response chain to find the original request's hostname and compares it to the current destination. Each credential round-tripper (bearer, basic auth, OAuth2) skips adding credentials when isCrossHostRedirect returns true. A new sensitiveHeadersStripRT also strips sensitive headers added by headersRoundTripper on cross-host redirects. This approach requires no CheckRedirect hook and works whether the caller uses NewClientFromConfig or a custom http.Client built from NewRoundTripperFromConfigWithContext directly. This aligns to Go's HTTP client behaviour. Signed-off-by: Julien Pivotto <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0d8de87 - Browse repository at this point
Copy the full SHA 0d8de87View commit details
Commits on Jun 8, 2026
-
* Enable modernize linter * Add linter exceptions to match upstream Prometheus. * Apply linter improvements. Signed-off-by: SuperQ <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 56870db - Browse repository at this point
Copy the full SHA 56870dbView commit details -
model: Add BenchmarkUnmarshalTime
Signed-off-by: Bryan Boreham <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4cc12e3 - Browse repository at this point
Copy the full SHA 4cc12e3View commit details -
model: reduce allocations in Time.UnmarshalJSON
Use strings.Cut instead of strings.Split. Signed-off-by: Bryan Boreham <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 98ca625 - Browse repository at this point
Copy the full SHA 98ca625View commit details -
model: remove allocation in Time.UnmarshalJSON
We don't need to modify the string version of the number via a memory allocation; it's much faster to modify the integer version. Signed-off-by: Bryan Boreham <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8b99aea - Browse repository at this point
Copy the full SHA 8b99aeaView commit details -
model: fix Time.UnmarshalJSON for larger negative numbers
Signed-off-by: Bryan Boreham <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d6a7988 - Browse repository at this point
Copy the full SHA d6a7988View commit details
Commits on Jun 9, 2026
-
Update common Prometheus files (#917)
Signed-off-by: prombot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c4a7162 - Browse repository at this point
Copy the full SHA c4a7162View commit details
Commits on Jun 11, 2026
-
Merge pull request #901 from roidelapluie/roidelapluie/fixredirectauth
config: strip credentials on cross-host redirects
Configuration menu - View commit details
-
Copy full SHA for c7fb7bb - Browse repository at this point
Copy the full SHA c7fb7bbView commit details -
config: make isCrossHostRedirect sticky across the redirect chain
Walk every hop in the redirect chain rather than only checking the current request's host. Once any hop leaves the original host, the function returns true for all subsequent requests in that chain, even if a later hop redirects back to the original host. This mirrors net/http's own behaviour and closes the bypass window where a cross→original→cross chain could slip credentials through. Signed-off-by: Julien Pivotto <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 428856f - Browse repository at this point
Copy the full SHA 428856fView commit details -
config: check cross-host redirect before OAuth2 token fetch
Move isCrossHostRedirect early in oauth2RoundTripper.RoundTrip so that cross-host redirects bypass token-source initialisation entirely and go straight to Base.RoundTrip. Base is read under the RLock to avoid a data race with concurrent reconfigurations. Signed-off-by: Julien Pivotto <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2b55b3e - Browse repository at this point
Copy the full SHA 2b55b3eView commit details -
Merge pull request #919 from prometheus/superq/modernize
Modernize Go
Configuration menu - View commit details
-
Copy full SHA for 30ba470 - Browse repository at this point
Copy the full SHA 30ba470View commit details -
Merge pull request #920 from roidelapluie/roidelapluie/cross-host-sticky
config: make isCrossHostRedirect sticky across the redirect chain
Configuration menu - View commit details
-
Copy full SHA for 0fcda47 - Browse repository at this point
Copy the full SHA 0fcda47View commit details -
Merge pull request #921 from roidelapluie/roidelapluie/oauth2-cross-h…
…ost-check config: check cross-host redirect before OAuth2 token fetch
Configuration menu - View commit details
-
Copy full SHA for 56fe395 - Browse repository at this point
Copy the full SHA 56fe395View commit details -
expfmt: fix nil pointer panic when parsing empty braces "{}"
The text exposition parser panics with a nil pointer dereference when it encounters a closing brace before any metric name has been read, e.g. for the input "{}". In startOfLine a leading "{" sets currentMetricIsInsideBraces and jumps straight to label parsing without going through readingMetricName, so currentMF/currentMetric are still nil when startLabelName dereferences currentMetric on the "}" branch. Since TextToMetricFamilies is used to decode untrusted scrape payloads, a malicious or compromised target could crash any consumer that does not wrap the parser in its own recover(). Guard the "}" branch on currentMF == nil and return a parse error, mirroring the existing guard in startLabelValue. currentMF is checked rather than currentMetric because reset only clears currentMF between parses. Introduced in #670. Signed-off-by: Julien Pivotto <[email protected]>Configuration menu - View commit details
-
Copy full SHA for a1600af - Browse repository at this point
Copy the full SHA a1600afView commit details
Commits on Jun 12, 2026
-
Merge pull request #922 from roidelapluie/roidelapluie/fix-textparse-…
…empty-braces-panic expfmt: fix nil pointer panic when parsing empty braces "{}"Configuration menu - View commit details
-
Copy full SHA for 2269d3d - Browse repository at this point
Copy the full SHA 2269d3dView commit details -
Merge pull request #918 from prometheus/time-split
model: reduce allocations in Time.UnmarshalJSON
Configuration menu - View commit details
-
Copy full SHA for f84efec - Browse repository at this point
Copy the full SHA f84efecView commit details
Commits on Jun 17, 2026
-
config: resolve LoadHTTPConfigFile paths relative to the config file
LoadHTTPConfigFile called SetDirectory with filepath.Dir(filepath.Dir(filename)), resolving relative file paths (http_headers files, *_file credentials) against the config file's grandparent directory instead of its own directory. This contradicts the SetDirectory contract and every other config loader. The behavior was masked by the testdata fixtures, which prefixed file paths with the config file's own directory name (e.g. files: [testdata/headers-file] for a config living in testdata/) to compensate. Drop those redundant prefixes and add a regression test that loads a config from a temp dir and asserts a plain relative path resolves next to the config file. Signed-off-by: Julien Pivotto <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a7b791d - Browse repository at this point
Copy the full SHA a7b791dView commit details -
Merge pull request #925 from roidelapluie/roidelapluie/fix-loadhttpco…
…nfigfile-dir config: resolve LoadHTTPConfigFile paths relative to the config file
Configuration menu - View commit details
-
Copy full SHA for e3c14a0 - Browse repository at this point
Copy the full SHA e3c14a0View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.68.1...v0.69.0