mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
session_id is cleared at boot and only a successful login fills it in, while the uptime counter and last_session_use both start at 0. For the first SESSION_TIMEOUT seconds after a start, a request carrying an empty "Cookie: session=" therefore passes is_word_x(session, session_id) and is treated as logged in, which is enough for /cmd, /config and /upload. Only look at the cookie once a session has been handed out.