We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit f456949b authored by clint's avatar clint

expire radio sessions after 72 hours

parent 53ccba1f
......@@ -34,7 +34,9 @@ if (!$res->numRows()) {
$session = md5($passmd5 . time());
$mdb2->query("INSERT INTO Radio_Sessions (username, session) VALUES ( " . $mdb2->quote($username, "text") . ", " . $mdb2->quote($session, "text") . ")");
$mdb2->exec("DELETE FROM Radio_Sessions WHERE expires < " . $mdb2->quote(time(), "integer"));
$mdb2->query("INSERT INTO Radio_Sessions (username, session, expires) VALUES ( " . $mdb2->quote($username, "text") . ", " . $mdb2->quote($session, "text") . ", " . time() + 259200 . ")");
echo "session=" . $session . "\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment