Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
9 changes: 5 additions & 4 deletions lib/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,12 @@
->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);

Check warning on line 317 in lib/Service/SubmissionService.php

View check run for this annotation

Codecov / codecov/patch

lib/Service/SubmissionService.php#L316-L317

Added lines #L316 - L317 were not covered by tests
} else {
$activeWorksheet->setCellValue([$column, $row], $value);
}
}
}
Expand Down