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

go-pkgz / auth / 25583701523 / 1
85%
master: 85%

Build:
DEFAULT BRANCH: master
Ran 08 May 2026 11:02PM UTC
Files 25
Run time 0s
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 11:00PM UTC coverage: 84.872% (+0.6%) from 84.295%
25583701523.1

push

github

umputun
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.

2822 of 3325 relevant lines covered (84.87%)

7.76 hits per line

Source Files on job 25583701523.1
  • Tree
  • List 25
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25583701523
  • 32d0c6e7 on github
  • Prev Job for on master (#25583159414.1)
  • Next Job for on master (#25592713657.1)
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