Locked Solved Bug reports

redirection after login always go to home page

Locked by Fred · 06 Apr 2026 11:47 • Solved by arpinux · 06 Mar 2026 16:47
Avatar
Posts 212 633

Hi!

when i'm not connected and want to reply to a post, flatboard displays the login page (not a bug, i have to login to reply). but when i'm logged in, flatboard displays the home page.

would it be possible to be redirectd to the post i want to reply to? in fact, to be redirected to the page just before the login page?

  • redirection login solved
Avatar
Posts 428 1580

Hi arpinux,

thank you for the feedback.

Fixed

Login — redirect after authentication now returns to the originally requested page (app/Middleware/AuthMiddleware.php, app/Controllers/Auth/LoginController.php, app/Views/discussions/show.php, themes/premium/views/discussions/show.php) — When a guest tried to access a protected URL they were redirected to /login but after a successful login (including after 2FA) they were always sent to the home page. The requested URI is now saved in session (redirect_after_login) before the login redirect; LoginController::login() and verify2FA() consume it after a successful authentication and fall back to / if absent. The “Log in to reply” links and reply placeholder in discussion pages pass the discussion URL with #reply-form as a ?redirect=query parameter; LoginController::show() reads it and saves it to session. Protocol-relative URLs (//evil.com) are explicitly rejected in addition to absolute URLs to prevent open redirects. After redirect, #reply-form in the URL hash is detected on page load and showReplyEditor() is called automatically so the editor opens and scrolls into view without requiring a click.

Edited on  Mar 06, 2026  By  Fred .

Avatar
Posts 212 633

it works! :D

This discussion is locked

Log in to reply
Navigation
3 Posts
post #1
06 Mar 2026
By Utilisateur
Statistics
166
Discussions
911
Replies
22
Flatboarders
5
Contributors
New member : Oula
Online
23 Guests online