Commit Graph

5228 Commits

Author SHA1 Message Date
Robin Appelman
1850d0ae96 cleanup scannertest a bit
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:56:51 +02:00
Robin Appelman
1374cbee3e store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:54:26 +02:00
Robin Appelman
887952b4f4 add tests for cached mount provider migration
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:47:43 +02:00
Robin Appelman
5e375d9092 Revert "store unencrypted size in the unencrypted_size column"
This reverts commit 8238582e59.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:14 +02:00
Robin Appelman
6e0123a1d0 Revert "add case statement to sql function builder"
This reverts commit 2a68819a67.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:13 +02:00
Carl Schwan
51b9847fad
Merge branch 'master' into display-name-cache-public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-15 15:28:30 +02:00
Carl Schwan
f8b13ecd60
Merge pull request #32363 from nextcloud/cleanup/remove-long-deprecated-classes
Remove OCP\App and OCP\BackgroundJob
2022-08-08 17:05:11 +02:00
Carl Schwan
49334e4d9c
Fix many tests and warnings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:51 +02:00
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:19 +02:00
Vincent Petry
cbd5cef2cc
Merge pull request #33398 from nextcloud/enh/noid/sensitive-methods-apps
allow apps to specify methods carrying sensitive parameters
2022-08-05 14:09:55 +02:00
Simon Leiner
09362eaeaa
Support specifying IPv6 proxies in CIDR notation
Previously, it was not possible to use CIDR notation for IPv6 proxies
in the trusted_proxies parameter of config.php [1]. This patch adds
support for that.

[1]: https://docs.nextcloud.com/server/24/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies

Signed-off-by: Simon Leiner <simon@leiner.me>
2022-08-02 17:36:47 +02:00
Julius Härtl
9475cc02b2
Merge pull request #32958 from nextcloud/fix/noid/permission-update-allow-public-uploads 2022-08-02 16:49:27 +02:00
Julien Veyssier
acc68e9f93
fix share manager tests
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-08-02 01:35:10 +02:00
Côme Chilliet
cb271b759e
Fix dynamic property creations in test files
This fixes warnings in PHP 8.2

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 15:07:53 +02:00
Carl Schwan
458c2fa297
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23

IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-01 09:46:40 +02:00
Carl Schwan
f74e89bde5
Merge pull request #32482 from nextcloud/enh/noid/share-attributes
Add share attributes + prevent download permission
2022-08-01 09:44:31 +02:00
Carl Schwan
952acd4d27
Merge pull request #33225 from nextcloud/fix/handle-one-time-passwords
Handle one time password better
2022-07-29 12:26:52 +02:00
Arthur Schiwon
6941c91531
add unit test for ExceptionSerializer
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-29 12:07:41 +02:00
Vincent Petry
03b1791cca
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +02:00
Vincent Petry
a95c19e14b
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +02:00
Carl Schwan
702445ba3b
Handle one time password better
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-28 14:26:25 +02:00
Côme Chilliet
7615536977
Merge pull request #33031 from nextcloud/fix/improve-local-ip-detection
Improve local IP detection
2022-07-26 11:39:32 +02:00
blizzz
bbe15b4b43
Merge pull request #33129 from nextcloud/fix-reading-blob-as-resources
Fix reading blob data as resource
2022-07-25 17:56:03 +02:00
Vitor Mattos
7a0648757a
Delete comments that expired now
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-07-25 11:30:20 -03:00
Thomas Citharel
1d30fb7852
Fix reading blob data as resource
PostgreSQL returns data as resource when using IQueryBuilder::PARAM_LOB
(which is used for QBMapper).

Previously we just converted this resource using settype, which produced
things like "Resource id #14" instead of the actual resource data.

Now we read the stream correctly if the returned data is a resource

See context at #22472

Fixes #22439

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-07-25 09:45:47 +02:00
Carl Schwan
6c3c7a5e4d
Merge pull request #32981 from nextcloud/typing/carl/simplefs
Add typing to SimpleFS
2022-07-18 12:34:11 +02:00
Carl Schwan
19a36b58a6 Add typing to SimpleFS
- Fix putContent sometimes return a bool and sometimes nothing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 17:20:51 +02:00
Carl Schwan
d5c23dbb9f Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +02:00
Côme Chilliet
c20d34b2ca
Merge pull request #32552 from nextcloud/enh/improve-job-handling-commands
Improve job handling through occ
2022-07-12 16:04:57 +02:00
Côme Chilliet
0386f4270b
Fix DummyJobList typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-12 14:27:02 +02:00
Côme Chilliet
c5ffd7ce32
Use Symfony IpUtils to check for local IP ranges
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-12 12:09:05 +02:00
Carl Schwan
16b5e6bc7f
Merge pull request #32973 from nextcloud/cleanup/avatar-code
Cleanup avatar related code
2022-07-11 11:56:39 +02:00
Côme Chilliet
50a7f612d9 Fix DummyJobList class used by tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-11 09:46:23 +00:00
blizzz
74ebb72622
Merge pull request #33110 from nextcloud/feat/handle-onetime-password-large
Handle one time password and very large passwords
2022-07-08 19:54:05 +02:00
Carl Schwan
ec5cbdeb7f Make Color class public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-05 14:44:44 +02:00
Carl Schwan
1c23c029af Handler large passwords
For passwords bigger than 250 characters, use a bigger key since the
performance impact is minor (around one second to encrypt the password).

