Skip to content

v1.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Oct 07:37
· 13 commits to main since this release
Immutable release. Only release title and notes can be modified.
8ed9f28

Security and stability

This release fixes the five most urgent findings from a code audit. Upgrading from v1.6.0 or earlier is strongly recommended.

  • Concurrent cache misses no longer crash the process. Redis locks were kept in an unsynchronised map shared by every request, which could end the process with fatal error: concurrent map writes. Each operation now uses its own lock, and a lock can no longer be released by the wrong holder (#322).
  • Cached responses keep their status code. A cached 301, 302, 404 or 500 used to reach the client as 200 OK, so browsers and CDNs further down cached redirects and error pages as success (#315).
  • Metrics no longer grow with every request. gpcee_http_request and gpcee_http_response had a label for the request ID and the full URL, so every request added a series that was never freed. It also put request URLs, query strings included, into /metrics (#324).
  • The Host header can no longer grow memory. Each new Host: example.com:<anything> value added a full copy of the domain configuration to a cache that never shrank (#309).
  • Internal endpoints bind to the configured address. /healthcheck and /metrics were listening on every interface even though INTERNAL_LISTENING_ADDRESS defaults to 127.0.0.1 (#323).

Behaviour changes to check before upgrading

  • /healthcheck and /metrics now listen on 127.0.0.1:52021 only by default. If Prometheus or a probe reaches port 52021 from another host, container or pod, set INTERNAL_LISTENING_ADDRESS=0.0.0.0 (or internals.listening_address).
  • Metric labels changed. gpcee_http_request and gpcee_http_response no longer have req_id, url, content_length, size or duration. host no longer includes the port, and non-standard HTTP methods are reported as OTHER. Update any queries or alerts that use these labels. Metric names are unchanged.
  • The process now refuses to start if the internal port is the same as a public HTTP or HTTPS port. Previously one listener silently replaced the other.

Full changes: #309, #315, #322, #323, #324, #326.