Commit graph

19409 commits

Author SHA1 Message Date
szaimen
4721a82f92 Admin Audit - Sharing: createShare - report the full path
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-07-26 11:29:41 +00:00
Vincent Petry
d5b38ed5f8 Allow empty Redis config
When Redis config is empty, use defaults.
However when a Redis cluster config is specified, the "seeds" attribute
is mandatory.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-23 12:30:41 +00:00
John Molakvoæ (skjnldsv)
8b17f317ee Properly support RedisCluster
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-07-22 10:52:13 +00:00
John Molakvoæ (skjnldsv)
9d2cf57776 Support redis user password auth and tls encryption
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-07-22 10:52:12 +00:00
Lukas Reschke
b1c3dacd51 Sanitize more functions from the encryption app
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-07-21 21:58:48 +02:00
tobiasKaminsky
718cb09dc9 Disable HEIC image preview provider for performance concerns
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2021-07-21 08:31:31 +00:00
Daniel Kesselberg
bdcf22eee7 Mask password for Redis and RedisCluster on connection failure
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-07-19 22:00:30 +00:00
Nextcloud bot
6bd2efe549
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-07-15 10:37:38 +00:00
Julius Härtl
41ca0af614 Directly return cloud id from user
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-14 21:53:12 +00:00
Joas Schilling
c04797dca0
Merge pull request #27964 from nextcloud/backport/27761/stable22
[stable22] Also hide group from direct matches
2021-07-14 19:52:19 +02:00
Joas Schilling
af2a862857 Also hide group from direct matches
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-07-14 11:09:53 +00:00
Chih-Hsuan Yen
120fc8dd6a
Correctly skip suppressed errors in PHP 8.0
Applies the suggested transformation mentioned in
https://www.php.net/manual/en/migration80.incompatible.php,

> The @ operator will no longer silence fatal errors (E_ERROR,
> E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR,
> E_PARSE). Error handlers that expect error_reporting to be 0 when
> @ is used, should be adjusted to use a mask check instead

The new code still works on PHP 7, as error_reporting() already
returns 0 when diagnostics are suppressed.

This fixes https://github.com/nextcloud/server/issues/25807 in PHP 8.0.
For PHP 7.x, https://github.com/nextcloud/server/pull/22243 suppresses
the E_NOTICE message from the second session_start() call with the error
suppression operator @, and thus those E_NOTICE messages are still
logged in PHP 8.0.

See also https://github.com/nextcloud/server/issues/25806

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
2021-07-14 17:07:58 +08:00
Lukas Reschke
5dcc18af46 Check for !== false instead
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-07-12 14:46:43 +00:00
Lukas Reschke
525dfd2f4d Check if dns_get_record returns non-false
`dns_get_record` can return false which results in exceptions such as
the ones shown in https://github.com/nextcloud/server/issues/27870.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-07-12 14:46:42 +00:00
MichaIng
cd0343e6b9
Merge pull request #27825 from nextcloud/backport/27801/stable22
[stable22] Ignore subdomain for soa queries
2021-07-09 15:44:14 +02:00
kesselb
2054614358
Merge pull request #27848 from sanpii/fix-dns-pinning-max-recursion
Fixes recursion count incrementation
2021-07-07 13:54:34 +02:00
Sanpi
2ed3574ea0
Fixes recursion count incrementation
Signed-off-by: Sanpi <sanpi@homecomputing.fr>
2021-07-07 12:59:22 +02:00
MichaIng
e5fe200076 Fix in locking cache check
The intention obviously was to check whether $lockingCacheClass is defined, and existing class, and available. It was however checked whether the $distributedCacheClass is an existing class, which would have caused an exception already in the previous distributed cache check.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-07-06 17:02:52 +00:00
Daniel Kesselberg
a626792e15 Ignore subdomain for soa queries
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-07-06 16:58:15 +00:00
Aaron Ball
f8db7ce8f5 Fix DnsPinMiddleware resolve pinning bug
Libcurl expects the value of the CURLOPT_RESOLVE configurations to be an
array of strings, those strings containing a comma delimited list of
resolved IPs for each host:port combination.

The original code here does create that array with the host:port:ip
combination, but multiple ips for a single host:port result in
additional array entries, rather than adding them to the end of the
string with a comma. Per the libcurl docs, the `CURLOPT_RESOLVE` array
entries should match the syntax `host:port:address[,address]`.

This creates a function-scoped associative array which uses `host:port`
as the key (which are supposed to be unique and this ensures that), and
the value is an array containing IP strings (ipv4 or ipv6). Once the
associative array is populated, it is then set to the CURLOPT_RESOLVE
array, imploding the ip arrays using a comma delimiter so the array
syntax matches the expected by libcurl.

