From 9186ab95943b7c2467a0f27f30bed9db3c589b9d Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sat, 27 Jun 2015 14:57:44 +0200 Subject: LinkDB::filterDay(): check input date format Signed-off-by: VirtualTam --- application/LinkDB.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'application/LinkDB.php') diff --git a/application/LinkDB.php b/application/LinkDB.php index a673b086..82763618 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -375,7 +375,10 @@ You use the community supported version of the original Shaarli project, by Seba */ public function filterDay($day) { - // TODO: check input format + if (! checkDateFormat('Ymd', $day)) { + throw new Exception('Invalid date format'); + } + $filtered = array(); foreach ($this->links as $l) { if (startsWith($l['linkdate'], $day)) { -- cgit v1.2.3