Commit Graph

53682 Commits

Author SHA1 Message Date
Roeland Jago Douma bbd97db4f6
Merge pull request #21247 from nextcloud/backport/21229/stable19
[stable19] Fix empty event UUID reminder notifications
2020-06-05 13:38:47 +02:00
Thomas Citharel 8cef51bbad Fix empty event UUID reminder notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-05 07:04:43 +00:00
Roeland Jago Douma 70c174566b
Merge pull request #21242 from nextcloud/backport/21232/stable19
[stable19] Use \OC::$CLI instead of PHP_SAPI
2020-06-05 08:53:22 +02:00
Nextcloud bot dfe70692d7
[tx-robot] updated from transifex 2020-06-05 02:16:44 +00:00
Thomas Citharel 26f72d1aec Use \OC::$CLI instead of PHP_SAPI
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-04 17:06:54 +00:00
Roeland Jago Douma a1204be15b
Merge pull request #21226 from nextcloud/backport/21199/stable19
[stable19] Prevent harder to share your root
2020-06-04 19:01:56 +02:00
Joas Schilling 982f2fc21a Prevent harder to share your root
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-04 09:01:40 +00:00
Roeland Jago Douma c296a55fe8
Merge pull request #21200 from nextcloud/backport/21181/stable19
[stable19] Do not only catch Exceptions but any Throwable during rmt share delete
2020-06-04 10:59:47 +02:00
Daniel Calviño Sánchez 01ccbe68ff Restore previous state when failing to change video verification state
When video verification can not be enabled or disabled the previous
state is set again in the JavaScript share object. This ensures that the
UI will not reflect a misleading state.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-06-03 14:08:17 +00:00
Christoph Wurst c423a50938 Fix the Talk verification
When enabling or disabling Talk verification in mail shares the server
expects also a new password to be set. As we always just update one
property at a time this means the Talk verification was impossible to
activate or deactivate. With this patch, we send the talk option AND the
new password. If there is no new password, the Talk option is disabled
(in mail shares; in link shares it is possible to enable or disable the
video verification without changing the password).

When we finally have descriptive text on ActionCheckbox'es we should
definitely add some explanatory text for the user. Right now this is as
good as it gets.

We'll have to backport to 18.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-03 13:51:42 +00:00
Robin Appelman 48c0ac2f12 normalize sftp path in read and write stream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-06-03 10:19:35 +00:00
Christoph Wurst 25dd585251 Do not only catch Exceptions but any Throwable during rmt share delete
When a remote share is deleted, we notify the remove instance. This may
trigger various error conditions, which we want to catch in order to
avoid undeletable shares. The try-catch, however, did only capture
exceptions, so things like TypeErrors were not caught and caused the
process to fail hard.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-03 09:13:47 +00:00
Morris Jobke f431c145bc
Merge pull request #21151 from nextcloud/backport/21143/stable19
[stable19] Fix password changes in link and mail shares
2020-05-29 21:31:04 +02:00
Daniel Calviño Sánchez fcafad2111 Add integration tests for video verification
Enabling the "send password by Talk" property of shares require that
Talk is installed and enabled, so the Drone step that runs them has to
first clone the Talk repository.

