Commit graph

9742 commits

Author SHA1 Message Date
Lionel Elie Mamane
f7f053b101 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:48:44 +02:00
Joas Schilling
503019f502 Prevent harder to share your root
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-04 09:06:25 +00:00
Roeland Jago Douma
913ce60dc3
Merge pull request #21110 from nextcloud/backport/19793/stable17
[stable17] Fix resharing of federated shares that were created out of links
2020-05-28 16:19:50 +02:00
Julius Härtl
f50bf10bec
Link shares have reshare permission if outgoing federated shares are enabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:34:05 +02:00
Morris Jobke
4257de3b17 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:55:55 +00:00
Morris Jobke
27486cfd55
Merge pull request #20966 from nextcloud/backport/20033/stable17
[stable17] Enable fseek for files in S3 storage
2020-05-25 13:47:29 +02:00
Robin Appelman
e471c37b9b
harden seekable http stream a bit against failures
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-22 15:31:23 +02:00
Robin Appelman
44ea3b843a
update autoloader
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-22 15:31:13 +02:00
Robin Appelman
23560884e6
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-22 15:31:10 +02:00
Robin Appelman
2ecf23a4dc
make seekable s3 stream generic
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-22 15:31:06 +02:00
Lukas Stabe
4611577ffa
Enable fseek for files in S3 storage
Signed-off-by: Lukas Stabe <lukas@stabe.de>
2020-05-22 15:31:02 +02:00
Morris Jobke
2e41b6f83c
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:19:42 +02:00
Morris Jobke
8b2d609a6a
Cache appstore requests for 60 instead of 5 minutes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 11:19:42 +02:00
Roeland Jago Douma
3c7cd001cd
Merge pull request #20925 from nextcloud/backport/20915/stable17
[stable17] Use random_bytes
2020-05-11 21:00:39 +02:00
Roeland Jago Douma
8fabe71710 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:27:06 +00:00
Robin Appelman
8a027c3fb3 dont try to update storage mtime if we can't get the mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-01 16:22:59 +00:00
MichaIng
c9ce1197c4 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:39:03 +00:00
Tekhnee
00e7d079c8 Adhere to EMailTemplate interface in constructor call.
Email creation appears to have been refactored lately but it looks like custom template-based emails were left out.

Signed-off-by: Tekhnee <info@tekhnee.org>
2020-04-27 09:14:22 +00:00
Roeland Jago Douma
bdcaff0f48
Merge pull request #20513 from nextcloud/backport/20246/stable17
[stable17] Provide the proper language to the mailer
2020-04-20 22:32:41 +02:00
Roeland Jago Douma
1fa8a8e484
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-20 22:21:19 +02:00
Arthur Schiwon
e7754ddb2c fix credentialsManager documentation and ensure userId to be used as string
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-04-16 09:56:25 +00:00
Roeland Jago Douma
20b11b8beb
Merge pull request #20494 from nextcloud/backport/20361/stable17
[stable17] Close the streams in `writeStream` even when there is an exception
2020-04-15 21:12:25 +02:00
Robin Appelman
f72a44525a Close the streams in writeStream even when there is an exception
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-15 08:51:39 +00:00
Joas Schilling
58d5e89898 Handle unset owner in sharing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-14 18:37:18 +00:00
Morris Jobke
d29658f046
Merge pull request #20164 from nextcloud/backport/19782/stable17
[stable17] Use global used space in quota wrappen when external storage is included
2020-04-14 13:59:48 +02:00
Robin Appelman
f857acf4ab Dont always use the current users quota when calculating storage info
instead pass the quota as parameter.

Without this fix, when 'quota_include_external_storage' is enabled, the
webui will show the quota configured for the admin for every user
instead of the users quota

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-01 12:26:35 +00:00
Roeland Jago Douma
5850d3ec30 Actually check if the owner is not null
Else this can error out on storages that do not have an owner (e.g.
groupfolders).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-27 13:51:55 +00:00
Joas Schilling
6bcd0975d0 Check the user on remote wipe
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-25 15:50:27 +00:00
Robin Appelman
7e55adcdf7 Use global used space in quota wrappen when external storage is included
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-03-25 13:19:01 +00:00
Julius Härtl
f10b650381 Remove admin_notifications since it is obsolete since Nextcloud 14
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-24 13:57:32 +00:00
Roeland Jago Douma
b0808d06ef Update the target when it isempty after sharing
Hooks that listen to it (audit log) benefit from having the target
properly set.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-18 12:39:07 +00:00
Julius Härtl
7b32e0b539 Do not use the instance name as user part of from mail addresses
This will cause issues since the theming name can contain characters
that are not allowed in the local part of the mail address (like spaces)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-13 10:49:00 +00:00
Roeland Jago Douma
2bff8fb903 Get correct mimetype on objectstores
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-12 19:00:10 +00:00
Daniel Kesselberg
e55289572e Add message for DoesNotExistException
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-03-06 14:36:34 +00:00
Roeland Jago Douma
8c92c4aad1
Merge pull request #19327 from nextcloud/backport/19303/stable17
[stable17] Fix occ maintenance:install database connect failure
2020-03-05 09:01:25 +01:00
Roeland Jago Douma
53a907f7a8
Merge pull request #19095 from nextcloud/backport/19023/stable17
[stable17] expose Argon2 options (as we did for bcrypt)
2020-03-05 08:40:04 +01:00
Joas Schilling
a587c86a4a Strip of users home path from share api message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-22 20:27:26 +00:00
Arthur Schiwon
fb7c218ea6
ignore values that undershoot the minimum, go with default
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-21 14:51:44 +01:00
blizzz
7d1d76b2c9
use getSystemValueInt
Co-Authored-By: kesselb <mail@danielkesselberg.de>

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-21 14:51:44 +01:00
Arthur Schiwon
d973bc7a75
expose Argon2 options (as we did for bcrypt)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-21 14:51:44 +01:00
Arthur Schiwon
c2f0ebbeed 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:09:05 +00:00
Joas Schilling
47b292b214 Don't create invalid users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-13 09:15:19 +00:00
Joas Schilling
4aeadb5e78 Split the exception handling so install errors don't log as setup errors
More gebuging

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-06 18:39:11 +00:00
Joas Schilling
c21b00db36 Check the new connection on setup like with PostgreSQL and Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-06 18:39:09 +00:00
Joas Schilling
ecc4bb5666 Only provide the auth method for MySQL 8.0+ to not break MariaDB
Provide the auth method for MySQL 8.0+

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-06 18:39:08 +00:00
Roeland Jago Douma
79617a2b23
Merge pull request #19229 from nextcloud/backport/19215/stable17
[stable17] WebcalRefreshJob: Fix reading refresh rate
2020-02-04 15:49:27 +01:00
Arthur Schiwon
4d0ef01cc0 for the DB ot pick an index specify the object_type
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-03 20:25:25 +00:00
Daniel Kesselberg
73fa8630c4 Make sure to catch php errors during job execution
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-03 08:56:17 +00:00
Georg Ehrke
13f31a992f JobList: Typecast last_run to integer
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-01-31 07:19:58 +00:00
Christoph Wurst
78cc8e2e7b Do not encode contacts menu mailto links
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-30 08:47:00 +00:00