Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portal

Abierto Apto para principiantes
#1,122 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
shell
Área
backend

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() at 99-tollgate-setup:899 on main (checked 2026-10-26) sets
    uhttpd.portal.home='/etc/tollgate/tollgate-captive-portal-site' with no case "$BRAND" and no
    uci -q get guard — it overwrites whatever a branded image installed.
  • BRAND / BRAND_HOSTNAME are 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 own 92-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:

  1. Derive it like everything else, with the current path as the tollgate default, e.g.
    /etc/tollgate/${BRAND_TOKEN}-captive-portal-site, guarded by "only set it if that directory
    exists, else keep the current value".
  2. Or let the distribution own it the way it already owns uhttpd.admin: don't write
    uhttpd.portal.home when 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenTollGate/tollgate-module-basic-go

Todos los issues de OpenTollGate/tollgate-module-basic-go

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.