harden runtime config and docs
This commit is contained in:
+3
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user