mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
uspot: don't publish radius secrets
Now that accounting.uc no longer needs the per-client radius server information, there is no reason to publish these sensitive secrets in cleartext in spotfiler data. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
committed by
John Crispin
parent
395e98dc66
commit
e561f4a82e
@@ -32,6 +32,9 @@ function auth_client(ctx) {
|
||||
if (radius['access-accept']) {
|
||||
if (ctx.config.final_redirect_url == 'uam')
|
||||
ctx.query_string.userurl = portal.uam_url(ctx, 'success');
|
||||
|
||||
delete payload.server;
|
||||
delete payload.acct_server; // don't publish server secrets
|
||||
portal.allow_client(ctx, { radius: { reply: radius.reply, request: payload } } );
|
||||
|
||||
payload = portal.radius_init(ctx);
|
||||
|
||||
@@ -29,6 +29,8 @@ function request_start(ctx) {
|
||||
if (radius['access-accept']) {
|
||||
if (ctx.config.final_redirect_url == 'uam')
|
||||
ctx.query_string.userurl = portal.uam_url(ctx, 'success');
|
||||
delete payload.server;
|
||||
delete payload.acct_server; // don't publish radius secrets
|
||||
portal.allow_client(ctx, { radius: { reply: radius.reply, request: payload } } );
|
||||
return;
|
||||
}
|
||||
@@ -118,6 +120,8 @@ function request_radius(ctx) {
|
||||
|
||||
let radius = portal.radius_call(ctx, payload);
|
||||
if (radius['access-accept']) {
|
||||
delete payload.server;
|
||||
delete payload.acct_server; // don't publish radius secrets
|
||||
portal.allow_client(ctx, { username: ctx.form_data.username, radius: { reply: radius.reply, request: payload } } );
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user