Commit Graph

15421 Commits (71759bf856f5b419ee248729bbbba0b5fb80dc87)

Author SHA1 Message Date
Stephan Orbaugh 3bc3d03048
Merge pull request #51000 from nextcloud/fix/federatedfilesharing/group-cleanup
fix(FederatedShareProvider): Delete external shares when groups are deleted or users removed from a group
2025-03-03 16:29:10 +07:00
provokateurin 0df4817be1
fix(Share20\Manager): Propagate user and group deletion to remote share providers
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-03 12:49:01 +07:00
provokateurin dd47daa4a8
fix(Share20): Convert broken hooks to IEventListener
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-03 12:49:01 +07:00
provokateurin 8acfc0f0f2
refactor(TempManager): Simplify and unify implementations and remove legacy behavior
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-03 11:11:12 +07:00
Louis afae742a2b
Merge pull request #51095 from nextcloud/artonge/fix/epehmeral_sessions
fix(login): Ephemeral sessions
2025-03-03 10:06:27 +07:00
Varun Patil c414ddee54 feat(db): add truncateTable method
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2025-03-02 10:36:13 +07:00
Ferdinand Thiessen c82337f3b9
fix: incorrect types detected by updated stubs
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-27 19:07:39 +07:00
Côme Chilliet 001b12c482
Merge pull request #50999 from nextcloud/fix/move-away-from-oc-app
fix: Replace OC_App calls by IAppManager
2025-02-27 18:33:47 +07:00
Louis Chemineau 68f86b3066
fix(login): Support subfolder install for ephemeral sessions
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-27 16:22:45 +07:00
Louis Chemineau 47bd75a052
fix(login): Also check legacy annotation for ephemeral sessions
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-27 13:12:55 +07:00
Louis c7900de4f2
Merge pull request #51051 from nextcloud/artonge/fix/login_flow_v2_sessions_2
feat: Close sessions created for login flow v2
2025-02-27 08:52:00 +07:00
Louis 2afb6ed50a
Merge pull request #51050 from nextcloud/artonge/fix/extra_files_integrity_check
fix: Report duplicated extra files in integrity check
2025-02-26 14:22:00 +07:00
Louis Chemineau c6293204a2
feat: Close sessions created for login flow v2
Sessions created during the login flow v2 should be short lived to not leave an unexpected opened session in the browser.

This commit add a property to the session object to track its origin, and will close it as soon as possible, i.e., on the first non public page request.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-26 13:42:18 +07:00
Louis Chemineau cdd00bf803
fix: Report duplicated extra files in integrity check
The `array_diff` is not comparing the array keys. This means that an extra key with an expected hash will not be reported. Using `array_diff_assoc` will report such files.

