setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portal
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 packaging/files/etc/uci-defaults/99-tollgate-setup,尤其是第899行附近的 load_brand 和 setup_uhttpd_portal()。追踪 BRAND 和 BRAND_HOSTNAME 的设置方式,然后检查现有管理设置如何分配其 webroot。完成标准是:首次启动时保留或选择带品牌的访客 docroot,同时未带品牌的 TollGate 路径保持不变。
由索引模型根据 Issue 内容生成。
描述
What
packaging/files/etc/uci-defaults/99-tollgate-setup hardcodes the guest captive portal docroot:
setup_uhttpd_portal() {
...
uci set uhttpd.portal.home='/etc/tollgate/tollgate-captive-portal-site'
/etc/tollgate/tollgate-captive-portal-site is the TollGate-branded guest portal. It is written
unconditionally, with no brand input — so a re-brand that ships its own guest portal still ends up
serving this one at :2051.
Why that contradicts this file's own contract
The file states the rule a few hundred lines above the offending line (around load_brand):
The brand is a build INPUT, never a literal in this repo: a re-brand ships its own image,
docroot and naming from its own organisation and passes its token here.
The hostname, both SSIDs, the nodogsplash gatewayname and the device code are all derived from
the brand token. The guest portal docroot is the one brand-derived path that is spelled as a
literal, so the mechanism the comment describes cannot actually reach the guest portal.
This is the same shape as the :8090 admin writer that comment is proud of having removed: a
brand-neutral package still naming one brand's path.
Measured
setup_uhttpd_portal()at99-tollgate-setup:899onmain(checked 2026-10-26) sets
uhttpd.portal.home='/etc/tollgate/tollgate-captive-portal-site'with nocase "$BRAND"and no
uci -q getguard — it overwrites whatever a branded image installed.BRAND/BRAND_HOSTNAMEare already loaded by this point in the script.- The admin side does not have this problem:
uhttpd.admin's webroot is written by the
portal's own92-tollgate-admin-setup, explicitly described in-file as "the only writer that
knows the brand webroot".
Effect for a branded deployment
A distributor ships a branded guest portal (build-time brand injection, own webroot), installs the
package, and the first boot points uhttpd.portal.home back at the generic TollGate portal. The
guest sees the generic branding regardless of what was installed, and nothing logs a conflict —
the write simply wins.
Suggested shape
Either is fine; both keep the unbranded path byte-identical:
- Derive it like everything else, with the current path as the
tollgatedefault, e.g.
/etc/tollgate/${BRAND_TOKEN}-captive-portal-site, guarded by "only set it if that directory
exists, else keep the current value". - Or let the distribution own it the way it already owns
uhttpd.admin: don't write
uhttpd.portal.homewhen a brand token is present, and document the expected writer.
Option 1 keeps one writer; option 2 mirrors the existing admin split. A guard that skips the write
when the branded docroot already exists would also be enough to stop the overwrite.
Happy to send a PR for whichever shape you prefer — I have a branded deployment that this
currently blocks.
- 主要语言
- Go
- 星标
- 12
- 派生
- 14
- 平均合并
- 3 天 21 小时
- 30 天内合并 PR
- 263
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenTollGate/tollgate-module-basic-go 的其他 Issue
-
Degraded-mode hygiene follow-ups: dead walletNotInitializedError() + main.go's startup log still over-promises mint recovery可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
OpenTollGate/tollgate-module-basic-go#1135 ·
维护者通常 1 天内回复
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]未关闭
难度 1/5 1 小时以内 新手友好度 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
OpenTollGate/tollgate-module-basic-go#1026 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
OpenTollGate/tollgate-module-basic-go#833 · 2 条评论 ·
维护者通常 1 天内回复
查看 OpenTollGate/tollgate-module-basic-go 的全部 Issue
相似的 Issue
-
automation doc-healer documentation
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
tsukumogami/tsuku#2804 ·
维护者通常 1 天内回复
-
Anthropic /v1/messages: only the last thinking block of an assistant message is kept可能已有人在做 @Shayan12456 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
raised-by:verifier
难度 2/5 1-3 小时 新手友好度 82/100
medici-finance/assay#5039 ·
维护者通常 1 天内回复
-
metax CheckHealth reads Status.Capacity, so unhealthy Metax-GPU nodes are never cleaned up可能已有人在做 @barbierajput378-pixel 今天认领。 未关闭kind/bug
难度 2/5 1-3 小时 新手友好度 82/100
Project-HAMi/HAMi#3343 · 1 条评论 ·
维护者通常 1 天内回复