Commit graph

20506 commits

Author SHA1 Message Date
Carl Schwan
aafaa39515
Multiple fixes
- Fix tests
- Use non deprecated event stuff
- Add a bit of type hinting to the new stuff
- More safe handling of instanceOfStorage (share might not be the first
  wrapper)
- Fix resharing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 13:24:38 +02:00
Vincent Petry
e959b57c31
Inherit hide download from share attributes
When resharing by link, if the download permission was removed through
share attributes, convert it to the hide download flag.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:20 +02:00
Vincent Petry
cc7564758b
Fix view-only code after code review comments
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:20 +02:00
Vincent Petry
9e59a6a731
Attempt to fix sqlite json issue
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:19 +02:00
Vincent Petry
cf3d92015b
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:19 +02:00
Vincent Petry
f1ab964819
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:13 +02:00
blizzz
6088f720bd
Merge pull request #33439 from nextcloud/backport/32958/stable24
[stable24] Fix file public link permissions if public upload is not enabled
2022-08-03 11:27:10 +02:00
Vincent Petry
3a3a52de83
Merge pull request #33407 from nextcloud/backport/stable24/one-time-password
[stable24] Handle one time and large passwords
2022-08-03 09:07:54 +02:00
Julien Veyssier
933bd27ea9 don't reduce file public link permissions if public upload is not enabled
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-08-02 14:56:59 +00:00
blizzz
039fd75a88
Merge pull request #33353 from nextcloud/backport/33031/stable24
[stable24] Improve local IP detection
2022-08-02 12:36:10 +02:00
Côme Chilliet
38eb0df671
Fix autoloader
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 15:13:34 +02:00
Côme Chilliet
5daf307a0d
Remove call to undefined function, fix typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 12:24:39 +02:00
Côme Chilliet
ead97ba46d
Align copied file with our code style
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 11:34:28 +02:00
Côme Chilliet
d3a2fd02c2
Copy IpUtils from Symfony to avoid new dependency on backport
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 11:30:51 +02:00
Carl Schwan
f4795f6dac
Handle one time and 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.

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-29 16:15:38 +02:00
Robin Appelman
afdeae2cc2 don't set null as a bundle path
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-27 13:46:34 +00:00
Côme Chilliet
d0ceedf054 Use Symfony IpUtils to check for local IP ranges
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-26 09:42:33 +00:00
Côme Chilliet
8cddb75c2b Check for local IPs nested in IPv6 as well
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-26 09:42:32 +00:00
Côme Chilliet
1d0ddcfca1 Refactor local IP if and set strict to true for in_array
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-26 09:42:32 +00:00
Côme Chilliet
7ab50248dc Improve local IP detection
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-26 09:42:32 +00:00
Joas Schilling
1749771ce3
Merge pull request #33343 from nextcloud/backport/33129/stable24
[stable24] Fix reading blob data as resource
2022-07-26 09:43:54 +02:00
Nextcloud bot
4fbb53e85e
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-26 02:27:00 +00:00
Thomas Citharel
618bbb313c 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 15:59:36 +00:00
Vincent Petry
a2166864d4
Merge pull request #33326 from nextcloud/backport/33308/stable24
[stable24] always triger setup of builtin storage wrappers
2022-07-25 17:04:19 +02:00
blizzz
22822a836d
Merge pull request #33252 from nextcloud/backport/32963/stable24
[stable24] also use nextcloud certificate bundle when downloading from s3
2022-07-22 23:54:41 +02:00
Robin Appelman
2c6cd0daf8 always triger setup of builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-22 20:24:35 +00:00
Jonas
78a3bfd120
Merge pull request #33212 from nextcloud/backport/33211/stable24
[stable24] Fix listening for circle events in SetupManager
2022-07-19 10:25:45 +02:00
Arthur Schiwon
7af9f2741f fix loading legacy app.php with multi app dir
- requireAppFile() only appends /appinfo/app.php
- without the absolute path, require_once looks into include_path
- the first match in inlcude_path however migth be different from appPath
- fixed by providing the tested(!), full path to the app


Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-19 06:18:59 +00:00
Jonas
786317e1cb
Fix listening for circle events in SetupManager
So far, SetupManager listened for deprecated events that are no longer
triggered. Instead, use the circle events that actually get triggered
when adding or removing a circle or circle member. Also, these events
get triggered on each instance of a globalscale setup.

