You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON injection fixed: authentication body now built with encoding/json structs — passwords containing " or \ are correctly escaped (previously text/template was used with no JSON escaping)
Breaking changes
KeystoneToken and ZonesCache public fields removed (were leaking internal state; now fully private)
OperationLogger *log.Logger replaced by Logger field accepting the new Logger interface (Printf(format string, v ...any)) — satisfied by *log.Logger and any structured-logger adapter
libdns contract compliance
AppendRecords: only adds new values, never mutates existing ones; duplicate input values are skipped
SetRecords: replaces exactly the input set per (name, type) pair (was processing records individually, causing values to overwrite each other)
DeleteRecords: removes specific values with wildcard support (empty Type/TTL/Data = match any)
Selectel DNS API v2 contract fixes
PATCH payload now contains only {ttl, records} — sending id/name/type could cause 422
Record and zone names sent as FQDN with trailing dot (required by the API)
AppendRecords uses GET → PATCH/POST instead of relying on 409 Conflict (not returned by the rrset endpoint)
Full pagination for /zones and /zones/{id}/rrset (count / next_offset)
Zone resolved by exact FQDN match instead of Zones[0] (prevented selecting wrong zone)
Structured error body {error, description, location} parsed into typed httpError
TTL clamped to [60, 604800] (both bounds; previously only lower bound was enforced)
Improvements
Token management: expiry parsed from Keystone response body; token refreshed proactively 5 min before expiry and on every 401; ensureTokenNotStale prevents redundant concurrent re-auth calls
Per-zone mutexes: operations on different zones now run in parallel (was single global mutex)
Shared http.Client with connection pooling and idle-connection timeout