harden runtime config and docs

This commit is contained in:
root
2026-06-27 20:58:07 +00:00
parent c148c1b36b
commit 991a0f62b4
13 changed files with 147 additions and 62 deletions
+3 -2
View File
@@ -17,8 +17,9 @@ RENDER(Request& context)
String action = first(context.get["action"], "touch");
String session_id = session_start("uce-site-tests");
String session_path = context.server->config["SESSION_PATH"] + "/" + session_id;
if(action == "destroy")
session_destroy();
session_destroy("uce-site-tests");
else
context.session["suite"] = "http";
@@ -56,7 +57,7 @@ RENDER(Request& context)
check("session_id_create()", generated_session.length() >= 16, generated_session);
if(action == "destroy")
check("session_destroy()", session_dump.find("suite") == String::npos, session_dump);
check("session_destroy()", session_dump.find("suite") == String::npos && context.session_id == "" && context.session_name == "" && !file_exists(session_path), session_dump + " path=" + session_path);
else
check("context.session writes", context.session["suite"] == "http", session_dump);