summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-08-24 17:46:52 +0200
committerGitHub <noreply@github.com>2018-08-24 17:46:52 +0200
commit1a016f21e66102dc01c11e9ccd4212d79001404c (patch)
treef4d2a1eaeee8849fd022c7dc3d512a14c7903cff /apps/dav/lib
parent2d5d8b68d215dfdfc7622f8da55e118a3d4a8469 (diff)
parentd69234e3390b6ca0c4d5b2fb47661044a312ecfd (diff)
downloadnextcloud-server-1a016f21e66102dc01c11e9ccd4212d79001404c.tar.gz
nextcloud-server-1a016f21e66102dc01c11e9ccd4212d79001404c.zip
Merge pull request #10837 from nextcloud/dav-search-no-negative-mtime-13
[13] disallow negative mtime in dav search
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php2
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;