aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
Commit message (Collapse)AuthorAgeFilesLines
* feat: log query for dbal exceptionsdbal-exception-queryRobin Appelman2025-02-262-6/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #50874 from nextcloud/artonge/fix/login_flow_v2_sessionsJulius Knorr2025-02-251-2/+2
|\ | | | | fix: Initialize lastConnectionCheck after first connection
| * fix: Initialize lastConnectionCheck after first connectionartonge/fix/login_flow_v2_sessionsLouis Chemineau2025-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are checking whether the DB connection is alive once every 30 seconds. But when we are lacking the last check time, we are skipping the check and reconnect logic. This is causing the reconnect logic to never fire in those cases. It seems to me that "those cases", are actually always the case, as upon initialization, we are not using the proper connection name to store the time. In the `connect()` logic, when `$this->_conn` is null, `$this->getConnectionName()` is returning `replica`, so `$this->lastConnectionCheck` will be equal to `['replica' => time()];` https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/lib/private/DB/Connection.php#L215-L221 https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/lib/private/DB/Connection.php#L891-L893 https://github.com/nextcloud/3rdparty/blob/2b6d7bf65ff242ea050e736925f752a38d8da220/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php#L136-L139 Then, if the connection name ends up as being 'primary', the reconnect logic is skipped: https://github.com/nextcloud/server/blob/60711ea4cfde6f53d0b18bcd7e166a34a43056a5/lib/private/DB/Connection.php#L874-L880 Follow-up of https://github.com/nextcloud/server/pull/41819 Signed-off-by: Louis Chemineau <louis@chmn.me>
* | refactor: convert sanitize account properties repair step to background jobfix/account-property-validationFerdinand Thiessen2025-02-243-12/+41
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix: Optimize repair step performanceFerdinand Thiessen2025-02-241-3/+21
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix: validate account properties as a repair stepFerdinand Thiessen2025-02-243-72/+60
|/ | | | | | | | Replace `ValidatePhoneNumber` from Nextcloud 21 with a new repair step, `ValidateAccountProperties` which validates and sanitizes all account properties. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(cron): Keep job class limitation when searching for the next jobbugfix/noid/keep-job-class-limitationJoas Schilling2025-02-191-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #50864 from nextcloud/fix/fix-psalm-taint-errors-2Joas Schilling2025-02-183-37/+17
|\ | | | | fix: Fix psalm taint false-positives by small refactorings
| * fix: Fix psalm taint false-positives by small refactoringsfix/fix-psalm-taint-errors-2Côme Chilliet2025-02-173-37/+17
| | | | | | | | | | | | | | Mostly make it clear that we trust admin input or that we correctly escape strings. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix(files): properly forward open params from short urlsskjnldsv2025-02-181-2/+3
|/ | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: Add missing star in phpdoc commentfix/fix-psalm-taint-errorsCôme Chilliet2025-02-171-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix false-positive psalm taint errors when outputting plain textCôme Chilliet2025-02-171-2/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix psalm taint false-positive by escaping trusted inputCôme Chilliet2025-02-171-11/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Correctly tag json encoding in BaseResponse to fix false-positiveCôme Chilliet2025-02-171-1/+9
| | | | | | …in psalm taint analysis Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Move config.php taint trust upstream directly in OC\Config classCôme Chilliet2025-02-172-21/+23
| | | | | | This solves some false-positive psalm taint errors Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Work around psalm taint false-positive by not using var_exportCôme Chilliet2025-02-171-1/+1
| | | | | | | | | var_export is listed as a taint sink because it may output stuff depending on the parameters. It was not the case here, but we can simply json_encode the result by passing it as context to the logger method rather than using var_export. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Correctly flag json encoding methods as escaping html and quotesCôme Chilliet2025-02-171-2/+3
| | | | | | | Especially with JSON_HEX_TAG it’s perfectly fine to echo JSON, and we only use it in JSON output anyway. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix psalm taint error in L10N factoryCôme Chilliet2025-02-171-3/+24
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(repair): PHP8.3 deprecation warningfixPhp83DeprecationGit'Fellow2025-02-141-8/+4
| | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #50794 from nextcloud/fix/fix-appmanager-cleanappidCôme Chilliet2025-02-131-2/+17
|\ | | | | fix: Only keep allowed characters in appid, and flag the method as escaping
| * fix: Also remove digits at the start and underscore on both ends of appidfix/fix-appmanager-cleanappidCôme Chilliet2025-02-131-1/+1
| | | | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * fix: Only keep allowed characters in appid, and flag the method as escapingCôme Chilliet2025-02-131-2/+17
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #50781 from nextcloud/perf/improve-incomplete-scanBenjamin Gaussorgues2025-02-132-15/+6
|\ \ | |/ |/| perf(files): faster query to fetch incomplete directories
| * perf(files): faster query to fetch incomplete directoriesperf/improve-incomplete-scanBenjamin Gaussorgues2025-02-132-15/+6
| | | | | | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* | fix: Replace getInstalledApps calls with getEnabledAppsfix/clarify-app-manager-methodsCôme Chilliet2025-02-136-6/+6
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix: Replace isInstalled calls with isEnabledForAnyone or isEnabledForUserCôme Chilliet2025-02-133-4/+4
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | chore: Improve naming of methods and properties in AppManagerCôme Chilliet2025-02-131-21/+23
| | | | | | | | | | | | Remove all references to installed apps where it’s about enabled apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix(ocp): Deprecate getInstalledApps and replace with clearer method nameCôme Chilliet2025-02-131-1/+10
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix(ocp): Deprecate isInstalled and add isEnabledForAnyone insteadCôme Chilliet2025-02-131-3/+5
|/ | | | | | The method name was really confusing Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #50498 from nextcloud/bug/48678/restore-dav-error-response-2Daniel2025-02-111-16/+8
|\ | | | | Don't rethrow a type error
| * fix: make locked exception path relative to the viewRobin Appelman2025-02-111-16/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: don't use cached root info from shared cache if the watcher has ↵Robin Appelman2025-02-062-0/+16
|/ | | | | | detected an update Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #49955 from nextcloud/occ-upgrade-reminderLouis2025-02-061-1/+1
|\ | | | | fix: when already upgrading, don't instruct to run `occ upgrade`
| * fix: when already upgrading, don't instruct to run `occ upgrade`occ-upgrade-reminderJosh2025-02-051-1/+1
| | | | | | | | | | Fixes #36289 Signed-off-by: Josh <josh.t.richards@gmail.com>
* | Merge pull request #50660 from nextcloud/fix/mime-intJohn Molakvoæ2025-02-061-4/+11
|\ \ | | | | | | fix: make sure we process mime extensions as string
| * | fix: psalm and OCP @since declarationsfix/mime-intJohn Molakvoæ2025-02-061-2/+2
| | | | | | | | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * | fix: make sure we process mime extensions as stringskjnldsv2025-02-051-4/+11
| | | | | | | | | | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* | | fix(FediverseAction): Ensure valid fediverse links are generatedFerdinand Thiessen2025-02-061-5/+18
| | | | | | | | | | | | | | | | | | Harden also for existing values of the profile. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | fix(AccountManager): Sanitize social media handlesFerdinand Thiessen2025-02-061-78/+125
| |/ |/| | | | | | | | | Ensure to only accept valid X and fediverse handles. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix(oauth2): adjust db schemas when migrating from owncloudfix/oauth2/owncloud-migrationRichard Steinmetz2025-02-052-6/+96
|/ | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* fix(TaskProcessing\Manager): Always use distributed cache and use PHP serializeMarcel Klehr2025-02-041-0/+1
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: lib/private/TaskProcessing/Manager.phpMarcel Klehr2025-02-041-2/+4
| | | | Co-authored-by: Julien Veyssier <julien-nc@posteo.net> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix(TaskProcessing\Manager): Always use distributed cache and use PHP serializefix/taskprocessing-cacheMarcel Klehr2025-02-041-6/+3
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Merge pull request #50069 from michielbdejong/fix-36340Joas Schilling2025-02-031-0/+4
|\ | | | | Fix OCM implementation has wrong parameter names
| * Merge branch 'master' into fix-36340Michiel de Jong2025-01-2946-421/+1153
| |\
| * | fix: copy sharedBy[DisplayName] to sender[DisplayName], fixes #36340Michiel de Jong2025-01-291-0/+4
| | | | | | | | | | | | Signed-off-by: Michiel de Jong <michiel@pondersource.com>
* | | Merge pull request #50530 from nextcloud/fix/convert-typeKate2025-01-301-7/+5
|\ \ \
| * | | fix(ConvertType): Read dbtype in createConnectionParams and remove safeguardNils Wenninghoff2025-01-301-7/+5
| | |/ | |/| | | | | | | Signed-off-by: Nils Wenninghoff <nils@ungemein.cool>
* / | fix: Exclude non accepted shares when computing access listartonge/fix/access_list_unaccepted_sharesLouis Chemineau2025-01-301-0/+12
|/ / | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Merge pull request #50514 from nextcloud/feat/s3/sse-cAndy Scherzinger2025-01-291-1/+1
|\ \ | | | | | | feat(S3): add SSE-C support in S3 External Storage