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

libbitcoin / libbitcoin-network / 26235566483

21 May 2026 03:24PM UTC coverage: 12.927% (-0.04%) from 12.965%
26235566483

push

github

evoskuil
Fix http host/origin allowlist never matching configured values

is_allowed_host/is_allowed_origin compared the request host (normalized
via to_normal_host, which substitutes default_port when the port is zero)
against the raw configured endpoints in options_.hosts/origins, which are
not normalized. A configured value without an explicit port (e.g.
host = localhost) therefore never matched any request — not even an
identical Host header — because the request side carried default_port
(80/443) while the configured side carried port 0.

Compare against host_names()/origin_names() instead, which apply the same
to_lower(default_port) normalization to the configured values, so both
sides are symmetric.

Verified on a live node: with host = localhost configured, Host: localhost
is now accepted (was rejected), while non-listed hosts are still rejected.

8477 of 65576 relevant lines covered (12.93%)

120.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

10.58
/libbitcoin-network/src/error.cpp


Source Not Available

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