From c48a61a975c4d893b4ee6cc988ed7ce318f886af Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 17 Sep 2015 13:34:15 +0200 Subject: [PATCH] Discard expiration date from result for non-link shares --- lib/private/share/share.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 93b718c95db2..76eb2aad1df5 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2394,6 +2394,11 @@ private static function transformDBResults(&$row) { if (isset($row['stime'])) { $row['stime'] = (int) $row['stime']; } + if (isset($row['expiration']) && $row['share_type'] !== self::SHARE_TYPE_LINK) { + // discard expiration date for non-link shares, which might have been + // set by ancient bugs + $row['expiration'] = null; + } } /**