From b76e6be441feba2e40f54387d3c84ba7c06bf1af Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Aug 2018 16:20:07 +0200 Subject: disallow negative mtime in dav search Signed-off-by: Robin Appelman --- apps/dav/lib/Files/FileSearchBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 5b3c18c9720..cac6e8ac52b 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -352,7 +352,7 @@ class FileSearchBackend implements ISearchBackend { return 0 + $value; case SearchPropertyDefinition::DATATYPE_DATETIME: if (is_numeric($value)) { - return 0 + $value; + return max(0, 0 + $value); } $date = \DateTime::createFromFormat(\DateTime::ATOM, $value); return ($date instanceof \DateTime) ? $date->getTimestamp() : 0; -- cgit v1.2.3