For passwords bigger than 470 characters, give up earlier and throw
exeception recommanding admin to either enable the previously enabled
configuration or use smaller passwords.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-05 11:37:14 +02:00
Carl Schwan
cdf3b60555 Handle one time passwords
This adds an option to disable storing passwords in the database. This
might be desirable when using single use token as passwords or very
large passwords.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-05 11:25:44 +02:00
szaimen
2ad53742f2 fix external storages access
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-07-01 22:52:10 +02:00
Joas Schilling
d722a0c12a
Adjust fake manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-07-01 16:38:58 +02:00
Joas Schilling
198224bf7a
Allow to expire comments of multiple objects with one call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-07-01 15:59:29 +02:00
Côme Chilliet
64bff27c99
Merge pull request #32960 from nextcloud/fix/avoid-using-undeclared-properties
Fix PHP 8.2 warnings about undeclared properties
2022-06-28 12:05:16 +02:00
Louis
0fe7064fc4
Merge pull request #32998 from nextcloud/fix/setting_name
Rename setting name to reduce its length
2022-06-27 11:58:54 +02:00
Louis Chemineau
347ca20f4e Rename setting name to reduce its length
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-06-27 11:04:17 +02:00
blizzz
4722baf970
Merge pull request #32863 from nextcloud/feature/add-comments-expire-date
Add comments expire date
2022-06-24 10:28:13 +02:00
Carl Schwan
812016d626 Cleanup avatar related code
- Move event listener to new event handling
- Add typing almost everywhere
- Fix inconsistent interface parameter

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-22 16:11:42 +02:00
blizzz
cf5452e633
Merge pull request #32242 from nextcloud/fix-logging-data-array
Fix logging data context to file
2022-06-21 18:49:08 +02:00
Côme Chilliet
1bd5222224
Fix PHP 8.2 warnings about undeclared properties
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-21 16:17:52 +02:00
blizzz
53eafc0cb7
Merge pull request #32868 from nextcloud/fix/replace-opis-closure-by-laravel-fork
Replace opis/closure by laravel/serializable-closure
2022-06-21 12:21:32 +02:00
Côme Chilliet
fd8f2aff09
Merge pull request #32901 from nextcloud/fix/remove-at-matcher-in-lib-tests
Remove at matcher uses in tests/lib
2022-06-21 11:45:00 +02:00
Côme Chilliet
95f0cb2a2a
Add a test about unserializing data from opis/closure serialization
We need to be able to unserialize data from before upgrade.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-20 17:34:29 +02:00
Vitor Mattos
3be1217c04
Follow the most common pattern used in project
```
git grep strval|wc -l
32
git grep "(string)"|wc -l
481
```

Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-06-20 11:46:13 -03:00
Côme Chilliet
6a1510f8ee
Remove some more at matchers in tests/lib
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-20 10:53:06 +02:00
Richard Steinmetz
c1f054a9e0
Fix email shares not being shown to other users
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2022-06-17 17:31:26 +02:00
Arthur Schiwon
8b2b5946e6
make placeholder a const for reuse
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:38:29 +02:00
Arthur Schiwon
891c10d09d
fix overwriting original vars when logging
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:36:58 +02:00
Arthur Schiwon
09a5947a6d
add serializer test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:36:58 +02:00
Côme Chilliet
c7e1c36362
Remove at matcher uses in tests/lib
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-16 17:43:17 +02:00
Vitor Mattos
c59b0c2ff7
Add comments expire date
https://github.com/nextcloud/spreed/pull/7327

Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-06-15 11:58:29 -03:00
Vincent Petry
8809de1eef
Merge pull request #31966 from nextcloud/unencrypted-size
store unencrypted size in the unencrypted_size column
2022-06-13 11:55:37 +02:00
Joas Schilling
6e3d668436
Keep non default protocol in cloud id
When there is no protocol on the cloud id, we assume it's https://
But this means that when an http:// server currently sends an OCM
invite to another server, the protocol is striped and the remote
instance will try to talk back to https:// which might not be available.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-06-09 15:23:05 +02:00
Pytal
e76d8bb901
Merge pull request #32697 from nextcloud/fix/get-avatar-authz 2022-06-08 16:27:31 -07:00
Christopher Ng
7c50dd888e Test all scopes
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-07 23:57:21 +00:00
Christopher Ng
7455cd9dd7 Fix get avatar authorization
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-07 23:57:21 +00:00
Julius Härtl
50ed84fe17
Simlify tests for integrity check on modified mimetype lists
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-07 21:54:27 +02:00
Robin Appelman
8238582e59
store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 16:07:00 +02:00
Robin Appelman
2a68819a67
add case statement to sql function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 15:52:12 +02:00
Vincent Petry
b212e8dcc9
Add unit tests for encryption's isSystemWideMountPoint
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-06-01 18:10:59 +02:00
blizzz
699f259c45
Merge pull request #32667 from nextcloud/followup/32655/fix-tests
Fix unit tests
2022-05-31 11:30:51 +02:00
Joas Schilling
279e06a80f
Merge pull request #32587 from nextcloud/bugfix/noid/improve-jsconfighelper
Improve JSConfigHelper code quality a bit
2022-05-31 10:29:30 +02:00
Joas Schilling
c2af3667dc
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-31 10:23:52 +02:00
Julius Härtl
3901a93c72
Use JSON_THROW_ON_ERROR instead of custom error handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-30 19:17:49 +02:00
Carl Schwan
1164c762eb
Merge pull request #31948 from nextcloud/core-cleanup-74
Update core to PHP 7.4 standard
2022-05-30 14:37:37 +02:00
Joas Schilling
f9efc410fa
Restore old behaviour of sending flase for not found apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-30 12:41:35 +02:00
Carl Schwan
8d599c3410
Merge pull request #32378 from nextcloud/fix/psalm-userbackend
Fix psalm issues related to the user backend
2022-05-23 11:41:21 +02:00
Carl Schwan
b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 22:18:06 +02:00
Carl Schwan
9ec0cb0a90 Fix psalm issues related to the user backend
- Reflect the actual return value returned by the implementation in the
  the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
  Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
  methods. Also helps with getting rid at some point of the old
  implementActions

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 17:14:58 +02:00
Simon L
18dd460720
Merge pull request #26813 from nextcloud/feature/files-search-tags
Files: Extend search to also cover tags
2022-05-18 10:58:02 +02:00
Robin Appelman
6d6662ec68
expose displayname cache trough a public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-18 03:47:34 +02:00
Marcel Klehr
f755ee0868 Files: Extend search to also cover tags
fixes #326

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2022-05-17 21:05:09 +02:00
Thomas Citharel
4d26a9afa0
Allow to tweak default scopes for accounts
Close #6582

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-16 22:54:51 +02:00
Joas Schilling
fd576b568c
Merge pull request #32305 from nextcloud/bugfix/32302/fix-browser-agent-trimming
Fix user agent trimming on installation
2022-05-16 11:20:46 +02:00
John Molakvoæ
85758a4f70
Merge pull request #31662 from nextcloud/modernize-contactmenu 2022-05-13 20:14:31 +02:00
John Molakvoæ
9a9409e315
Remove SCSSCacher
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-13 16:10:45 +02:00
Carl Schwan
9fcf531154
Merge pull request #30863 from nextcloud/performance/saving-user-profile-info
Minor optimizations for saving user personal information
2022-05-13 12:56:39 +02:00
John Molakvoæ
fe33e9c08c
Merge pull request #32250 from nextcloud/cleanup/cappedmemorycache 2022-05-13 08:27:28 +02:00
Carl Schwan
eef973e85b Minor optimizations for saving user personal information
* Remove double hook: the OC_User::changeUser triggers an
OC\AccountManager::userUpdated and the app is already listening to this
signal in its Application definition

