mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
uspot: handler-uam: fix CHAP challenge
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
committed by
John Crispin
parent
d3f4afd4a7
commit
bb4b7cb95c
@@ -18,7 +18,7 @@ function auth_client(ctx) {
|
||||
if (ctx.query_string.response) { // try challenge first
|
||||
let challenge = uam.md5(ctx.config.challenge, ctx.format_mac);
|
||||
payload.chap_password = ctx.query_string.response;
|
||||
payload.chap_challenge = ctx.config.secret ? uam.chap_challenge(challenge, ctx.config.uam_secret) : challenge;
|
||||
payload.chap_challenge = ctx.config.uam_secret ? uam.chap_challenge(challenge, ctx.config.uam_secret) : challenge;
|
||||
} else if ("password" in ctx.query_string) { // allow empty password
|
||||
payload.password = !ctx.config_uam_secret ? ctx.query_string.password :
|
||||
uam.password(uam.md5(ctx.config.challenge, ctx.format_mac), ctx.query_string.password, ctx.config.uam_secret);
|
||||
|
||||
Reference in New Issue
Block a user