For example, copying `status.php` to `status 2.php`, will only be reported with the new version.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-26 10:28:39 +07:00
Joas Schilling 095ab4419e
fix(l10n): Improve english source strings
- No leading/trailing whitespace
- Use asci single quote

Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-02-26 09:54:32 +07:00
Andy Scherzinger 48d69c727a
fix(lint): correct comment identation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-02-25 22:35:50 +07:00
Andy Scherzinger 388301275b
Merge pull request #50764 from p1gp1g/patch-1
Update doc comment for prefixTableName
2025-02-25 22:16:04 +07:00
Robin Appelman 0a77ba99a2
feat: support migrating an instance to sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-25 17:52:40 +07:00
Julius Knorr 0427d5d207
Merge pull request #50874 from nextcloud/artonge/fix/login_flow_v2_sessions
fix: Initialize lastConnectionCheck after first connection
2025-02-25 08:34:35 +07:00
Côme Chilliet d189ed3dd9 fix: Remove incorrect `@throws` annotations and move away from OC_App
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-24 17:48:34 +07:00
Côme Chilliet 34139987d6 fix: Replace OC_App calls by IAppManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-24 17:48:34 +07:00
Ferdinand Thiessen e3af27b280
refactor: convert sanitize account properties repair step to background job
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-24 15:16:28 +07:00
Ferdinand Thiessen 575222b5af
fix: Optimize repair step performance
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-24 15:16:28 +07:00
Ferdinand Thiessen 08d33a9f57
fix: validate account properties as a repair step
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>
2025-02-24 15:16:27 +07:00
Louis Chemineau 066c92f7b0 fix: Initialize lastConnectionCheck after first connection
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()];`

60711ea4cf/lib/private/DB/Connection.php (L215-L221)

60711ea4cf/lib/private/DB/Connection.php (L891-L893)

2b6d7bf65f/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php (L136-L139)

Then, if the connection name ends up as being 'primary', the reconnect logic is skipped:

60711ea4cf/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>
2025-02-19 12:25:12 +07:00
Joas Schilling 73d94353d1
fix(cron): Keep job class limitation when searching for the next job
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-02-19 08:44:33 +07:00
Joas Schilling a80d7ce11d
Merge pull request #50864 from nextcloud/fix/fix-psalm-taint-errors-2
fix: Fix psalm taint false-positives by small refactorings
2025-02-18 13:59:30 +07:00
skjnldsv 2e50a39265 fix(files): properly forward open params from short urls
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-18 10:53:23 +07:00
Côme Chilliet e757b649b7
fix: Fix psalm taint false-positives by small refactorings
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>
2025-02-17 18:08:23 +07:00
Côme Chilliet c1c59f9a6c
chore: Add missing star in phpdoc comment
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:23 +07:00
Côme Chilliet 640dbd0b5e
fix: Fix false-positive psalm taint errors when outputting plain text
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:23 +07:00
Côme Chilliet 7c907223d2
fix: Fix psalm taint false-positive by escaping trusted input
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:22 +07:00
Côme Chilliet fa108d5b54
fix: Correctly tag json encoding in BaseResponse to fix false-positive
…in psalm taint analysis

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:22 +07:00
Côme Chilliet aac79bad9b
fix: Move config.php taint trust upstream directly in OC\Config class
This solves some false-positive psalm taint errors

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:20 +07:00
Côme Chilliet 85fbd3eb0a
fix: Work around psalm taint false-positive by not using var_export
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>
2025-02-17 15:24:08 +07:00
Côme Chilliet fec865cc29
chore: Correctly flag json encoding methods as escaping html and quotes
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>
2025-02-17 15:24:07 +07:00
Côme Chilliet 579a337750
fix: Fix psalm taint error in L10N factory
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:24:07 +07:00
Git'Fellow 885175772b fix(repair): PHP8.3 deprecation warning
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-02-14 11:55:19 +07:00
Côme Chilliet b003af2364
Merge pull request #50794 from nextcloud/fix/fix-appmanager-cleanappid
fix: Only keep allowed characters in appid, and flag the method as escaping
2025-02-13 17:23:44 +07:00
Côme Chilliet 6e7c97ea1f
fix: Also remove digits at the start and underscore on both ends of appid
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2025-02-13 16:22:21 +07:00
Benjamin Gaussorgues c71bc0696f
Merge pull request #50781 from nextcloud/perf/improve-incomplete-scan
perf(files): faster query to fetch incomplete directories
2025-02-13 15:21:25 +07:00
Côme Chilliet 8f57a50767
fix: Only keep allowed characters in appid, and flag the method as escaping
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 14:21:36 +07:00
Côme Chilliet f758f565d4
fix: Replace getInstalledApps calls with getEnabledApps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:20 +07:00
Côme Chilliet a3685551f7
fix: Replace isInstalled calls with isEnabledForAnyone or isEnabledForUser
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:19 +07:00
Côme Chilliet cffd2c8d09
chore: Improve naming of methods and properties in AppManager
Remove all references to installed apps where it’s about enabled apps

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:19 +07:00
Côme Chilliet fb917c495b
fix(ocp): Deprecate getInstalledApps and replace with clearer method name
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:19 +07:00
Côme Chilliet d2864f7d84
fix(ocp): Deprecate isInstalled and add isEnabledForAnyone instead
The method name was really confusing

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:18 +07:00
Benjamin Gaussorgues 9bdee76535
perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-13 10:11:02 +07:00
S1m da090c7a7a
Update doc comment for prefixTableName
Signed-off-by: S1m <31284753+p1gp1g@users.noreply.github.com>
2025-02-11 17:44:39 +07:00
Daniel 90a1aea574
Merge pull request #50498 from nextcloud/bug/48678/restore-dav-error-response-2
Don't rethrow a type error
2025-02-11 17:28:44 +07:00