* Make createCard not check if an card exists if we already checked
  previously. We also don't try to get the card if the user is disabled
  as we don't use the card in this case

We this change we go from 100 DB requests to 80 DB requests when saving
an user email address.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit c6fd482edf33214a9ad4787e4cac278f871fa7c8)
2022-05-12 21:02:52 +02:00
Carl Schwan
23771f0587
Merge pull request #32077 from nextcloud/cleanup/lock
Cleanup lock related code
2022-05-12 20:57:38 +02:00
Thomas Citharel
232322fe06
Modernize contacts menu
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-12 18:31:59 +02:00
Carl Schwan
fcae6a68c3 Cleanup lock related code
- Port to QueryBuilder
- Improve the doc a bit
- Add type hinting

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:09:58 +02:00
Carl Schwan
ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +02:00
Vincent Petry
01dbd22c9c
Validate requested length is random string generator
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-05-12 13:58:18 +02:00
John Molakvoæ
3c6253f965
Remove old legacy SvgController and IconsCacher
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-10 23:24:07 +02:00
Joas Schilling
7b3e2217de
Fix user agent trimming on installation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-09 08:36:34 +02:00
Vincent Petry
7718c9776c
Merge pull request #32113 from nextcloud/bugfix/noid/fix-csp-merging-bools
Add CSP policy merge priority for booleans
2022-05-05 17:26:48 +02:00
Joas Schilling
290697b08f
Merge pull request #32220 from nextcloud/feature/add-tests-to-validate-emojis
Include more emoji chars to test and fixes after include it
2022-05-03 16:08:19 +02:00
Thomas Citharel
1e7d924c61
Fix logging data context to file
It was only logged when an exception was provided or when using
logData (which is not being much used).

We make sure the interpolated parameters are not logged.

Only tested with file write logger, but shouldn't work differently.

Crash reporters always had the context.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-02 19:29:35 +02:00
Côme Chilliet
459202d54c
Merge pull request #31752 from nextcloud/fix/remove-still-more-ilogger
Move away from deprecated ILogger
2022-05-02 10:15:10 +02:00
Vitor Mattos
cefcd55994
Include more emoji chars to test and fixes after include it
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-04-29 14:00:57 -03:00
Côme Chilliet
8184e356f4
Remove test for removed class SearchResultSorter
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-28 14:56:26 +02:00
Joas Schilling
902476fa20
Extract the EmojiService from user status and add an OCP interface
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-28 07:09:44 -03:00
Joas Schilling
a4cd9fd37c
Add a unit test for translation with trailing colon
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-26 11:05:19 +02:00
Carl Schwan
59e0402691
Merge pull request #32069 from nextcloud/cleanup/allconfig-sql
Cleanup AllConfig
2022-04-25 18:56:15 +02:00
Kirill Popov
0b27b9e658 Get not only time-sensitive next job from list but any
Before the change webcron used to select
**only** time-sensitive tasks.

Signed-off-by: Kirill Popov <kirill.s.popov@gmail.com>
2022-04-24 21:55:53 +03:00
Carl Schwan
8bbdd9ea0c Cleanup AllConfig
- Port to QueryBuilder
- More typing when possible
- Import classes with 'use'

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-22 16:03:29 +02:00
Joas Schilling
efb432865f
Fix test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-20 13:08:31 +02:00
Carl Schwan
7817845538 Add a metadata service to store file metadata
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +02:00
Vincent Petry
cd95fce105
Merge pull request #31932 from nextcloud/feat/ignore_second_dn
Add settings to ignore second display name in search
2022-04-13 09:52:38 +02:00
Louis Chemineau
37f1c8640e Add settings to ignore second display name in search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-04-12 17:27:59 +02:00
Maxence Lange
d70d90702f
Merge pull request #31907 from nextcloud/enh/noid/tag-remote-as-globalscale
confirm user is internal to globalscale
2022-04-12 11:10:36 -01:00
Maxence Lange
10eafd70c8 confirm user is internal to globalscale
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-04-12 09:11:05 -01:00
Cyrille Bollu
c6a5c07041 Adds a "Request password" button to the public share authentication page for shares
of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. Users accessing
non-anonymous public shares (TYPE_EMAIL shares) can now request a temporary password themselves.

- Creates a migration step for the files_sharing app to add the 'password_expiration_time'
  attribute to the oc_shares table.
- Makes share temporary passwords' expiration time configurable via a system value.
- Adds a system config value to allow permanent share passwords

-Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue

See https://github.com/nextcloud/server/issues/31005

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
2022-04-11 21:58:24 +02:00
Robin Appelman
151c800397
allow reusing known folder info when getting directory contents
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-06 14:40:34 +02:00
Vincent Petry
b8b4d247b4
Merge pull request #31194 from nextcloud/feat/allow-to-exclude-groups-from-password-enforcement
Allow to disable password policy enforcement for selected groups
2022-04-06 10:13:23 +02:00
Carl Schwan
a29251e02d Allow to disable password policy enforcement for selected groups
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Co-authored-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-04-05 17:04:17 +00:00
Robin Appelman
754603a04e
dont needlessly resolve path when getting internalPath/storage from Node
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:24 +02:00
Carl Schwan
135bdb3d58
Merge pull request #30823 from nextcloud/work/profiler
Built-in profiler

