mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
More flexible date validation
Fix #34542 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
cf5bf3036d
commit
9eb67ad57d
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue