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

Commit da390d37 authored by Clint Adams's avatar Clint Adams

if user submits an np track with length over 90 minutes, assume it is

bogus and expire it in 10.

closes #87
parent c28c8137
......@@ -43,7 +43,12 @@ if(isset($_POST['b'])) {
}
$track = $adodb->qstr($_POST['t']);
if(isset($_POST['l']) && is_numeric($_POST['l'])) {
$expires = time() + (int) $_POST['l'];
$length = (int) $_POST['l'];
if($length > 5400) {
$expires = time() + 600;
} else {
$expires = time() + (int) $_POST['l'];
}
} else {
$expires = time() + 250; //Expire in 5 minutes if we don't know the track length
}
......
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