This adds the required API for collecting information about requests. This information
can then be displayed with the new 'profiler' app.
2022-04-04 12:56:37 +02:00
Carl Schwan
7d272c54d0 Add a built-in profiler inside Nextcloud
The webui is provided by a seperate application named profiler

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +02:00
Vincent Petry
18c013d8fc
Add CSP policy merge priority for booleans
When two booleans conflict when merging CSP policies, true will win.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-04-01 13:56:34 +02:00
Côme Chilliet
dd357d7f9b
Merge pull request #31679 from nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000
Ensure string column limit of 4.000 characters
2022-03-31 11:37:43 +02:00
Côme Chilliet
765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +02:00
Joas Schilling
129bae62d4
Ensure string column limit of 4.000 characters
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/datatype-limits.html#GUID-963C79C9-9303-49FE-8F2D-C8AAF04D3095

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-25 12:44:51 +01:00
Côme Chilliet
bfd09a0669 Avoid select with no FROM clause for Oracle in tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 20:35:02 +00:00
Côme Chilliet
efebbacca4 Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 20:35:02 +00:00
Côme Chilliet
3546cfba1c
Fix more ILogger related problems from tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:27 +01:00
Côme Chilliet
1809386862
Fix codestyle
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:27 +01:00
Côme Chilliet
61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:26 +01:00
Joas Schilling
367be7c55f
Allow reactions also with other combined emojis
Honerful copying the EmojiService from UserStatus for now
I think this should be put into a decent place and then reused,
but I couldn't find somethin short term before beta1

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-24 15:13:09 +01:00
Joas Schilling
d683e0d3d1
Automatically cut the token name on the first level
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-23 21:38:53 +01:00
Joas Schilling
343476f54f
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-23 11:00:34 +01:00
Joas Schilling
89e293d3fd
Test disabled for now due to multiple reasons
see https://github.com/nextcloud/server/pull/31580#issuecomment-1069182234 for details

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-22 17:07:48 +01:00
Joas Schilling
0acd4b5f82
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
Extract request id handling to dedicated class so it can be injected without DB dependency
2022-03-22 12:08:45 +01:00
Christopher Ng
108abd77ed Add profile default setting for admin
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-18 02:55:12 +00:00
Christopher Ng
1fc0b4320c Add global profile toggle config
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-18 02:55:12 +00:00
Christopher Ng
2d9d0702f0 Add method to set all account properties from json
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-17 16:33:19 +00:00
Christopher Ng
a99d33c72d Discard duplicate collection name from account serialization
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-17 04:27:39 +00:00
Joas Schilling
04a4562a01
Merge pull request #31513 from nextcloud/techdebt/noid/enforce-primary-keys
Enforce primary keys as they are required to be performant in MySQL c…
2022-03-15 10:53:11 +01:00
Joas Schilling
21f96308c4
Overwrite the channel
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 16:16:30 +01:00
Carl Schwan
01e2a26749 Fix unit tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-10 14:19:48 +01:00
Joas Schilling
1970d3dc9a
Add a test for primary keys
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 14:04:04 +01:00
Julius Härtl
bd03dd37be
Allow to set a strict-dynamic CSP through the API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-03-09 15:10:27 +01:00
Robin Appelman
917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +01:00
Robin Appelman
d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +01:00
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:03 +01:00
Robin Appelman
1c468129af
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +01:00
Robin Appelman
8b22a463e9
Merge pull request #31266 from nextcloud/root-setup-mountprovider
move root mount setup to mountproviders
2022-03-04 13:44:05 +00:00
John Molakvoæ
821a0dc875
Merge pull request #31387 from nextcloud/fix/common-main-core-script-order 2022-03-04 14:37:41 +01:00
John Molakvoæ
58d516b509
Make sure common and main core scripts are loaded first
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-03-04 10:22:56 +01:00
Julius Härtl
2dd96fe8da
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-28 11:24:41 +01:00
Julius Härtl
eede608c0e
Add event logging to app loading
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-28 11:24:41 +01:00
Robin Appelman
d08d0ebdda
skip localstorage dependend user test when not using local user storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-25 16:33:11 +01:00
Robin Appelman
8b7c8447a0
move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +01:00
Robin Appelman
cfb7923e08
store mountprovider for each mount in the mounts table
this enabled more fine grained filesystem setup

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +01:00
Joas Schilling
d078d53683
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +01:00
Joas Schilling
cc6653e45c
Adjust and add unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +01:00
Christoph Wurst
cb252c5591
Add Transactional trait for atomic DB operations
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-02-17 09:58:41 +01:00
Christopher Ng
e485451eed Add test
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-02-11 23:34:25 +00:00
Robin Appelman
2673775f6e
fix fs cache test user setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:28 +01:00
Christoph Wurst
cd7a217c29
Merge pull request #31007 from nextcloud/enhancement/bootstrap-calendar-resource-room-backend-registration
Move calendar resource/room backend registration to IBootstrap
2022-02-09 10:25:03 +01:00
Joas Schilling
b765f79368
Allow apps to specify if their background job can be delayed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-07 13:54:54 +01:00
Christoph Wurst
9a656e5b35
Move calendar resource/room backend registration to IBootstrap
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-02-07 12:51:42 +01:00
Joas Schilling
82f602e857
Merge pull request #30354 from nextcloud/enhancement/talk-api
Add a Talk API for OCP
2022-02-04 09:54:13 +01:00
Joas Schilling
2f2538a57a
Merge pull request #30888 from nextcloud/comments-interface
Update ICommentsManager with reaction methods
2022-02-04 09:38:04 +01:00
Christoph Wurst
2c356d0852
Add a Talk API for OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-02-04 08:53:18 +01:00
Vitor Mattos
8ec7c5c8ae
Update ICommentsManager with reaction methods
Fix psalm errors
Reorder methods and remove return null
Use best pattern on docblock

Goals: update https://github.com/ChristophWurst/nextcloud_composer/ with reaction methods.
The script
https://github.com/ChristophWurst/nextcloud_composer/blob/master/build.sh
only get lib/public classes

Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-02-03 12:52:18 -03:00
Robin Appelman
c712987878
send request id in response header
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-01 14:24:01 +01:00
Joas Schilling
e8c66d0f89
Merge pull request #30794 from nextcloud/techdebt/noid/allow-to-get-comments-with-verb
Allow to get comments with a given set of verbs
2022-01-28 16:41:42 +01:00
Joas Schilling
429380337f
Fix fake manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 14:02:34 +01:00
Vitor Mattos
7bb01b6ccc
Refactor and fixes on tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:40:29 -03:00
Vitor Mattos
b9f74584a1
Fix check after change from string to mb_string
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:41 -03:00
Joas Schilling
189f9f96ce
Limit the summary and sort it afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:39 -03:00
Vitor Mattos
f7cd995612
Order the reaction summary, improvements on validations
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:39 -03:00
Vitor Mattos
1ce894a50c
Disable reactions if database don't support utf8mb4
Fix column size

Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:37 -03:00
Vitor Mattos
52affa9ddd
Skip if dont support 4 bytes UTF8
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:07 -03:00
Vitor Mattos
b6d9e0542d
Fix column size to work with Oracle. Add unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 -03:00
Vitor Mattos
425b5cf081
Add unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 -03:00
Vitor Mattos
afe5b6dd8a
Prevent query error when use subquery
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 -03:00
Carl Schwan
89d109a4d9
Merge pull request #30508 from nextcloud/fix/psaml-bin
Fix psalm not running
2022-01-13 09:51:04 +01:00
Carl Schwan
b1048864f0
Merge pull request #30600 from nextcloud/fix/30595/idn-email-share
Fix idn emails not working in shares
2022-01-13 09:24:26 +01:00
Carl Schwan
6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +01:00
Carl Schwan
7ecb65f725
Add check before sending email that email address is valid
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-11 20:59:44 +01:00
Pytal
2bc0749cb6
Merge pull request #30588 from nextcloud/bugfix/noid/fix-unset-scopes 2022-01-11 10:12:11 -08:00
Joas Schilling
c47406ad3c
Merge pull request #30291 from nextcloud/image-memory-limit
Prevent loading images that would require too much memory.
2022-01-11 13:35:56 +01:00
Joas Schilling
172be810b8
Fix test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-11 12:54:41 +01:00
Joachim Bauch
d3d65e5c88
Prevent loading images that would require too much memory.
For most image formats, the header specifies the width/height.
PHP allocates an image object from that size, even if the actual
image data is much smaller. This image object size is not limited
by the limit configured in PHP.

The memory limit can be configured through "config.php" setting
"preview_max_memory" and defaults to 128 MBytes which should be
enough for most images without filling up all memory.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2022-01-11 11:44:38 +01:00
Louis Chemineau
25ade6218a Streamline reseting of private static properties
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-11 10:29:25 +01:00
Louis Chemineau
92e60caa86 Revert "Streamline reseting of private static properties"
This reverts commit e50121d4c0.
2022-01-10 18:42:07 +01:00
Louis Chemineau
e50121d4c0 Streamline reseting of private static properties
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-10 17:34:48 +01:00
Louis Chemineau
447cd553b6
Reset $scriptDeps in tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:15:48 +01:00
Joas Schilling
55986382e8
Merge pull request #30378 from nextcloud/feature/accept-multiple-args-on-concat
Accept multipe args on concat
2022-01-07 12:16:46 +01:00
Vitor Mattos
f732cf1b04
Unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-07 09:54:41 +01:00
Christopher Ng
19a3656fd9 Fix email verification
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-01-06 23:47:42 +00:00
Joas Schilling
773c407965
Merge pull request #29921 from nextcloud/feature/noid/allow-to-count-commments-with-multiple-verbs
Allow to count comments with multiple verbs
2022-01-05 13:44:07 +01:00
Joas Schilling
03abaaaee5
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-05 11:53:33 +01:00
Joas Schilling
977d8479e3
Merge pull request #30393 from nextcloud/feature/add-group-concat-aggregator-function
Add group_concat aggregator function
2022-01-04 17:34:37 +01:00
Joas Schilling
46ad6fa3c7
Add a test with integer
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-04 09:15:17 +01:00
Joas Schilling
43fa2d5c8c
Test with real data
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-03 21:43:51 -03:00
Vitor Mattos
fb6a9f308d
Add unit test
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-03 21:41:38 -03:00
Vitor Mattos
7b9fea85b6
Add unit test and orderBy parameter
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-03 12:45:00 -03:00
Jonas Meurer
491bd6260c
Sort app scripts topologically by its dependencies
Implement a proper topological sorting algorithm. Based on the
implementation by https://github.com/marcj/topsort.php

