Commit Graph

5398 Commits (8904bf645b30fbdfdcb00a2ea607d752ee69d865)

Author SHA1 Message Date
Côme Chilliet e24007b530
Remove deprecated at matcher in tests/lib/InstallerTest.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-14 12:52:05 +07:00
Julius Härtl 7f958e81d3
fix: Pass parent to NonExistingFile instances
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-13 10:28:28 +07:00
Daniel Kesselberg f8f985602b
test: add tests for dns pin middleware
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-09-12 14:04:23 +07:00
Côme Chilliet 4f1e5bc8fd
Merge pull request #32912 from nextcloud/group-backend-batch-method
Add batch methods in user backends
2023-09-11 11:11:00 +07:00
Julius Härtl 938a558078
Merge pull request #39226 from shdehnavi/null_coalescing_conversion_tests 2023-09-09 09:51:17 +07:00
Côme Chilliet 8549ea4025
Merge pull request #40216 from nextcloud/print-log-message-when-version-could-not-be-got-from-updater-server
Print log message when version could not be got from updater server
2023-09-07 09:33:06 +07:00
Daniel Calviño Sánchez 9a179c391e Print log message when version could not be got from updater server
This could help to diagnose why the updater server could not be reached,
as well as other subtler issues like requests taking too long if the
updater server was tried to be connected to as a "side effect" (for
example, when the "updatenotification" app boots).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-09-06 05:43:21 +07:00
Carl Schwan 3270b7f12e
Add batch methods in user backends
This allows for faster group search with significantly less DB traffic

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-09-05 16:56:47 +07:00
Côme Chilliet 637cafcf35
Fix ContactsManagerTest adressbook mocks having a null key
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-05 09:20:26 +07:00
Robin Appelman 64f62f7cfd
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
2023-09-04 14:05:14 +07:00
Simon L 489a57e9a3
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode 2023-09-04 12:05:36 +07:00
John Molakvoæ (skjnldsv) f828dce597
Fix sharing creation insert and get
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-02 10:25:24 +07:00
Robin Appelman e704470c79
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-31 22:37:10 +07:00
Benjamin Gaussorgues 303dadfaa9
sharebymail: remove ILogger and upgrade to PHP 8 syntax
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-08-30 18:36:29 +07:00
Daniel Kesselberg eab46bdfe6
feat: add switch to disable dns pinning
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-08-29 18:03:54 +07:00
Vincent Petry 8d1a3daa3f Allow ext storage Local to go unavailable
Whenever an external storage of type Local points at a non-existing
directory, process this as a StorageNotAvailable instead of returning
404.

This makes desktop clients ignore the folder instead of deleting it when
it becomes unavailable.

