summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-10-13 01:10:55 +0200
committerGitHub <noreply@github.com>2022-10-13 01:10:55 +0200
commitd967488ec0cf6141e45ca37e0916df85161a7327 (patch)
treeeeeb24b77d3bc70655ad55297fade096dd24f954
parentcbe228ae3ae96c3bfa847a4441693aa21ca0a8bb (diff)
parent9eb67ad57df3b0ee779d09dd2f031598ed486dcb (diff)
downloadnextcloud-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.php2
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');
}