Logs an error in case a circular dependency is detected.

Fixes: #30278

Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-29 16:40:05 +01:00
Julius Härtl
d73fe0ccd9
Merge pull request #29879 from nextcloud/bugfix/noid/sharing-enumeration-addressbooks 2021-12-21 08:11:04 +01:00
Jonas Meurer
8dd119402a
Improve unit testing for Util::addScript() and Util::getScript()
Instead of checking for a predefined order of the scripts, test the
logic: core first, dependencies before their children, no duplicates and
all scripts still listed.

Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-20 11:40:17 +01:00
Côme Chilliet
ec4fff20e8
Avoid Deprecation warning from Zip tests on PHP 8.1
It is not allowed anymore to open an empty file as a new zip archive.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:58:40 +01:00
Côme Chilliet
e053feb5db
Fix PHP deprecation warning in File/ViewTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:32 +01:00
Julius Härtl
2fe8042fff
Add integration tests for email completion
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-08 09:08:54 +01:00
John Molakvoæ (skjnldsv)
791d57051a
Adapt tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-12-02 21:13:07 +01:00
Robin Appelman
6b3c703794
Merge pull request #29735 from nextcloud/background-scan-one-by-one
find users for background scan one by one
2021-12-02 17:09:43 +00:00
Robin Appelman
e95745c074
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 17:43:16 +01:00
Joas Schilling
6d33d75be1
Remove unused imports
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 14:51:44 +01:00
Joas Schilling
617528312a
Fix last tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 10:39:49 +01:00
Joas Schilling
3e20cffc86
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:38:57 +01:00
Joas Schilling
c6ae53096c
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:17:19 +01:00
Joas Schilling
9f00179037
More unit test adjustments
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 21:40:14 +01:00
Carl Schwan
a8866b0253
Fix tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-01 19:53:24 +01:00
Arthur Schiwon
d384edc9c6
add method to shorten a string to given byte size to Utils
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-11-26 16:21:40 +01:00
Vincent Petry
fd487c1a43
Merge pull request #29432 from nextcloud/fix/support-php-8.1
Support PHP 8.1 - First batch
2021-11-23 15:41:20 +01:00
Côme Chilliet
cd72045433
Make mock config return default value to fix warnings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:00 +01:00
Côme Chilliet
25fa0b8acd
Fix TempManager test errors about passing null to is_dir
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:00 +01:00
Côme Chilliet
065531570d
Fix Encryption tests on PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:59 +01:00
Côme Chilliet
bb9c099e42
Fix FolderTest calls to Mountpoint constructor with wrong type
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:59 +01:00
Côme Chilliet
3a1b3745eb
Fix DateTime constructor calls with null
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:58 +01:00
Côme Chilliet
bc3acfc957
Fix test class names
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:57 +01:00
Côme Chilliet
66bdda568a
Fix Guzzle function calls
Since 1.7.0 and 2.0 these functions are turned into static methods.
See https://github.com/guzzle/psr7#upgrading-from-function-api

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:57 +01:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +01:00
Vincent Petry
f01ad7b8d8
Improve normalizer detecting IPv4 inside of IPv6
The subnet for an IPv4 address inside of IPv6 is now returned in its
IPv4 form.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-22 16:46:25 +01:00
Vincent Petry
7e08a4ab15
Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-22 14:10:11 +01:00
Vincent Petry
c42a890126
Merge pull request #29622 from nextcloud/feat/objectstore_multibucket-shift
Implement multibucket shift for ObjectStore
2021-11-19 17:26:44 +01:00
Vincent Petry
c92a0e4152
Normalize directory entries in Encoding wrapper
Directory entry file names are now normalized in getMetaData(),
getDirectoryContents() and opendir().