The code change was limited to external storages to avoid issues during
setup and with the default home storage.
Signed-off-by: Vincent Petry <pvince81@yahoo.fr>
2023-08-29 11:04:31 +07:00
Joas Schilling 6f520f2304
Merge pull request #40026 from lhsazevedo/auth-token-commands
feat: Add auth token list and delete commands
2023-08-29 08:57:07 +07:00
Lucas Azevedo 79bc6ba06c Merge branch 'master' into auth-token-commands 2023-08-28 12:25:01 +07:00
Joas Schilling 25309bcb45
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 15:50:45 +07:00
Git'Fellow 066f6ef16c Stop sending deprecated Pragma header
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-08-28 15:11:22 +07:00
Côme Chilliet fd0de0a2d1 Fix tests, add test for the new feature
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-28 09:40:12 +07:00
Lucas Azevedo 771a7b92cc Add tests for occ user:auth-tokens:delete
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
2023-08-25 02:27:41 +07:00
Joas Schilling 124588d4a6
fix: Make bypass function public API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-21 16:40:24 +07:00
Joas Schilling fd9b2d488e
feat: Expose if the own IP is allowed to bypass bruteforce protection
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-21 16:36:04 +07:00
Joas Schilling a95800c647
feat(security): Add a bruteforce protection backend base on memcache
Similar to the ratelimit backend

Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-21 16:36:03 +07:00
Robin Appelman b6c3507aa0 only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:25:28 +07:00
John Molakvoæ 998b3a2581
feat(f2v): migrate Files
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-08-17 18:56:37 +07:00
Hamid Dehnavi 271e63e41c Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-08-17 01:36:50 +07:00
Robin Appelman e73889a240 cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-16 15:25:05 +07:00
Ferdinand Thiessen 5b37d6d9ff tests: Add test for CacheEntry getters
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-08-16 14:00:21 +07:00
Côme Chilliet f57c12b14e
Fix various deprecation warnings in tests on PHP 8.3
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-14 18:13:12 +07:00
Côme Chilliet ee756579a7
Fix setting static property in tests on PHP 8.3
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-14 16:27:56 +07:00
Daniel Calviño Sánchez 41f2d912d2 Allow "wasm-unsafe-eval" in CSP
If a page has a Content Security Policy header and the `script-src` (or
`default-src`) directive does not contain neither `wasm-unsafe-eval` nor
`unsafe-eval` loading and executing WebAssembly is blocked in the page
(although it is still possible to load and execute WebAssembly in a
worker thread).

Although the Nextcloud classes to manage the CSP already supported
allowing `unsafe-eval` this affects not only WebAssembly, but also the
`eval` operation in JavaScript.