Fixes: #33210

Signed-off-by: Jonas <jonas@freesources.org>
2022-07-18 21:09:37 +01:00
Robin Appelman
d4de68f1d4 only use nextcloud bundle when explicitly enabled
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-18 07:54:55 +00:00
Robin Appelman
e640ee4720 also use nextcloud certificate bundle when downloading from s3
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-18 07:54:54 +00:00
Nextcloud bot
ce7b2c1329
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-14 02:25:32 +00:00
John Molakvoæ
dec16a9543
Merge pull request #33157 from nextcloud/backport/33153/stable24 2022-07-08 08:28:29 +02:00
Nextcloud bot
09d6d02234
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-08 02:24:48 +00:00
John Molakvoæ
b3ee9b7b98
Merge pull request #32983 from nextcloud/backport/32242/stable24 2022-07-07 11:47:34 +02:00
Joas Schilling
d306757ffb Only ignore attempts of the same action
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-07-07 09:03:55 +00:00
John Molakvoæ
447a238c59
Merge pull request #32997 from nextcloud/backport/32980/stable24 2022-07-07 10:49:43 +02:00
John Molakvoæ
8d8fa86194
Merge pull request #32986 from nextcloud/backport/stable24/31771 2022-07-07 10:26:42 +02:00
Christopher Ng
51e20dd6c5 Do not save invalid display name to the database
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-07-06 20:54:17 +00:00
Carl Schwan
7c1c7ba5bf
Merge pull request #32483 from nextcloud/backport/32451/stable24
[stable24] Fix cropped image generated when not asked
2022-07-06 17:33:07 +02:00
Carl Schwan
c3621f2a11 Fix cropped image generated when not asked
The $crop parameter was not propagated to the imaginary pipeline and
instead it used the smartcrop algorithm always

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-06 14:33:04 +02:00
Nextcloud bot
f64b78d11b
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-06 02:23:47 +00:00
Nextcloud bot
7e3f811104
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-04 02:23:43 +00:00
Carl Schwan
ebe3c5b00e
Merge pull request #33078 from nextcloud/backport/32924/stable24
[stable24] Enable binary protocol again
2022-07-01 15:07:55 +02:00
Arthur Schiwon
4744a62776
memcached should not throw arbitrary exceptions
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-01 00:15:37 +02:00
Carl Schwan
f32c53e5a1
Enable binary protocol again
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-01 00:15:28 +02:00
Jonas
aec0899efd Check whether entry is of type ICacheEntry in Cache->remove()
In some scenarios (file not in cache, but partial data of it in the
object), Cache->get() might return an array, which leads to errors like
"Call to a member function getId() on array".

So check whether the returned entry is of type ICacheEntry before doing
operations on it in Cache->remove().

Fixes: #33023

Signed-off-by: Jonas <jonas@freesources.org>
2022-06-30 12:25:26 +00:00
Carl Schwan
47934494f6
Merge pull request #33069 from nextcloud/backport/33065/stable24
[stable24] Fix detection of firefox in ContentSecurityPolicyNonceManager
2022-06-30 10:19:22 +02:00
Nextcloud bot
381ac6a26a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-30 02:23:59 +00:00
Carl Schwan
467780ff4e Fix detection of firefox in ContentSecurityPolicyNonceManager
Reuse Request::USER_AGENT_FIREFOX, and also update the safari detection
since safari < 12 is not supported anymore and we can remove a bit of
code duplication

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-30 00:46:47 +00:00