diff options
author | Robin Appelman <robin@icewind.nl> | 2018-08-24 16:20:07 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-08-24 16:25:35 +0200 |
commit | d69234e3390b6ca0c4d5b2fb47661044a312ecfd (patch) | |
tree | 5b1afa33d09e1925f57513dbfafcbdc429b5e36b /apps/dav/lib | |
parent | ff8626f46ec53f98c6e19c782cb225aa46c61099 (diff) | |
download | nextcloud-server-d69234e3390b6ca0c4d5b2fb47661044a312ecfd.tar.gz nextcloud-server-d69234e3390b6ca0c4d5b2fb47661044a312ecfd.zip |
disallow negative mtime in dav search
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Files/FileSearchBackend.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 9616d21b887..17a4c2b1394 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -270,7 +270,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; |