To make possible to allow WebAssembly execution without allowing
JavaScript `eval` this commit adds support for allowing
`wasm-unsafe-eval`.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-08-10 02:38:41 +07:00
Julien Veyssier f099aa2714
Merge branch 'master' into fix/llm-migration-not-executed 2023-08-07 13:26:39 +07:00
Marcel Klehr f62711d2ae Fix TextProcessing test for 32bit
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-08-07 12:03:11 +07:00
Joas Schilling 44b4c16a09
Merge pull request #39605 from nextcloud/bugfix/noid/final-events-cleanup
fix!: Final round of moving to IEventDispatcher
2023-08-04 10:39:57 +07:00
Daniel Kesselberg 0098af3b98
fix: missing argument for TextProcessing Manager
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-08-03 00:33:00 +07:00
Joas Schilling b9e2f494a1
chore!: Remove legacy SymfonyAdapter
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:22 +07:00
Joas Schilling cebf93d4d2
fix: Remove legacy dispatcher from share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:20 +07:00
Joas Schilling 8ad94cbfda
feat!: Migrate unShare events to typed events
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:20 +07:00
Joas Schilling 44b810bfbd
feat!: Migrate Sharing events to typed events
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:19 +07:00
Joas Schilling 68fc9b48c2
feat!: Migrate AccountManager event to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:19 +07:00
Marcel Klehr 7e790a3297 JobTest: Remove outdated tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-28 11:12:32 +07:00
Marcel Klehr 3d8fd2d99e cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-28 11:12:32 +07:00
Marcel Klehr 449a731375 Add test for ParallelAwareJob
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-28 11:12:32 +07:00
Joas Schilling 030e8d8916
fix: Align doc type with creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:38 +07:00
Joas Schilling 80f79e170d
fix!: Remove symfony EventDispatcherInterface from Group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +07:00
Joas Schilling ad12a740cb
fix!: Remove symfony EventDispatcherInterface from User
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +07:00
Joas Schilling 6b7221756c
Merge pull request #39571 from nextcloud/bugfix/noid/move-lib-to-IEventDispatcher
Move lib/ events to IEventDispatcher where possible
2023-07-27 18:59:42 +07:00
Daniel Kesselberg 68eecca4d4 chore: update expected results for CLDR 42
Punic 3.8.0 / CLDR 42 added a narrow no-break space unicode character for the time formats and a new default pattern for datetime.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-07-27 13:57:02 +07:00
Daniel Kesselberg 06248cda0a chore: update expected timezone from GMT+0 to UTC
Punic 3.2.0 added support for timezone translations and returns UTC instead of GMT+0 now.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-07-27 13:57:02 +07:00
Joas Schilling c67c067ee7
fix: Move Sharing events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:53 +07:00
Joas Schilling 44a0a62107
fix: Move Node HookConnecter events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:53 +07:00
Joas Schilling 6953e14580
fix: Move SystemTags events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:52 +07:00
Joas Schilling dac31ad101
fix!: Remove legacy event dispatching Symfony's GenericEvent from 2FA Manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:52 +07:00
Joas Schilling 1b387bb341
fix!: Remove legacy event dispatching Symfony's GenericEvent from AdditionalScripts
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:52 +07:00
Joas Schilling 5bb6a7804f
fix: Move AppManager events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:51 +07:00
Joas Schilling 4f7de8ed60
fix!: Remove legacy event dispatching Symfony's GenericEvent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:51 +07:00
Joas Schilling 7548e62181
Merge pull request #39506 from nextcloud/techdebt/39488/ensure-index-name-uniqueness
feat(db): Ensure that index names are unique across the database
2023-07-24 14:44:37 +07:00
Joas Schilling b80692d323
fix(tests): Adjust unit tests to outline the schema is checked twice now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-21 12:17:36 +07:00
Marcel Klehr 7c80d66ee5
Merge pull request #38854 from nextcloud/enh/llm-api 2023-07-21 11:20:31 +07:00
Benjamin Gaussorgues e9b8a34cce
Merge pull request #39264 from nextcloud/feat/add-instance-category
Add instance category while checking new updates
2023-07-21 11:04:32 +07:00
Benjamin Gaussorgues 31f1354777
Add instance category while checking new updates
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-07-18 15:39:23 +07:00
Ferdinand Thiessen 3b057600d0 fix: Correctly add `module` content type to script tags when scripts with versions are used
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-07-18 13:10:37 +07:00
Marcel Klehr ffe27ce14c Massive refactoring: Turn LanguageModel OCP API into TextProcessing API
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-14 16:00:31 +07:00
Joas Schilling 2c6f32cb28
feat(request): Allow to match the client version with the IRequest::USER_AGENT_* regex
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-11 07:35:50 +07:00
Marcel Klehr bf2dcd67f3 LLM OCP API: Change Tests to use EventDispatcher mock
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-07 13:39:10 +07:00
Marcel Klehr d56286b8ac LLM OCP API: s/getAvailableTasks/getAvailableTaskClasses/
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-07 13:39:10 +07:00
Marcel Klehr c568c4a464 Add test for task cleanup
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-07 13:39:10 +07:00
Marcel Klehr 20cb9935ca Fix tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-07 13:39:10 +07:00
Marcel Klehr ebc7631544 Add preliminary tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-07 13:39:10 +07:00
Joas Schilling 05aa39d777
Fix event names of 2FA related typed events
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-03 14:25:01 +07:00
jld3103 b0001c6010
Add template types to responses
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-06-30 09:33:29 +07:00
Joas Schilling ec6728d710
feat(HTTPClient): Provide wrapped access to Guzzle's asyncRequest()
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-06-27 15:53:57 +07:00
Daniel 9751303182
Merge pull request #38679 from nextcloud/feat/add-spec-to-preview-fetched-event
feat: add width, height, crop and mode to BeforePreviewFetchedEvent
2023-06-26 13:53:27 +07:00
Simon L f7183c9dcf
Merge pull request #38958 from nextcloud/enh/noid/use-getsystemvalue-mailer
use getsystemvalue-functions in Mailer.php
2023-06-26 10:23:29 +07:00
Arthur Schiwon 17515995fa
Merge pull request #38625 from nextcloud/fix/noid/querysearchehelper-narrow-type
fix: expect interface, not a specific implementation
2023-06-24 00:13:43 +07:00
Simon L 1cb81ae625 try to fix tests
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-06-23 17:12:45 +07:00
Daniel Kesselberg 440f882322
feat: add width, height, crop and mode to BeforePreviewFetchedEvent
user_usage_report keeps a counter for files read.

