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

Commit f047d3e4 authored by jurgbohn's avatar jurgbohn

Kill submission if a single track in the batch has empty mandatory field.

parent 525696ce
......@@ -60,8 +60,8 @@ for($i = 0; $i < count($_POST['a']); $i++) {
$album = 'NULL';
}
if (!isset($_POST['t'][$i])) {
continue; // If we get here with an empty trackname we drop it and move on to the next
if (!isset($_POST['t'][$i]) || !isset($_POST['a'][$i]) || !isset($_POST['i'][$i])) {
die("FAILED Track $i was submitted with empty mandatory field(s).\n");
}
switch (mb_detect_encoding($_POST['t'][$i])) {
......@@ -101,7 +101,7 @@ for($i = 0; $i < count($_POST['a']); $i++) {
}
if(($timestamp - time()) > 600) {
die("FAILED Submitted track has timestamp in the future\n"); // let's try a 10-minute tolerance
die("FAILED Submitted track has timestamp in the future\n"); // let's try a 10-minute tolerance
}
createArtistIfNew($artist);
......
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