Rewrite script processing a bit

- Instead of using eval() we now use a proper VM Context
- As a result, any scripting errors will now give a more useful filename and line number.
- However, some things may break, if they are dependant on variables we are not allowing in the context.
This commit is contained in:
zefie
2022-09-25 18:02:25 -04:00
parent 90f4896e72
commit d8da9e14c7
3 changed files with 68 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ if (socket.ssid) {
delete ssid_sessions[socket.ssid].data_store.wtvsec_login;
}
ssid_sessions[socket.ssid].data_store.wtvsec_login = new WTVSec(minisrv_config);
ssid_sessions[socket.ssid].data_store.wtvsec_login = ssid_sessions[socket.ssid].createWTVSecSession();
ssid_sessions[socket.ssid].data_store.wtvsec_login.IssueChallenge();
if (request_headers["wtv-incarnation"]) ssid_sessions[socket.ssid].data_store.wtvsec_login.set_incarnation(request_headers["wtv-incarnation"]);
} else {