aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-11 23:02:10 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-11 23:02:10 +0200
commit9eb67ad57df3b0ee779d09dd2f031598ed486dcb (patch)
tree3d49274ec67e6f57620eef6597a5c9631f3cfada /apps
parentcf5bf3036dee4527b93c5bb8e43c0ed3a216e15a (diff)
downloadnextcloud-server-9eb67ad57df3b0ee779d09dd2f031598ed486dcb.tar.gz
nextcloud-server-9eb67ad57df3b0ee779d09dd2f031598ed486dcb.zip
More flexible date validation
Fix #34542 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps')
-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');
}