Commit graph

10026 commits

Author SHA1 Message Date
Morris Jobke
f626f4ddc2
Merge pull request #21982 from nextcloud/backport/21628/stable18
[stable18] fix moving files from external storage to object store trashbin
2020-08-10 15:42:33 +02:00
Robin Appelman
ae6357ca6e
dont update mimetype when moving to trash
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:24 +02:00
Robin Appelman
c3f2b73a97
fix renameFromStorage messing with folder mimetype
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:17 +02:00
Robin Appelman
98ca765572
use exceptions for error signaling in writeStream
this remove the ambiguity when writing zero length files

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:10 +02:00
Robin Appelman
7e12f9c9bb
fix moving files from external storage to object store trashbin
having the "cache rename" after the "storage move" caused the target
to get the fileid from the source file, without taking care that the object
is stored under the original file id.

By doing the "cache rename" first, we trigger the "update existing file"
logic while moving the file to the object store and the object gets stored for the
correct file id

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:32:05 +02:00
Joas Schilling
e7d2dde463 Correctly remove usergroup shares on removing group members
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-30 07:51:14 +00:00
Morris Jobke
403040255f
Merge pull request #21976 from nextcloud/backport/21658/stable18
[stable18] allow admin to configure the max trashbin size
2020-07-29 14:21:49 +02:00
onehappycat
b004ce9d72 Ignore whitespace in sharing by mail
Signed-off-by: onehappycat <one.happy.cat@gmx.com>
2020-07-24 11:43:25 +00:00
Robin Appelman
63a90aaf47
allow admin to configure the max trashbin size
this allows an admin to configure the max trashbin size instead of always relying on the users quota.

The trashbin size can be configured using the `occ trash:size` command and can be set both globally and per-user

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-24 13:39:09 +02:00
Robin Appelman
cc35da4d28 ensure home storage is initialized on first setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 12:33:29 +00:00
Roeland Jago Douma
bb9da25772 Use the correct mountpoint to calculate
If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 12:33:26 +00:00
Morris Jobke
778cb33576
Merge pull request #21499 from lmamane/stable18-21285-oneliner
fix #21285 as oneliner
2020-07-08 13:04:58 +02:00
Roeland Jago Douma
01669bdc86
Merge pull request #21670 from nextcloud/revert-21096-backport/21090/stable18
Revert "[stable18] Do not read certificate bundle from data dir by default"
2020-07-06 10:38:48 +02:00
Roeland Jago Douma
c9eede0acf
Merge pull request #21388 from nextcloud/backport/21380/stable18
[stable18] Increase timeout of the appstore requests
2020-07-04 08:55:18 +02:00
Roeland Jago Douma
f3cb2a8208
Revert "[stable18] Do not read certificate bundle from data dir by default" 2020-07-03 14:21:28 +02:00
Joas Schilling
b5a64321f5
Increase timeout of the appstore requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-03 10:10:07 +02:00
Morris Jobke
f9cc07feef
Merge pull request #21572 from nextcloud/backport/21558/stable18
[stable18] relax permissions mask check for detecting part file rename
2020-07-02 23:50:50 +02:00
Roeland Jago Douma
464b9fbe09
Merge pull request #21551 from nextcloud/backport/21535/stable18
[stable18] Fix language in share notes email for users
2020-07-02 21:00:45 +02:00
Joas Schilling
8cba764b59 Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-02 10:09:45 +00:00
Robin Appelman
a2ebe6d30e relax permissions mask check for detecting part file rename
with files drop uploads the original file name isn't always used for the '.ocTransferId' source path

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-06-24 19:08:42 +00:00
Joas Schilling
70cf8bd7fc
Fix language in share notes email for users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 09:10:55 +02:00
Joas Schilling
3495f4c0c1
Fix PHP CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-23 14:55:26 +02:00
Joas Schilling
1e3748f672
Move back to IGroupManager::displayNamesInGroup()
The problem is that despite it's name IGroup::searchDisplayName()
only searches by userid and this is less fixable than changing back to this method here

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-23 14:55:26 +02:00
Roeland Jago Douma
779f45de9c
Merge pull request #21448 from nextcloud/backport/21406/stable18
[stable18] Disable Client-Side Monitoring on AWS storage
2020-06-22 16:28:59 +02:00
Roeland Jago Douma
2cfb7172a0
Merge pull request #21486 from nextcloud/backport/21482/stable18
[stable18] Don't log Keys
2020-06-21 09:19:25 +02:00
Lionel Elie Mamane
80973cd60b Return correct loginname in credentials,
even when token is invalid or has no password.

Returning the uid as loginname is wrong, and leads to problems when
these differ. E.g. the getapppassword API was creating app token with
the uid as loginname. In a scenario with external authentication (such
as LDAP), these tokens were then invalidated next time their underlying
password was checked, and systematically ceased to function.

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-06-20 11:52:42 +02:00
Roeland Jago Douma
5d57876047 Give up after 10 seconds in SCSS timeout
Else we keep idling for ages which leads to bad UX

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-19 19:29:58 +00:00
Joas Schilling
f5ee7736d9 Don't log Keys
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-19 13:13:35 +00:00
Roeland Jago Douma
5e0c5a0a83
Merge pull request #21381 from nextcloud/backport/20447/stable18
[stable18] Increase max-height on button in welcome email template
2020-06-19 13:22:58 +02:00
Christoph Wurst
8e3d47a215 Clean up auth tokens when user is deleted
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-18 13:32:24 +00:00
Christoph Wurst
5fdcb5a1e3 Disable Client-Side Monitoring on AWS storage
The S3 client enables this by default and then tries to read
`.aws/config`. This causes `open_basedir` restriction related error for
some setups. So this patch disables the CSM because it's most likely
unused anyway.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:02:20 +00:00
Liam JACK
597a04acb5 Fix #13287 - Increase max-height on button in welcome email template
Signed-off-by: Liam JACK <liamjack@users.noreply.github.com>
2020-06-12 11:18:29 +00:00
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
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
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
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
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