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

Commit 6615095d authored by ward's avatar ward

properly quote session ids in DELETE FROM Now_Playing queries

parent 75830951
......@@ -64,7 +64,7 @@ getTrackCreateIfNew($artist, $album, $track, $mbid);
$mdb2->query("DELETE FROM Now_Playing WHERE expires < " . time());
//Delete this user's last playing song (if any)
$mdb2->query("DELETE FROM Now_Playing WHERE sessionid = " . $sess);
$mdb2->query("DELETE FROM Now_Playing WHERE sessionid = '" . $sess . "'");
$mdb2->query("INSERT INTO Now_Playing (sessionid, artist, album, track, expires, mbid) VALUES ("
. $sess . ", "
......
......@@ -166,7 +166,7 @@ for($i = 0; $i < count($_POST['a']); $i++) {
}
// Destroy now_playing since it is almost certainly obsolescent
$mdb2->exec("DELETE FROM Now_Playing WHERE sessionid = " . $session_id);
$mdb2->exec("DELETE FROM Now_Playing WHERE sessionid = '" . $session_id . "'");
}
}
......
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