diff options
author | Simon L <szaimen@e.mail.de> | 2022-10-13 01:10:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 01:10:55 +0200 |
commit | d967488ec0cf6141e45ca37e0916df85161a7327 (patch) | |
tree | eeeb24b77d3bc70655ad55297fade096dd24f954 | |
parent | cbe228ae3ae96c3bfa847a4441693aa21ca0a8bb (diff) | |
parent | 9eb67ad57df3b0ee779d09dd2f031598ed486dcb (diff) | |
download | nextcloud-server-d967488ec0cf6141e45ca37e0916df85161a7327.tar.gz nextcloud-server-d967488ec0cf6141e45ca37e0916df85161a7327.zip |
Merge pull request #34544 from nextcloud/fix/more-flexible-date-validation
More flexible date validation
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 00f12ea7779..26584f6d178 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1555,7 +1555,7 @@ class ShareAPIController extends OCSController { */ private function parseDate(string $expireDate): \DateTime { try { - $date = new \DateTime($expireDate); + $date = new \DateTime(trim($expireDate, "\"")); } catch (\Exception $e) { throw new \Exception('Invalid date. Format must be YYYY-MM-DD'); } |