diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-08-24 20:32:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 20:32:26 +0200 |
commit | 29f215a90df2e6140424c9fa8df842854654f382 (patch) | |
tree | 8c95e7175182a67d62acd720d615e183ffab7869 /apps | |
parent | b1410df18e682e87aee28fb010c727c30939f5f6 (diff) | |
parent | b76e6be441feba2e40f54387d3c84ba7c06bf1af (diff) | |
download | nextcloud-server-29f215a90df2e6140424c9fa8df842854654f382.tar.gz nextcloud-server-29f215a90df2e6140424c9fa8df842854654f382.zip |
Merge pull request #10835 from nextcloud/dav-search-no-negative-mtime
disallow negative mtime in dav search
Diffstat (limited to 'apps')
-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; |