luci-base: dispatcher.uc: skip login nodes when resolving w/ active session
authorJo-Philipp Wich <[email protected]>
Tue, 30 Jul 2024 21:50:41 +0000 (23:50 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 30 Jul 2024 22:02:15 +0000 (00:02 +0200)
commitcdbe9034c9bcad3f4ecd3d207ebf30e84da00063
tree28958c119a956eabf1d7dd414b6f6f6719a1c451
parentb6da3f27b504c4b3d1cdb2c4761f66428902335b
luci-base: dispatcher.uc: skip login nodes when resolving w/ active session

When resolving eligible child nodes during evaluation of the "firstchild"
dispatch action, do not consider nodes allowing a login as allowed when
there already is an established session.

This fixes cases where restricted sessions are redirected to nodes they
have insufficent ACLs for, just because those nodes allow logins.

Fixes: #7218
Ref: https://forum.openwrt.org/t/x/174687
Suggested-by: @mikma
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 65b8002adbf8219b5dad37637756fa8fcae871a6)
modules/luci-base/ucode/dispatcher.uc