uspot: handler-uam: stop processing after error

The current code would still issue a radius request after showing the
error boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
Thibaut VARÈNE
2023-05-10 15:37:30 +02:00
committed by John Crispin
parent 16cf91b3d2
commit 8029c318d0

View File

@@ -28,8 +28,10 @@ function auth_client(ctx) {
} else if (ctx.query_string.username && ctx.query_string.password) {
payload.username = ctx.query_string.username;
payload.password = uam.password(uam.md5(ctx.config.challenge, ctx.format_mac), ctx.query_string.password, ctx.config.uam_secret);
} else
} else {
include('error.uc', ctx);
return;
}
let radius = portal.radius_call(ctx, payload);
if (radius['access-accept']) {