setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portal
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Lee packaging/files/etc/uci-defaults/99-tollgate-setup, especialmente load_brand y setup_uhttpd_portal() alrededor de la línea 899. Sigue cómo se establecen BRAND y BRAND_HOSTNAME y luego comprueba cómo la configuración de administración existente asigna su webroot. Se considera terminado cuando el primer arranque conserva o selecciona el docroot de invitados con marca, mientras que la ruta de TollGate sin marca permanece sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 12
- Forks
- 14
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 284
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenTollGate/tollgate-module-basic-go
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenTollGate/tollgate-module-basic-go#1026 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenTollGate/tollgate-module-basic-go#833 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenTollGate/tollgate-module-basic-go
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yetone/magpie#4095 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs: Google Safe Browsing flags go-bonnie.dev as "deceptive" (pipe-to-shell install instructions)Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
[Bug]: Telegram bot (v3.11.0): "Ban log" no longer sends the current 3xipl-banned.logPosiblemente ocupada @HamedSanaei la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MHSanaei/3x-ui#6990 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
bug(tool/internal/instrument): identical inject_code rules from two rule packages are applied twiceAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
open-telemetry/opentelemetry-go-compile-instrumentation#1611 ·
Los mantenedores suelen responder en 2 días