Note that this reorders the "foreach ip" and "foreach port" loops.
Rather than looping over ips then ports, we now loop over ports then
ips, since ports are part of the unique host:port map, and multiple ips
can exist therein.

Signed-off-by: Aaron Ball <nullspoon@oper.io>
2021-07-05 15:40:06 +00:00
John Molakvoæ
c73070c19d
Merge pull request #27752 from nextcloud/backport/27586/stable22
[stable22] Reset checksum when writing files to object store
2021-07-05 17:27:07 +02:00
Robin Appelman
cb0e76105e dont include folder being search in in the results
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-02 15:52:17 +00:00
Julius Härtl
226e0c4107 Reset checksum when writing files to object store
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-01 15:33:47 +00:00
John Molakvoæ
858da2ed1d
Merge pull request #27719 from nextcloud/backport/27474/stable22 2021-07-01 08:31:25 +02:00
Arthur Schiwon
1220e48301 ensure that factoryClass exisits before instantiation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 16:52:09 +00:00
Arthur Schiwon
1754c3d979 cleanup
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:50 +00:00
Arthur Schiwon
9d6c11f7da adjust internal data handling logic to fix store and load
- format as stored previously in oc_accounts table is kept

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:50 +00:00
Arthur Schiwon
b30ce04e15 adjust email verification checker
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
bcedd4031d fix code style
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
63d2aad5d3 adjust verification state updater method
- also fixes scope of internal methods

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
19d2367340 make AccountManager actually write multi value properties
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
51cae9ba98 accounts event handler to use eventdispatcher, DI and Accounts API
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
148a62939f prov api to be able to edit multivalue properties
- adding as usual
- deleting and scope setting via additional endpoint

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:49 +00:00
Arthur Schiwon
4398cf85c1 prov api reports additional emails on getUser
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 05:15:48 +00:00
Vincent Petry
98005fc331 Revert "First attempt to check against core routes before loading all app routes"
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-06-29 18:52:21 +00:00
Christoph Wurst
3b5b2af215 Harden bootstrap context registrations when apps are missing
It's not expected that an app would be unavailable when the app
container is created but when services are registered, but Sentry tells
me on Nextcloud 21 there is an edge case where this can happen.
Therefore this patch hardens the code a bit to log a meaningful error
message and skipping the next code instead of logging a php notice for
the undefined index and an exception for calling a method on null.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-25 16:46:57 +00:00
Christoph Wurst
3d7e3185fc Unshift crash reports when they are loaded, to break the recusion
If, for whatever reason, during the loading of a crash reporter a new
log entry is generated, then the lazy loading mechanism will be invoked
*again* while it's already executed. This doesn't result in an endless
recursion, but means that the crash reporters will be built and
registered many times. This then means any further log entry will be
logged x times instead of once.

Unshift makes sure to take the class off the registration list right
away, so another invokation of the same method won't try to do the same
job.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-25 06:34:13 +00:00
Nextcloud bot
4158f1a848
[tx-robot] updated from transifex 2021-06-24 02:25:18 +00:00
Pytal
9ed379da22
Merge pull request #27635 from nextcloud/fix/datetime-constants
Fix usage of DateTime constants
2021-06-23 09:56:28 -07:00
Lukas Reschke
19a84512d6
Merge pull request #27628 from nextcloud/security-txt
Add security.txt
2021-06-23 15:49:51 +02:00
Christoph Wurst
6d5cfe0c66
Move DateTime::RFC2822 to DateTimeInterface::2822
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-23 15:30:43 +02:00
Christoph Wurst
770881d5d6
Move DateTime::ATOM to DateTimeInterface::ATOM
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-23 15:28:07 +02:00
Lukas Reschke
a70fd1bad1
Merge pull request #26344 from J0WI/fs-early-root
Return early if path is root
2021-06-23 15:21:56 +02:00
Lukas Reschke
65742695d1 Rebuild autoloader
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-23 13:59:48 +02:00
Lukas Reschke
25ab4059c6 Add security.txt
Ref https://securitytxt.org

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-23 13:58:47 +02:00
blizzz
ee7a484284
Merge pull request #26346 from J0WI/clean-auth-regex
Cleaner removePassword regex
2021-06-23 11:20:19 +02:00
Nextcloud bot
1977114f01
[tx-robot] updated from transifex 2021-06-23 02:26:18 +00:00
szaimen
858f578f84 mail-template - don't show hyphen if slogan is empty
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-06-22 13:43:12 +02:00
Nextcloud bot
25b4f11fd5
[tx-robot] updated from transifex 2021-06-22 02:26:59 +00:00
Louis Chemineau
3f6d3dc307 Fix typing error in AppFetcher.php
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-06-21 16:31:24 +02:00