mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
More flexible date validation
Fix #34542 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
39938297ee
commit
1dd634c0e6
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