truman
(truman)
24 Octubre, 2025 07:59
1
versión:v3.5.1
mi sitio web: https://www.example.com/forum
el inicio de sesión local (página de inicio) redirigirá a https://www.example.com
Iniciar sesión desde una página que no sea la de inicio no presenta este problema.
registro
Procesando por StaticController#enter como HTML Parámetros: {"username"=>"****", "password"=>"[FILTERED]", "redirect"=>"https://www.example.com/forum/login"} Redirigido a https://www.example.com/
1 me gusta
pmusaraj
(Penar Musaraj)
24 Octubre, 2025 13:44
2
Gracias por el informe, lo revisaremos pronto.
2 Me gusta
Tengo el mismo problema. Versión: 3.6.0.beta3
1 me gusta
Magnetidog
(Magnetidog)
10 Diciembre, 2025 19:24
6
Estamos experimentando el mismo problema después de instalar 2025.12.0-latest.
@here disculpen, creo que logré reproducir y solucionar el problema
main ← login-redirect-and-subfolder-equals-boom
opened 10:46PM - 10 Dec 25 UTC
When Discourse is served from a subfolder (e.g., /forum), logging in from the lo… gin page itself would incorrectly redirect users to the root domain (/) instead of the subfolder root (/forum/).
The issue had two causes:
1. The login path check in `extract_redirect_param` used the Rails `login_path` helper which returns "/login" without the subfolder prefix. When the browser sent the full path "/forum/login", the check `starts_with?("/login")` failed to match, treating it as a valid redirect target instead of rejecting it.
2. The `enter` method didn't apply the subfolder prefix when falling back to the root path "/".
Fixed by:
- Building the full login path with `Discourse.base_path` for accurate matching in subfolder setups
- Wrapping the fallback "/" with `path()` in `enter` to respect the subfolder configuration
- Extracting redirect validation into `valid_redirect_uri?` for clarity
Ref - meta/t/386619
3 Me gusta
zogstrip
Cerrado
12 Diciembre, 2025 07:00
8
Este tema se cerró automáticamente después de 16 horas. Ya no se permiten nuevas respuestas.