From c36a7145a557c66ebffef36fc2185f367239e035 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Wed, 29 Jun 2016 20:05:58 +0100 Subject: [PATCH] Sanitise track numbers --- app/Commands/ParseTrackTagsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Commands/ParseTrackTagsCommand.php b/app/Commands/ParseTrackTagsCommand.php index 6e3c1fe9..3848f4b0 100644 --- a/app/Commands/ParseTrackTagsCommand.php +++ b/app/Commands/ParseTrackTagsCommand.php @@ -80,7 +80,7 @@ class ParseTrackTagsCommand extends CommandBase if ($this->track->album_id === null) { $this->track->track_number = null; } else { - $this->track->track_number = $this->input['track_number'] ?? $parsedTags['track_number']; + $this->track->track_number = filter_var($this->input['track_number'] ?? $parsedTags['track_number'], FILTER_SANITIZE_NUMBER_INT); } $this->track->released_at = isset($this->input['released_at'])