From 23006ae87d6896402dac96800a8cd7d0aa86f896 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 27 Nov 2023 14:47:30 +0100 Subject: [PATCH] fix(dav): Name properties table columns explicitly And ignore any optional columns. This allows instances to run the expensive query for the new column in 25 in the background, while keeping the 24 installation live. Signed-off-by: Christoph Wurst --- apps/dav/lib/DAV/CustomPropertiesBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index b74a9d4d6089d..920a06365d56f 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -234,7 +234,7 @@ private function getPublishedProperties(string $path, array $requestedProperties } $qb = $this->connection->getQueryBuilder(); - $qb->select('*') + $qb->select('id', 'userid', 'propertypath', 'propertyname', 'propertyvalue') ->from(self::TABLE_NAME) ->where($qb->expr()->eq('propertypath', $qb->createNamedParameter($path))); $result = $qb->executeQuery(); @@ -263,7 +263,7 @@ private function getUserProperties(string $path, array $requestedProperties) { } // TODO: chunking if more than 1000 properties - $sql = 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?'; + $sql = 'SELECT id, userid, propertypath, propertyname, propertyvalue FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?'; $whereValues = [$this->user->getUID(), $this->formatPath($path)]; $whereTypes = [null, null];