From ce53ca4dbadc0afe7373d0f580553e131b69ea67 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 25 Jun 2025 17:41:34 +0200 Subject: [PATCH 1/2] fix: properly set string values in exports to escape formulas Signed-off-by: Ferdinand Thiessen --- lib/Service/SubmissionService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Service/SubmissionService.php b/lib/Service/SubmissionService.php index baea59590..38a81bf1b 100644 --- a/lib/Service/SubmissionService.php +++ b/lib/Service/SubmissionService.php @@ -311,11 +311,12 @@ private function exportData(array $header, array $data, string $fileFormat, ?Fil ->getAlignment() ->setWrapText(true); } else { - $activeWorksheet->setCellValue([$column, $row], $value); - - // Quote cell values that start with '=' to prevent evaluation of formulas + // Explicitly set the type of the value to string for values that start with '=' to prevent it being interpreted as formulas if (is_string($value) && str_starts_with($value, '=')) { - $activeWorksheet->getCell([$column, $row])->getStyle()->setQuotePrefix(true); + $activeWorksheet->getCell([$column, $row]) + ->setValueExplicit($value); + } else { + $activeWorksheet->setCellValue([$column, $row], $value); } } } From 264ab0f17314c281f4c1c3f48426fda2f89fa58c Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 25 Jun 2025 19:16:17 +0200 Subject: [PATCH 2/2] ci: reenable coverage Signed-off-by: Ferdinand Thiessen --- .github/workflows/phpunit-sqlite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index e5bdb0215..38502105c 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -107,7 +107,7 @@ jobs: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none + coverage: xdebug ini-file: development # Temporary workaround for missing pcntl_* in PHP 8.3 ini-values: disable_functions=