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:20:07 +0200 |
commit | b76e6be441feba2e40f54387d3c84ba7c06bf1af (patch) | |
tree | 05d995415901674383c74e56f523e05e7e6e385c /apps/dav | |
parent | a0b84bc0fc10293275c9f97b76c111294f40f595 (diff) | |
download | nextcloud-server-b76e6be441feba2e40f54387d3c84ba7c06bf1af.tar.gz nextcloud-server-b76e6be441feba2e40f54387d3c84ba7c06bf1af.zip |
disallow negative mtime in dav search
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-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 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; |