When the integration tests are run on a local development instance,
however, it is not guaranteed that Talk is installed. Due to this the
"@Talk" tag was added, which ensures that any feature or scenario marked
with it will first check if Talk is installed and, if not, skip the
scenario (instead of failing).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 16:58:10 +02:00
Daniel Calviño Sánchez 125481a660 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 11:37:44 +00:00
Daniel Calviño Sánchez f7e8034d72 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 11:37:43 +00:00
Daniel Calviño Sánchez 062525b460 Remove unused variables
The step names were adjusted accordingly.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 11:37:43 +00:00
Daniel Calviño Sánchez 6ca312eec9 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 11:37:43 +00:00
Daniel Calviño Sánchez 8e5aa03834 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 11:37:43 +00:00
Daniel Calviño Sánchez 9df3ea94b8 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 11:37:43 +00:00
Daniel Calviño Sánchez 9a5b51d43c 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 11:37:43 +00:00
Daniel Calviño Sánchez 5de6eb07c0 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 11:37:42 +00:00
Roeland Jago Douma bed5c21b5a
Merge pull request #21148 from nextcloud/backport/21146/stable19
[stable19] Fix reference to wrong class name
2020-05-29 10:12:30 +02:00
Daniel Calviño Sánchez e9ccb802e8 Fix reference to wrong class name
\OCP\IShare does not exist; the right name is \OCP\Share\IShare,
although it is already imported as IShare.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 06:48:00 +00:00
Roeland Jago Douma 89f0785c1d
Merge pull request #21135 from nextcloud/backport/21065/stable19
[stable19] Clear the statscache before fetching the metadata
2020-05-28 19:44:35 +02:00
Roeland Jago Douma d12e379c96
Merge pull request #21128 from nextcloud/backport/21123/stable19
[stable19] simplify getGroups, fixing wrong chunking logic
2020-05-28 14:59:50 +02:00
Roeland Jago Douma 9d2d3c4809 Clear the statscache before fetching the metadata
Else if a lot of writes happen. It might happen that an old stat result
is used. Resulting in a wrong file size for the file. For example the
text app when a lot of people edit at the same time.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-28 10:30:35 +00:00
Christoph Wurst bdb9f31cf1
Merge pull request #21126 from nextcloud/fix/make-translation-sanitization-optional-stable19
[stable19] Make the translation sanitization optional
2020-05-28 09:40:20 +02:00
Roeland Jago Douma e33055a318
Merge pull request #21131 from nextcloud/backport/20933/stable19
[stable19] Move the password confirmation form template to post
2020-05-28 08:17:15 +02:00
Roeland Jago Douma 3ce43c7d71 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:04 +00:00
Arthur Schiwon 1e5295138a simplify getGroups, fixing wrong chunking logic
pagination is taken care of properly in the search logic in Access class

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-05-27 17:38:45 +00:00
Christoph Wurst 14b618bcaf
Fix devices & sessions sanitization
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-27 15:57:18 +02:00
Christoph Wurst 539e46a07e
Make the translation sanitization optional
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-27 15:55:40 +02:00
blizzz 03a1932b15 Merge pull request #21114 from nextcloud/backport/21106/stable19
[stable19] use the loginname to verify the old password in user password changes
2020-05-27 10:19:22 +02:00
Arthur Schiwon 557a3754c1 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:20:42 +00:00
Morris Jobke 1d1a9ba5a0
Merge pull request #21111 from nextcloud/backport/21108/stable19
[stable19] fixes infinitely repeating LDPA search results with PHP <= 7.2
2020-05-26 15:41:17 +02:00
Arthur Schiwon d0559a4871 fixes infinitely repeating LDPA search results with PHP <= 7.2
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-05-26 09:56:10 +00:00
Roeland Jago Douma 24e97c1a7c
Merge pull request #21095 from nextcloud/backport/21090/stable19
[stable19] Do not read certificate bundle from data dir by default
2020-05-26 11:43:46 +02:00
Morris Jobke 3bf0285840
Merge pull request #21068 from nextcloud/backport/20776/stable19
[stable19] Improve group queries
2020-05-26 10:38:17 +02:00
Roeland Jago Douma 9c63433cde
Merge pull request #21060 from nextcloud/version/19/final
19 Final
2020-05-26 10:04:27 +02:00
Roeland Jago Douma a283200dcb
Merge pull request #21105 from nextcloud/backport/21092/stable19
Update recommended apps
2020-05-26 10:01:23 +02:00
Julius Härtl abecd5696b Update hub bundle and add proxy rule to htaccess
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-05-25 19:52:22 +00:00
Morris Jobke ebbdd2de33 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:51:03 +00:00
Roeland Jago Douma 444b28adf6 Improve group queries
Before we'd also get the diplayname for each group in the backend. In a
separate query. This is of course not ideal as this information is
obtained on each and every query. Now this is queried once and properly
cached.

Also added more caching to the manager.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-22 12:22:03 +00:00
Roeland Jago Douma 13e6a0db2c
19 Final
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-21 09:32:28 +02:00
Roeland Jago Douma 33b06cfa0c
Merge pull request #20964 from nextcloud/version/19/rc3
19 RC3
2020-05-20 19:53:56 +02:00
Morris Jobke 138eddc0f1
Merge pull request #21028 from nextcloud/backport/20629/stable19
[stable19] Don't load text file preview when text app is available (Fixes: #20615)
2020-05-20 13:54:17 +02:00
Morris Jobke 703d8f2adc
Merge pull request #21052 from nextcloud/backport/21050/stable19
[stable19] Caching and compression for app store requests
2020-05-20 13:23:00 +02:00
Morris Jobke 745667e426 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 09:07:35 +00:00
Morris Jobke 5c0f06b259 Cache appstore requests for 60 instead of 5 minutes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 09:07:35 +00:00