This makes the scanner work properly as it assumes pre-normalized names.

In case the names were not normalized, the scanner will now skip the
entries and display a warning when applicable.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-17 09:43:25 +01:00
Naoto Kobayashi
e9b414fbe3 OC_Util: Add fallbacks to check if current locale is UTF8
Using escapeshellcmd to get current locale causes error
if the function is disabled.

Add fallbacks to prevent the error.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-16 00:40:52 +09:00
Naoto Kobayashi
25f15f86a9 Add check whether escapeshellcmd behaves the same as basename
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-15 18:33:50 +09:00
Naoto Kobayashi
455bff5c17 Fix missing setlocale with php 8
When php version = 8, basename('§') does not bug even if LC_ALL is non-UTF-8 locale.
This cause OC_Util::isSetLocaleWorking() to skip setlocale("C.UTF-8").

Fix it by using escapeshellcmd instead of basename.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-14 09:18:59 +09:00
Joas Schilling
265c2c125c
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-12 15:01:56 +01:00
John Molakvoæ
6ab2feaa54
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-11-11 15:09:28 +01:00
Joas Schilling
3b91e4cc48
Add unit test for share enumeration method
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-09 14:42:57 +01:00
Joas Schilling
fa036b2001
Move common logic to share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-09 10:10:53 +01:00
Côme Chilliet
58b6f35522
Enable Avatar tests as well for PHP>=8
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-28 17:49:32 +02:00
Côme Chilliet
23a4e17bd1
Revert "Do not run image tests on php8"
This reverts commit d690f90928.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-28 17:49:21 +02:00
Joas Schilling
c42f5bc5f6
Add an OCP for trusted domain helper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-28 10:24:16 +02:00
John Molakvoæ
f4e4a85fcf
Merge pull request #27440 from nextcloud/is-file-handle 2021-10-23 11:18:52 +02:00
John Molakvoæ
a06001e085
Merge pull request #29363 from nextcloud/fair-use-push 2021-10-23 10:53:22 +02:00
Joas Schilling
b578a1e8b5
Fair use of push notifications
We want to keep offering our push notification service for free, but large
users overload our infrastructure. For this reason we have to rate-limit the
use of push notifications. If you need this feature, consider setting up your
own push server or using Nextcloud Enterprise.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-23 00:54:50 +02:00
Arthur Schiwon
e26d6f080b
fix populating account array with missing default values
- both $userData and $defaultUserData have numeric indices
- each element contains at least the name and other fields
- appending the missing data array is sufficient

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-10-22 23:05:43 +02:00
acsfer
dae769d082
Update Tests 2021-10-22 12:16:11 +02:00
John Molakvoæ
2be0eda47c
Merge pull request #29220 from nextcloud/s3-external-list 2021-10-22 12:06:05 +02:00
John Molakvoæ
c98039c1df
Merge pull request #26725 from nextcloud/fix-federated-scope-not-shown-when-public-addressbook-upload-is-disabled 2021-10-22 11:52:56 +02:00
John Molakvoæ
0a35937662
Merge pull request #26347 from J0WI/clean-path-regex 2021-10-22 11:42:30 +02:00
John Molakvoæ
7e3b6e7088
Merge pull request #29344 from nextcloud/dependabot/composer/doctrine/dbal-3.1.3 2021-10-22 11:35:02 +02:00
Christoph Wurst
7dd7256cfe
Prevent duplicate auth token activity updates
The auth token activity logic works as follows
* Read auth token
* Compare last activity time stamp to current time
* Update auth token activity if it's older than x seconds

This works fine in isolation but with concurrency that means that
occasionally the same token is read simultaneously by two processes and
both of these processes will trigger an update of the same row.
Affectively the second update doesn't add much value. It might set the
time stamp to the exact same time stamp or one a few seconds later. But
the last activity is no precise science, we don't need this accuracy.

This patch changes the UPDATE query to include the expected value in a
comparison with the current data. This results in an affected row when
the data in the DB still has an old time stamp, but won't affect a row
if the time stamp is (nearly) up to date.

This is a micro optimization and will possibly not show any significant
performance improvement. Yet in setups with a DB cluster it means that
the write node has to send fewer changes to the read nodes due to the
lower number of actual changes.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:32:22 +02:00
Christoph Wurst
130ab63ca1
Bump doctrine/dbal from 3.0.0 to 3.1.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:03:45 +02:00
Julien Veyssier
0bef570fe9
Merge pull request #29256 from nextcloud/fix/noid/harmonize-appstoreenabled-check
Fix appstoreenabled check
2021-10-21 12:42:14 +02:00
Joas Schilling
f24e8212c3
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-21 09:27:12 +02:00