]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/LinkDB.php
LinkDB::filterDay(): check input date format
[github/shaarli/Shaarli.git] / application / LinkDB.php
index a673b086b056d45231d3a41e565eb2b6dc026192..827636189aa2aa85d111a2e6ffd793538d93acea 100644 (file)
@@ -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)) {