• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats.go / 25926277339
85%

Build:
DEFAULT BRANCH: main
Ran 15 May 2026 03:35PM UTC
Jobs 1
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 May 2026 03:29PM UTC coverage: 85.442% (+0.07%) from 85.372%
25926277339

push

github

web-flow
[FIXED] Reject keys with consecutive dots in keyValid and searchKeyValid (#2076)

* kv: reject keys with consecutive dots in keyValid and searchKeyValid

Keys like "foo..bar" contain an empty token (two adjacent dots), which
makes them invalid NATS subjects. Both keyValid and searchKeyValid only
checked for a leading or trailing dot, so "foo..bar" would pass client-
side validation and reach the server, where it fails with a misleading
"nats: jetstream not enabled" error instead of a clear key validation
error.

Add a strings.Contains(key, "..") check to both functions in the legacy
kv.go and in jetstream/kv.go so these keys are rejected early with
ErrInvalidKey. Add test cases for Watch with consecutive-dot patterns.

Fixes #1354

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>

4 of 4 new or added lines in 2 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

14737 of 17248 relevant lines covered (85.44%)

32355.51 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
87.58
-0.27% kv.go
Jobs
ID Job ID Ran Files Coverage
1 25926277339.1 15 May 2026 03:35PM UTC 37
85.44
GitHub Action Run
Source Files on build 25926277339
  • Tree
  • List 37
  • Changed 4
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25926277339
  • ab4ab2c5 on github
  • Prev Build on main (#25488375355)
  • Next Build on main (#26282244093)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc