Commit graph

5482 commits

Author SHA1 Message Date
Roeland Jago Douma
3d1273d2f2
Merge pull request #21160 from nextcloud/backport/21152/stable18
[stable18] [stable18] Fix password changes in link and mail shares
2020-06-06 09:35:02 +02:00
Joas Schilling
f97a61aa14 Prevent harder to share your root
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-04 09:03:54 +00:00
Daniel Calviño Sánchez
fb271d6b81 Fix disabling send password by Talk without new password in mail shares
When "send password by Talk" was disabled in a mail share it was
possible to keep the same password as before, as it does not pose any
security issue (unlike keeping it when "send password by Talk" is
enabled, as in that case the password was already disclosed by mail).

However, if a mail share is updated but the password is not set again
only the hashed password will be available. In that case it would not
make sense to send the password by mail, so now the password must be
changed when disabling "send password by Talk".

Note that, even if explicitly setting the same password again along with
the "send password by Talk" property would work, this was also prevented
for simplicity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 19:38:28 +00:00
Daniel Calviño Sánchez
6e19f53173 Fix enabling send password by Talk with same password in mail shares
When "send password by Talk" is enabled in a mail share a new password
must be also set. However, when the passwords of the original and the
new share were compared it was not taken into account that the original
password is now hashed, while the new one is not (unless no new password
was sent, in which case the password of the original share was set in
the new share by the controller, but that was already prevented due to
both passwords being literally the same), so it was possible to set the
same password again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 19:38:28 +00:00
Daniel Calviño Sánchez
57663d19f1 Fix enabling send password by Talk with empty password in link shares
When "send password by Talk" is enabled in a link share now a non empty
password is enforced.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 19:38:28 +00:00
Morris Jobke
555108dc65
Revert "[stable18] Fix password changes in link and mail shares" 2020-05-29 21:35:57 +02:00
Daniel Calviño Sánchez
d6f1937502 Fix disabling send password by Talk without new password in mail shares
When "send password by Talk" was disabled in a mail share it was
possible to keep the same password as before, as it does not pose any
security issue (unlike keeping it when "send password by Talk" is
enabled, as in that case the password was already disclosed by mail).

However, if a mail share is updated but the password is not set again
only the hashed password will be available. In that case it would not
make sense to send the password by mail, so now the password must be
changed when disabling "send password by Talk".

Note that, even if explicitly setting the same password again along with
the "send password by Talk" property would work, this was also prevented
for simplicity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 14:42:16 +02:00
Daniel Calviño Sánchez
1c580351da Fix enabling send password by Talk with same password in mail shares
When "send password by Talk" is enabled in a mail share a new password
must be also set. However, when the passwords of the original and the
new share were compared it was not taken into account that the original
password is now hashed, while the new one is not (unless no new password
was sent, in which case the password of the original share was set in
the new share by the controller, but that was already prevented due to
both passwords being literally the same), so it was possible to set the
same password again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 14:42:16 +02:00
Daniel Calviño Sánchez
26e4c292c7 Fix enabling send password by Talk with empty password in link shares
When "send password by Talk" is enabled in a link share now a non empty
password is enforced.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 14:42:16 +02:00
Roeland Jago Douma
876479799e
Merge pull request #21109 from nextcloud/backport/19793/stable18
[stable18] Fix resharing of federated shares that were created out of links
2020-05-28 16:37:28 +02:00
Arthur Schiwon
292d8c3d9c use the loginname to verify the old password in user password changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-05-26 19:22:33 +00:00
Julius Härtl
a8229421df
Remove unneeded test since links have resharing permissions by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:28:42 +02:00
Morris Jobke
64df6aaf85 Do not read certificate bundle from data dir by default
Before the resources/config/ca-bundle.crt was only used when the list of custom
certificates was empty and the instance was not installed. But it should also
be used when the list is empty and the instance is installed.

This is inverting the logic to stop if the instance is not installed to use the
default bundle. And it also does this when the list is empty.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-25 17:53:23 +00:00
Morris Jobke
1d816add44
Merge pull request #20965 from nextcloud/backport/20033/stable18
[stable18] Enable fseek for files in S3 storage
2020-05-25 13:38:04 +02:00
Robin Appelman
136a716df0
add basic tests for s3 seeking and add some error handling if reopen return the wrong range
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:58:58 +02:00
Morris Jobke
d26c5103e6
Compress the appstore requests by default
In test it reduced the transfered data from 5 MB to 2 MB. This should reduce the load on the appstore significantly.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 11:18:19 +02:00
Morris Jobke
f7b39e13a2
Cache appstore requests for 60 instead of 5 minutes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 11:18:19 +02:00
Clement Wong
43351ecd29 Fix http cache test
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-13 14:40:18 +02:00
Morris Jobke
de4a71c915
Merge pull request #20574 from nextcloud/backport/16035/stable18
[stable18] dont show remote and email options if we have an exact match for local user email
2020-05-12 21:05:58 +02:00
Robin Appelman
e26c055fb4
dont show remote and email options if we have an exact match for local user email
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-12 16:30:48 +02:00
Roeland Jago Douma
b02a79b327 Use random_bytes
Since we don't care if it is human readbale.
The code is backwards compatible with the old format.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-11 12:24:59 +00:00
Roeland Jago Douma
de43edca3b
Merge pull request #20763 from nextcloud/backport/20710/stable18
[stable18] Fix Argon2 options checks
2020-05-01 14:43:26 +02:00
MichaIng
e5f1523577 Fix Argon2 options checks
The minimum for memory cost is 8 KiB per thread. Threads must be checked and set first to allow checking against the correct memory cost mimimum.
Options are now applied the following way:
- If config.php contains the setting with an integer higher or equal to the minimum, it is applied.
- If config.php contains the setting with an integer lower than the minimum, the minimum is applied.
- If config.php does not contain the setting or with no integer value, the PHP default is applied.

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-01 09:37:24 +00:00
Roeland Jago Douma
7b0819c511
Allow specifying a default expiration date
This overrides the max expiration date.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-01 09:14:25 +02:00
Roeland Jago Douma
fc09807ae6
Merge pull request #20512 from nextcloud/backport/20246/stable18
[stable18] Provide the proper language to the mailer
2020-04-20 20:31:30 +02:00
Roeland Jago Douma
7550043371
Provide the proper language to the mailer
Else we can't properly translate the footer in the recipients e-mail
language.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-18 11:37:05 +02:00
Daniel Kesselberg
1d6fefd67e Fix jsunit tests
JSUnit tests are failing for some reason. It seems to be related to a new karma-coverage version published a few hours ago.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-18 09:36:13 +00:00
Arthur Schiwon
a544996910 add DB tests for credentials manager
these are actually expected to FAIL, because NULL as a userid is not
allowed in the schema, but documented to be used on the source

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-04-16 09:54:49 +00:00
John Molakvoæ (skjnldsv)
8d72a2adef Fix absolute redirect
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-04-15 09:30:10 +00:00
Joas Schilling
5aa47e5549 Check the user on remote wipe
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-25 15:50:12 +00:00
Julius Härtl
6e7a833016 Remove admin_notifications since it is obsolete since Nextcloud 14
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-24 13:56:18 +00:00
Roeland Jago Douma
b9e8251100
Merge pull request #20051 from nextcloud/backport/20049/stable18
[stable18] Force compatible dependency versions in acceptance tests
2020-03-21 08:23:28 +01:00
Daniel Calviño Sánchez
2b42fbe63f Add acceptance test for accepting an incoming share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 20:24:56 +00:00
Daniel Calviño Sánchez
ba67eddabe Fix timeout capping
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 20:24:56 +00:00
Daniel Calviño Sánchez
4147595188 Revert (partially) "Accept incoming shares in acceptance tests"
This reverts commit f402e23448.

Since eb4c42d3d1 now shares are accepted
by default, so no notification is shown to accept them.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 20:24:56 +00:00
Daniel Calviño Sánchez
988c633246 Force compatible dependency versions in acceptance tests
behat/mink 1.8 and behat/mink-selenium2-driver 1.4 introduced behaviour
changes that broke the acceptance tests. Until the tests are updated to
work with the newer versions the last known versions are forced.

Note that some acceptance tests still fail after enforcing the
compatible versions, although that is caused by changes in the Nextcloud
server itself.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 14:49:55 +00:00
Daniel Kesselberg
6d04819868 Add message for DoesNotExistException
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-03-02 15:20:38 +00:00
Joas Schilling
8d5c51730b Strip of users home path from share api message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-22 20:26:27 +00:00
Arthur Schiwon
cb1c0d7221 when we receive intentional empty whats new info, do not try to show it
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-14 09:08:03 +00:00
Arthur Schiwon
53fb638ac6 disable timeout on app install via cli
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-12 16:34:58 +00:00
Daniel Kesselberg
2a5ae7ab48 Add test to trigger "Trying to access array offset on value of type int"
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-06 20:32:23 +00:00
Roeland Jago Douma
9687febed7 Allow selecting the hashing algorithm
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-02-04 10:32:42 +00:00
Daniel Kesselberg
5ce0b44960 Make sure to catch php errors during job execution
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-03 08:55:22 +00:00
Christoph Wurst
8aecb95aa4 Do not encode contacts menu mailto links
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-30 08:46:09 +00:00
Arthur Schiwon
a68533e5a6 add hub bundle for easy post-installation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-27 07:21:09 +00:00
Joas Schilling
f52c9d759f
Adjust unit test for #19017
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-21 08:45:58 +01:00
Julius Härtl
14f6030140 CHeck if file already exists during file creation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-14 07:35:31 +00:00
Georg Ehrke
889933b353 AppFetcher: Distinguish between fileName and endpointName
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-01-12 20:10:07 +00:00
Christoph Wurst
7768cbb19e Clean up 2FA provider registry when a user is deleted
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-09 10:35:04 +00:00
Roeland Jago Douma
52e4ecd66e
Merge pull request #18644 from nextcloud/harden/csrf_endpoint
Only allow requesting new CSRF tokens if it passes the SameSite Cooki…
2020-01-07 13:43:46 +01:00