Commit graph

4963 commits

Author SHA1 Message Date
Christoph Wurst
b059ea1175 Fix PublicKeyTokenProviderTest import and mock
* IDBConnection import missing
* Atomic doesn't need a mock

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-11 09:39:43 +00:00
Vincent Petry
8b4fe66c14
Merge pull request #34855 from nextcloud/backport/34799/stable24
[stable24] Emit typed event when preview is requested
2022-11-04 17:20:43 +01:00
Vincent Petry
2efb811301
Merge pull request #34947 from nextcloud/backport/34804/stable24
[stable24] Skip general login with email for non-valid addresses and LDAP
2022-11-04 17:13:30 +01:00
Christoph Wurst
6d2677b2bb
Run session token renewals in a database transaction
The session token renewal does
1) Read the old token
2) Write a new token
3) Delete the old token

If two processes succeed to read the old token there can be two new tokens because
the queries were not run in a transaction. This is particularly problematic on
clustered DBs where 1) would go to a read node and 2) and 3) go to a write node.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-03 16:39:41 +01:00
Julius Härtl
91a4444c2b
Skip general login with email for non-valid addresses and LDAP
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-11-03 15:40:38 +01:00
Julius Härtl
6dc2b162c5
Emit typed event when preview is requested
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-27 18:51:53 +02:00
John Molakvoæ
04ec0d7f97
Merge pull request #34440 from nextcloud/backport/32635/stable24 2022-10-27 14:26:27 +02:00
Vincent Petry
1524b5fd25
Merge pull request #34797 from nextcloud/backport/33540/stable24
[stable24] fix updating cached mounts that didn't have their mount provider set previously
2022-10-27 13:36:33 +02:00
John Molakvoæ
220d71d997
Merge pull request #34410 from nextcloud/backport/33566/stable24 2022-10-27 12:29:17 +02:00
Andy Xheli
029a9ee39f Update ContactsStoreTest.php
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
2022-10-27 10:04:07 +00:00
Robin Appelman
82b915e7bb add tests for cached mount provider migration
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-25 10:48:30 +00:00
szaimen
e8440853b1 fix external storages access
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-10-23 09:32:55 +00:00
Robin Appelman
6023dee5ae
add test for trying to fopen a file which no longer exists on disk
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-06 14:28:00 +02:00
Carl Schwan
f072520cbd Filter out old files when trying to get recent files
Only do so when asking for less than 100 files and having an offset
equal to 0.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-08 14:43:57 +00: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
008a9f568d fix share manager tests
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-08-02 14:56:59 +00: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
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
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
John Molakvoæ
b3ee9b7b98
Merge pull request #32983 from nextcloud/backport/32242/stable24 2022-07-07 11:47:34 +02:00
Louis Chemineau
82fea7d000 Rename setting name to reduce its length
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-06-28 09:55:45 +00:00
Thomas Citharel
08035833cf 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-06-22 18:26:25 +00:00
Richard Steinmetz
8e5f381508
Fix email shares not being shown to other users
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2022-06-21 14:19:45 +02:00
Arthur Schiwon
6b8d6de4fc make placeholder a const for reuse
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:38:40 +00:00
Arthur Schiwon
ed4fcf2d17 fix overwriting original vars when logging
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:38:39 +00:00
Arthur Schiwon
fc2a88197f add serializer test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:38:39 +00:00
blizzz
eeb4de0763
Merge pull request #32708 from nextcloud/unencrypted-size-24
[24] store unencrypted size in the unencrypted_size column
2022-06-11 00:42:34 +02:00
Vincent Petry
ddac16b6ec
Merge pull request #32657 from nextcloud/backport/32655/stable24
[stable24] Handle non existing settings again
2022-06-10 15:31:58 +02:00
Vincent Petry
254cb7ad0c
Merge pull request #32770 from nextcloud/backport/32697/stable24
[stable24] Fix get avatar authorization
2022-06-09 12:03:03 +02:00
Christopher Ng
887aa58905 Test all scopes
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-08 23:31:26 +00:00
Christopher Ng
a64b1f77c2 Fix get avatar authorization
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-08 23:31:25 +00:00
Robin Appelman
fd2afe604e
store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-03 15:43:50 +02:00
Vincent Petry
3ac93a30e8 Add unit tests for encryption's isSystemWideMountPoint
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-06-02 12:02:22 +00:00
Joas Schilling
26050a48f0
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-31 10:25:34 +02:00
Joas Schilling
762d1ff050
Merge pull request #32414 from nextcloud/backport/32305/stable24
[stable24] Fix user agent trimming on installation
2022-05-16 15:56:48 +02:00
Joas Schilling
a397614a8d Fix user agent trimming on installation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-16 09:32:17 +00:00
Joas Schilling
0b7ab9c092 Add a unit test for translation with trailing colon
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-26 11:41:15 +00:00
Kirill Popov
edfba7f151 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-25 10:34:09 +00:00
Joas Schilling
f6e51690a2 Fix test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-20 12:26:41 +00: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