Merge pull request #10837 from nextcloud/dav-search-no-negative-mtime-13
[13] disallow negative mtime in dav search
This commit is contained in:
commit
1a016f21e6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue