Commit graph

52708 commits

Author SHA1 Message Date
Daniel Calviño Sánchez
f5eb93e29a Add integration tests for creating and updating a mail share
In most cases, when a mail share is created or updated an e-mail is sent
to the sharee, which is done by connecting to the SMTP server set in the
configuration. If the server can not be contacted then the creation or
update of the mail share fails.

To make possible to test mail shares without using a real SMTP server a
fake one has been added. The original script, which is MIT licensed, was
based on inetd, so it was slightly modified to run on its own.

In order to use it from the integration tests the "Given dummy mail
server is listening" step has to be called in the scenarios in which the
mail server is needed.

For now that is the only available step; things like checking the sent
mails, while possible (as the script can log the mails to certain file),
have not been added yet.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 15:24:53 +02:00
Daniel Calviño Sánchez
c8dafceb36 Generalize integration test steps to download last share
Note that the "last link share can be downloaded" step was kept as it
tests the "url" property specific of link shares.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 15:23:15 +02:00
Daniel Calviño Sánchez
8349172c64 Remove unused variables
The step names were adjusted accordingly.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 15:21:27 +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
Daniel Calviño Sánchez
149d2b0013 Fix creating a mail share with a password
When a mail share was created with a password the given password was not
hashed, so it was not possible to open the share with that password.
Moreover, if passwords were enforced the given password was ignored and
a new one was set (although in this case it was hashed so it worked as
expected). Now the given password is properly hashed and not overriden.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 14:42:16 +02:00
Daniel Calviño Sánchez
ff810f8e23 Extend mail shares unit tests to check the password and mail template
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 14:42:16 +02:00
Nextcloud bot
bb107a1f6f
[tx-robot] updated from transifex 2020-05-29 02:16:39 +00:00
Roeland Jago Douma
baa118898f
Merge pull request #21061 from nextcloud/version/18.0.5/RC1
18.0.5 RC1
2020-05-28 16:38:01 +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
Christoph Wurst
852b0ba19d
Merge pull request #21127 from nextcloud/fix/make-translation-sanitization-optional-stable18
[stable18] Make the translation sanitization optional
2020-05-28 09:20:03 +02:00
Roeland Jago Douma
6e911c4ad9
Merge pull request #21132 from nextcloud/backport/20933/stable18
[stable18] Move the password confirmation form template to post
2020-05-28 08:17:01 +02:00
Nextcloud bot
8718e0776d
[tx-robot] updated from transifex 2020-05-28 02:16:48 +00:00
Roeland Jago Douma
b6ab18b311 Move the password confirmation form template to post
I know we use JS for this. But it triggers some false positives on
testing.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-27 17:58:10 +00:00
Christoph Wurst
e2bc5ae74e
Fix devices & sessions sanitization
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-27 16:17:21 +02:00
Christoph Wurst
0084483a36
Make the translation sanitization optional
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-27 16:05:25 +02:00
blizzz
c7c7433f11 Merge pull request #21115 from nextcloud/backport/21106/stable18
[stable18] use the loginname to verify the old password in user password changes
2020-05-27 10:18:58 +02:00
Nextcloud bot
fdb58f1852
[tx-robot] updated from transifex 2020-05-27 02:16:21 +00: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
Roeland Jago Douma
4aed6971fe
Merge pull request #21096 from nextcloud/backport/21090/stable18
[stable18] Do not read certificate bundle from data dir by default
2020-05-26 11:44:15 +02:00
John Molakvoæ (skjnldsv)
9d422a2d9a
Fix federated link sharing permissions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-05-26 11:30:09 +02:00
Julius Härtl
9a1275b5b9
Fix share update test
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:28:42 +02:00
Roeland Jago Douma
20c47cf7d8
Update public link share permission code
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-26 11:28:42 +02:00
Roeland Jago Douma
04b02572c3
Have share permissions on link shares if it is enabled
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-26 11:28:42 +02:00
Julius Härtl
4b7b102761
Adjust integration tests to new permissions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:28:42 +02: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
Julius Härtl
4a2ded0199
Link shares have reshare permission if outgoing federated shares are enabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:28:42 +02:00
Julius Härtl
5b74da3a87
Set proper share type when converting link shares to federated shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:28:41 +02:00
Nextcloud bot
17183f0aac
[tx-robot] updated from transifex 2020-05-26 02:16:13 +00:00
Morris Jobke
de1cbad0ee
Merge pull request #20881 from nextcloud/backport/20841/stable18
[stable18] add locking to resolve concurent move to trashbin conflicts
2020-05-25 21:31:36 +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
Nextcloud bot
4e8f72726a
[tx-robot] updated from transifex 2020-05-25 02:16:31 +00:00
Nextcloud bot
f6372e3cb6
[tx-robot] updated from transifex 2020-05-24 02:16:04 +00:00
Nextcloud bot
120a7a7e23
[tx-robot] updated from transifex 2020-05-23 02:16:31 +00:00
Robin Appelman
3d3ee1bfae
harden seekable http stream a bit against failures
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-22 15:29:43 +02:00
Nextcloud bot
588fa72207
[tx-robot] updated from transifex 2020-05-22 02:17:31 +00:00
Roeland Jago Douma
974d3cf8f5
18.0.5 RC1
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-21 09:36:46 +02:00
Nextcloud bot
8529fbae9b
[tx-robot] updated from transifex 2020-05-21 02:17:37 +00:00
Robin Appelman
25f5a5e575
update autoloader
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:59:08 +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
Robin Appelman
8434d0af9f
make seekable s3 stream generic
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:57:36 +02:00
Lukas Stabe
7a62514c31
Enable fseek for files in S3 storage
Signed-off-by: Lukas Stabe <lukas@stabe.de>
2020-05-20 22:57:30 +02:00
Morris Jobke
c2acfb9bf5
Merge pull request #21053 from nextcloud/backport/21050/stable18
[stable18] Caching and compression for app store requests
2020-05-20 13:23:39 +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
Nextcloud bot
d6fa810331
[tx-robot] updated from transifex 2020-05-20 02:16:38 +00:00
Roeland Jago Douma
671f4a6b88
Merge pull request #21030 from nextcloud/backport/21003/stable18
[stable18] Remove entries from locales.json incompatible with punic
2020-05-19 11:58:59 +02:00
Nextcloud bot
6090c75d90
[tx-robot] updated from transifex 2020-05-19 02:17:20 +00:00