mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
uspot: fix userurl and allow cleartext password
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Status: 302 Found
|
||||
Location: http://{{env.SERVER_ADDR}}/hotspot/?redir={{env.headers.host}}
|
||||
Location: http://{{env.SERVER_ADDR}}/hotspot/?redir={{env.headers.host}}{{env.REQUEST_URI}}
|
||||
Content-Type: text/html
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ function auth_client(ctx) {
|
||||
let payload = portal.radius_init(ctx);
|
||||
|
||||
payload.logoff_url = sprintf('http://%s:3990/', ctx.env.SERVER_ADDR);
|
||||
if (ctx.query_string.username && ctx.query_string.response) {
|
||||
if (ctx.query_string.username && ctx.query_string.password && !portal.config.uam.uam_secret) {
|
||||
payload.username = ctx.query_string.username;
|
||||
payload.password = ctx.query_string.password;
|
||||
} else if (ctx.query_string.username && ctx.query_string.response) {
|
||||
let challenge = uam.md5(portal.config.uam.challenge, ctx.format_mac);
|
||||
|
||||
payload.username = ctx.query_string.username;
|
||||
|
||||
Reference in New Issue
Block a user