some more fixes to the registration/login system

This commit is contained in:
zefie
2021-08-07 19:41:33 -04:00
parent 12be904b5c
commit d5fa489b9c
3 changed files with 16 additions and 22 deletions

View File

@@ -12,12 +12,6 @@ if (socket.ssid != null && !ssid_sessions[socket.ssid].get("wtvsec_login")) {
if (socket.ssid !== null) { if (socket.ssid !== null) {
if (wtvsec_login.ticket_b64 == null) { if (wtvsec_login.ticket_b64 == null) {
if (request_headers["wtv-ticket"]) {
if (request_headers["wtv-ticket"].length > 8) {
wtvsec_login.DecodeTicket(request_headers["wtv-ticket"]);
wtvsec_login.ticket_b64 = request_headers["wtv-ticket"];
}
} else {
challenge_response = wtvsec_login.challenge_response; challenge_response = wtvsec_login.challenge_response;
var client_challenge_response = request_headers["wtv-challenge-response"] || null; var client_challenge_response = request_headers["wtv-challenge-response"] || null;
if (challenge_response && client_challenge_response) { if (challenge_response && client_challenge_response) {
@@ -36,7 +30,6 @@ if (socket.ssid !== null) {
gourl = "wtv-head-waiter:/login?no_response=true"; gourl = "wtv-head-waiter:/login?no_response=true";
} }
} }
}
} }
if (gourl) { if (gourl) {

View File

@@ -10,4 +10,4 @@ ${getServiceString('wtv-star')}
wtv-relogin-url: wtv-1800:/preregister?relogin=true wtv-relogin-url: wtv-1800:/preregister?relogin=true
wtv-reconnect-url: wtv-1800:/preregister?reconnect=true wtv-reconnect-url: wtv-1800:/preregister?reconnect=true
wtv-boot-url: wtv-1800:/preregister?relogin=true wtv-boot-url: wtv-1800:/preregister?relogin=true
Location: wtv-1800:/preregister?relogin=true`; Location: client:relogin`;

View File

@@ -892,6 +892,7 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
if (zdebug) console.log(" # New ticket from client"); if (zdebug) console.log(" # New ticket from client");
ssid_sessions[socket.ssid].data_store.wtvsec_login.ticket_b64 = headers["wtv-ticket"]; ssid_sessions[socket.ssid].data_store.wtvsec_login.ticket_b64 = headers["wtv-ticket"];
ssid_sessions[socket.ssid].data_store.wtvsec_login.DecodeTicket(ssid_sessions[socket.ssid].data_store.wtvsec_login.ticket_b64); ssid_sessions[socket.ssid].data_store.wtvsec_login.DecodeTicket(ssid_sessions[socket.ssid].data_store.wtvsec_login.ticket_b64);
ssid_sessions[socket.ssid].data_store.wtvsec_login.set_incarnation(headers["wtv-incarnation"]);
} }
} }
} }