fix(openwrt): close TollGate free-access gap and mint URL mismatch
Two bugs found live against archy-x250-pa3: TollGate-3458 (the upstream tollgate-module-basic-go installer's own default AP, rebranded from OpenWrt's factory default wireless.default_radioN sections) was left bound to `network=lan` — wide open, unmetered, and sharing the router's admin LAN — because install_ipk() runs the upstream package's own uci-defaults scripts but nothing reconciled the AP they create with the separate `tollgate` network/bridge/firewall this project's own provision_ssid() sets up for the "archipelago" SSID. Fixed by folding any default_radioN section left on `lan` onto the `tollgate` network right after it's created. Separately, a caller-supplied mint_url with a trailing slash (https://mint.minibits.cash/Bitcoin/) got written byte-for-byte into accepted_mints[0].url, which tollgate-wrt string-compares exactly against a token's embedded (slash-less) mint URL — rejecting every otherwise-valid token as an "untrusted mint". Fixed by trimming trailing slashes before the value is used anywhere. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTdMfVJChCwCCYF1ZTRQLc
This commit is contained in:
committed by
archipelago
co-authored by
Claude Sonnet 5
parent
db52c06a72
commit
2947277205
@@ -59,6 +59,11 @@ pub async fn provision(router: &Router, config: &TollGateConfig) -> Result<()> {
|
||||
|
||||
config::apply(router, config)?;
|
||||
wifi::provision_ssid(router, config)?;
|
||||
// Must come after provision_ssid (creates the `tollgate` network this
|
||||
// folds the upstream installer's own default AP onto) — see
|
||||
// regate_upstream_default_aps for why this is needed at all.
|
||||
wifi::regate_upstream_default_aps(router)
|
||||
.context("re-gate upstream tollgate-module-basic-go default AP(s)")?;
|
||||
// Must come after provision_ssid (which creates br-tollgate) and before
|
||||
// the daemon restart below — config.json is only read at startup.
|
||||
config::apply_daemon_config(router, config)
|
||||
|
||||
Reference in New Issue
Block a user