Skip to content

Commit

Permalink
WIP : Respect empty expiryDate value in server
Browse files Browse the repository at this point in the history
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
  • Loading branch information
Fenn-CS committed Apr 30, 2024
1 parent cb27fbc commit be0e0fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,13 @@ public function createShare(

$share->setNode($node);

try {
$expireDate = $expireDate !== '' ? $this->parseDate($expireDate) : null;
$share->setExpirationDate($expireDate);
} catch (\Exception $e) {
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD'));
}

try {
$this->lock($share->getNode());
} catch (LockedException $e) {
Expand Down

0 comments on commit be0e0fc

Please sign in to comment.