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

go-pkgz / auth / 25577691033
85%
master: 85%

Build:
Build:
LAST BUILD BRANCH: docs/comment-sweep
DEFAULT BRANCH: master
Ran 08 May 2026 08:25PM UTC
Jobs 1
Files 25
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

08 May 2026 08:23PM UTC coverage: 84.827% (+0.6%) from 84.247%
25577691033

Pull #287

github

paskal
fix(provider): bind dev oauth and custom-server to localhost by default

provider/dev_provider.go and provider/custom_server.go used Addr ":port",
which listens on every interface. The dev OAuth UI and the embedded
go-oauth2/oauth2 helper are intended for local development and embedded
flows, not for LAN exposure — but the bare-port shorthand silently
exposed them to anyone who could route to the host's other addresses
(other LAN clients, Docker network siblings, kube pods, etc).

Add localBindAddr(host, port) in provider/service.go that defaults the
listen host to 127.0.0.1 when the caller passes an empty host. Callers
that explicitly want non-loopback exposure can pass a hostname:

* dev_provider — uses Provider.Host (existing field) as the host;
  empty -> 127.0.0.1, explicit "0.0.0.0"/"192.168.x.y" honored.
* custom_server — uses the host from c.URL ("http://localhost:8080");
  "localhost" or empty -> 127.0.0.1; explicit non-loopback honored.

Same change in v1 and v2 in single PR.

Tests in both modules:

* TestLocalBindAddr — table for empty/explicit-loopback/explicit-LAN/
  explicit-0.0.0.0/IPv6 cases.
* TestLocalBindAddr_DefaultIsNotAllInterfaces — regression test for
  the property "default bind never produces ':port' shorthand".
  Confirmed locally that reverting localBindAddr to "return ':' + port"
  makes this test fail with a clear message.
Pull Request #287: fix(provider): bind dev oauth and custom-server to localhost by default

11 of 13 new or added lines in 3 files covered. (84.62%)

2812 of 3315 relevant lines covered (84.83%)

7.76 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
79.08
v2/provider/custom_server.go
Jobs
ID Job ID Ran Files Coverage
1 25577691033.1 08 May 2026 08:25PM UTC 25
84.83
GitHub Action Run
Source Files on build 25577691033
  • Tree
  • List 25
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #287
  • PR Base - master (#25421111866)
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