The app uses

- OC_Filesystem::read hook
- Event listener (the legacy one) for IPreview::EVENT

Request for previews do not trigger the hook, hence the additional event listener.
The thumbnails for a list or grid view should not count, so we need the width and height.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-06-23 16:27:35 +07:00
Arthur Schiwon f6ac874dbf
chore: ugly type juggling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-06-21 16:53:20 +07:00
Joas Schilling ab8205fd35
fix(l10n): Fix plural issue with different locale and language
We need to use the language code here instead of the locale,
because Symfony does not distinguish between the two and would
otherwise e.g. with locale "Czech" and language "German" try to
pick a non-existing plural rule, because Czech has 4 plural forms
and German only 2.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-06-21 07:14:56 +07:00
jld3103 7f4651637a
Allow stdClass in XML responses
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-06-13 11:44:47 +07:00
Christoph Wurst 08a3f37695
chore(appframework)!: Drop \OCP\AppFramework\Http\EmptyContentSecurityPolicy::allowInlineScript
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-12 10:03:59 +07:00
Arthur Schiwon ffa30ce89b
Merge pull request #38524 from nextcloud/chore/app/clear-unused-cache-key
chore(app): Do not clear unused cache key
2023-06-05 17:48:44 +07:00
Daniel Kesselberg a2afc7b6a9
refactor: migrate OC_EventSource to dependency injection
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-06-03 21:42:51 +07:00
Joas Schilling 6d076c1ee9
fix(dispatcher): Migrate to OCP event dispatcher before symfony/event-dispatcher upgrade
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-06-02 08:08:24 +07:00
Christoph Wurst e76d525a43
chore: Drop \OC_App::getAppInfo
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-01 11:31:27 +07:00
Christoph Wurst cf6e2fa1b7
chore: Drop \OC_App::getAppVersion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-01 11:31:26 +07:00
Christoph Wurst 3d1acca1f3
chore(app): Do not clear unused cache key
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-05-30 17:48:20 +07:00
Simon L 3d2d1c171e
Merge pull request #37758 from nextcloud/redis-atomic
redis: use atomic operations everywhere
2023-05-19 23:29:24 +07:00
Simon L 48521d67e1
Merge pull request #38143 from nextcloud/fix/generated-avatars-cache
Fix generated avatars cache
2023-05-16 11:37:49 +07:00
jld3103 2a19753cf7
Clear generated avatar caches
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-05-15 18:18:21 +07:00
Joas Schilling 3a6bc7aba2
fix(middleware): Also abort the request when reaching max delay in afterController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-15 16:20:19 +07:00
Ferdinand Thiessen 31c01fa3da fix(JSResourceLocator): Handle missing translations silently
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-05-11 18:22:24 +07:00
John Molakvoæ db02684008
Merge pull request #37691 from nextcloud/object-store-background-scan 2023-05-11 08:15:41 +07:00
Varun Patil c6cee282b3 redis: move lua scripts to class and add type hints
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2023-05-10 17:37:02 +07:00
Robin Appelman 2ea41dab93
repair -1 folder sizes for object store background scan
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-10 19:33:26 +07:00
Robin Appelman 904fdf3aa3
Merge pull request #37838 from nextcloud/event-logger-http
log performance events for http requests
2023-05-09 17:15:27 +07:00
Joas Schilling b91957e3df
fix(dav): Abort requests with 429 instead of waiting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-03 22:43:36 +07:00
Arthur Schiwon 7fcf42ad3f
Merge pull request #38024 from nextcloud/fix/fix-32bits-ci
Fix 32bits ci
2023-05-03 10:34:04 +07:00