Commit graph

10785 commits

Author SHA1 Message Date
Lukas Reschke
201bf52c04 Add database ratelimiting backend
In case no distributed memory cache is specified this adds
a database backend for ratelimit purposes.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-13 17:23:49 +02:00
Vincent Petry
610e76555d
Unregister enc stream wrapper for any exception
This prevents side effects in tests by properly cleaning up
even with expected exceptions.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-08-26 14:26:50 +02:00
Joas Schilling
64ff73c78a
Merge pull request #28453 from nextcloud/backport/28303/stable20
[stable20] UnifiedSearchController: strip webroot from URL before finding a route
2021-08-20 11:13:16 +02:00
John Molakvoæ (skjnldsv)
5a26b3ff0c Properly log errors in Movie previews generation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-08-19 18:06:56 +00:00
Christoph Wurst
face6b174b Emit an error log when the app token login name does not match
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-08-18 12:16:47 +00:00
Julius Härtl
cd01d63e49 Only trap E_ERROR in session handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-17 10:12:58 +00:00
Jonas Meurer
b08215e4cc Use IURLGenerator function to get value of \OC::$WEBROOT global
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-08-16 13:11:50 +00:00
Robin Appelman
a4cdebec62
fix Folder->getById() when a single storage is mounted multiple times
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-11 09:05:44 +02:00
Robin Appelman
b3e238c731 dont apply jail search filter is on the root
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-29 14:40:00 +00:00
Lukas Reschke
4b9245324a Sanitize more functions from the encryption app
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-07-21 22:01:42 +02:00
tobiasKaminsky
df4d8671a2 Disable HEIC image preview provider for performance concerns
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2021-07-21 08:36:07 +00:00
Daniel Kesselberg
5705fc7be3 Mask password for Redis and RedisCluster on connection failure
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-07-19 23:11:40 +00:00
MichaIng
02fc2cc51c
Merge pull request #27754 from nextcloud/backport/27586/stable20
[stable20] Reset checksum when writing files to object store
2021-07-14 14:39:26 +02:00
MichaIng
8a8f95e56c 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:11:22 +00:00
Julius Härtl
ae8373df1c Reset checksum when writing files to object store
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-01 15:38:17 +00:00
John Molakvoæ
54106a647e
Merge pull request #27108 from nextcloud/backport/27043/stable20
[stable20] fix return value of getStorageInfo when 'quota_include_external_storage' is enabled
2021-07-01 11:42:34 +02:00
korelstar
9257171b3d fix error when using CORS with no auth credentials 2021-06-23 20:49:45 +02:00
Lukas Reschke
5a1faab167 Remove throwing annotation
This class was just introduced in Nc 21.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-22 13:55:49 +02:00
Lukas Reschke
481715c8f8 Use execute instead of executeStatement
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-22 13:54:03 +02:00
Morris Jobke
a0bd1800e8 Properly cleanup entries of WebAuthn on user deletion
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-06-22 13:46:28 +02:00
Daniel Kesselberg
3b510bf0f6
Activate constraint check for oracle / pqsql also for 20.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-06-16 14:28:07 +02:00
Robin Appelman
464aeb065c
properly use limit and offset for search in Jail wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-09 08:08:55 +02:00
Robin Appelman
9f62c8023d
Merge pull request #27349 from nextcloud/backport/25280/stable20
[stable20] Set umask before operations that create local files
2021-06-07 19:37:02 +00:00
Robin Appelman
b92440ca0a
improve type handling of Avatar::generateAvatarFromSv
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-07 16:55:40 +02:00
Morris Jobke
16ae1e8c3c
Merge pull request #27209 from nextcloud/backport/27199/stable20
[stable20] Use noreply@ as email address for share emails
2021-06-07 10:47:09 +02:00
Robin Appelman
252268e4d2
Set umask before operations that create local files
this solves issues where "other php stuff" is messing with the umask

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-04 15:42:05 +02:00
Lukas Reschke
1d9e6ab6dd Propagate throttling on OCS response
The BaseResponse converter did not take over any throttling state from the DataResponse.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-01 19:44:31 +00:00
Morris Jobke
d1e5039890 Use noreply@ as email address for share emails
Fixes #26683

Before it used the instance name, which a) doesn't make sense to randomly guess email addresses and b) could contain characters that are not allowed in email addresses like spaces.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-05-28 11:44:09 +00:00
Robin Appelman
4a5364a9b2 fix return value of getStorageInfo when 'quota_include_external_storage' is enabled
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-25 20:01:40 +00:00
Joas Schilling
a0e0627de0 Don't break OCC if an app is breaking in it's Application class
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 07:42:04 +00:00
Lukas Reschke
4ec4a99869 Limit size of properties to 2048 characters
It is unreasonable to expect that one of these fields would be longer
than 2048 characters. Whilst some have definitely lower limits (such as
for phone numbers or domain names), a upper bound as sanity check makes
sense.

Backport of https://github.com/nextcloud/server/pull/26433

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-29 20:45:11 +02:00
Roeland Jago Douma
02001520e0 Do not try to contact lookup server if not needed
In some cases (for example you never send data to the lookup server)
there is no need for this job to even try.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-29 09:23:02 +02:00
Julius Härtl
4f8c89f8a5 Fail when creating new files with an empty path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-28 10:06:03 +00:00
Joas Schilling
498ac1c6f5 Do not allow to overwrite some variables
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 13:39:53 +00:00
Joas Schilling
2b0fd23ecf Fix ratelimit template
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 13:39:52 +00:00
Joas Schilling
bcf9c14047 Log deprecation only as debug
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-26 15:14:55 +00:00
Joas Schilling
56d7b1a382 Respect the error level when logging
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-26 15:14:53 +00:00
Maxence Lange
0145fd0b5c private cannot be final
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2021-04-26 07:08:14 +00:00
Roeland Jago Douma
86de5d9265 Explicitly check hex2bin input
For #23197

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-22 14:01:25 +02:00
Vincent Petry
6bd49e256b
Fix empty password check for mail shares
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-21 08:00:29 +02:00
Arthur Schiwon
89960468ae ensure redis returns bool for hasKey
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-20 08:36:55 +00:00
Lukas Reschke
61545e7a89 Increase subnet matcher
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-12 10:36:26 +00:00
Vincent Petry
3a1444ee71 Fix phpcs issues in encryption update
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-01 07:56:20 +00:00
Julius Härtl
c2a072b27d Log and continue when failing to update encryption keys during for individual files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 07:56:19 +00:00
kesselb
1e3e339e69
Merge pull request #26378 from nextcloud/backport/25500/stable20
[stable20] fix(translation): replace static error message
2021-03-31 10:08:34 +02:00
Arthur Schiwon
47abd1f37e gracefully handle deleteFromSelf when share is already gone
- handling race conditions

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-30 20:26:20 +00:00
Samuel
8b6706ea7d revert(comment)
Signed-off-by: Samuel <faust64@gmail.com>
2021-03-30 19:26:14 +00:00
Samuel
09a92dc7cd revert(exception): keep throwing an exception for now
Signed-off-by: Samuel <faust64@gmail.com>
2021-03-30 19:26:13 +00:00
Samuel
2703777014 fix(translation): replace static error message
as suggested by @kesselb in nextcloud/server#25490

Signed-off-by: Samuel <faust64@gmail.com>
2021-03-30 19:26:13 +00:00
Roeland Jago Douma
99e2e5f6b9
Merge pull request #26258 from nextcloud/backport/26198/stable20
[stable20] Handle limit offset and sorting in files search
2021-03-30 20:53:11 +02:00