Commit graph

5355 commits

Author SHA1 Message Date
Joas Schilling
0c408a8119
Merge pull request #21158 from nextcloud/backport/21143/stable17-fix-password-changes-in-link-and-mail-shares
[stable17] Fix password changes in link and mail shares
2020-06-08 19:23:56 +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
Daniel Calviño Sánchez
f6bcabb632 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-06-01 10:53:23 +02:00
Daniel Calviño Sánchez
4e311747a2 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-06-01 10:53:23 +02:00
Daniel Calviño Sánchez
d04000232c 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-06-01 10:53:23 +02: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
Arthur Schiwon
466bed2142 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:24:26 +00:00
Julius Härtl
1808cf93a2
Remove unneeded test since links have resharing permissions by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-26 11:36:45 +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
Roeland Jago Douma
b23db6588e
Merge pull request #20986 from nextcloud/backport/20955/stable17
[stable17] Proxy server could cache http response when it is not private
2020-05-25 19:49:29 +02: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
Clement Wong
557698690a Fix http testCacheSeconds
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-23 23:00:00 +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
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
Clement Wong
e309165032 Fix http cache test
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-15 06:24:10 +00: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
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
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
cfa81e0916 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:56:24 +00:00
John Molakvoæ (skjnldsv)
18bcec1fee Fix absolute redirect
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-04-15 09:31:45 +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
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
Daniel Calviño Sánchez
d52b55fc14 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:51:08 +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
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
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
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
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
Georg Ehrke
921e1feaef
AppFetcher: Distinguish between fileName and endpointName
Signed-off-by: Georg Ehrke <developer@georgehrke.com>

(cherry picked from commit 2f89f5fd13)
2020-01-27 13:34:47 +01:00
Georg Ehrke
8bd52316dd Restore old behavior allowing to set custom appstore
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-01-06 14:30:41 +00:00
Joas Schilling
a8b484f2e6
Update the unit test to dataProviders
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-12 22:23:18 +01:00
Julius Härtl
419df66251 Move overwritehost check to isTrustedDomain
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-09 20:39:00 +00:00
Christoph Wurst
55b5e13e15
Handle token insert conflicts
Env-based SAML uses the "Apache auth" mechanism to log users in. In this
code path, we first delete all existin auth tokens from the database,
before a new one is inserted. This is problematic for concurrent
requests as they might reach the same code at the same time, hence both
trying to insert a new row wit the same token (the session ID). This
also bubbles up and disables user_saml.

As the token might still be OK (both request will insert the same data),
we can actually just check if the UIDs of the conflict row is the same
as the one we want to insert right now. In that case let's just use the
existing entry and carry on.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-02 14:20:51 +01:00
Roeland Jago Douma
d95a54b359 Do not check for updates if we have no internet
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-20 19:55:19 +00:00
Roeland Jago Douma
a2dec13283 Harden middleware check
These annotations will allow for extra checks. And thus make it harder
to break things.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-25 14:34:41 +00:00
Sergej Nikolaev
907660e05c fix oauth client redirect
Signed-off-by: Sergej Nikolaev <kinolaev@gmail.com>
2019-10-07 10:05:03 +00:00
Sergej Nikolaev
5c5d658b0e fix updating and deleting authtokens
Signed-off-by: Sergej Nikolaev <kinolaev@gmail.com>
2019-10-05 10:35:46 +00:00
Arthur Schiwon
55229d05ff adjust test expectations
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-10-01 10:18:20 +00:00
Roeland Jago Douma
4f54d12ff9
Merge pull request #17277 from nextcloud/backport/17264/stable17
[stable17] handle moveFromStorage within the same storage even when storage wrap…
2019-09-27 12:28:40 +02:00
Robin Appelman
ffcb590583 dont delete cache entries if deleting an object from object store failed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-09-26 14:14:44 +00:00
Robin Appelman
1048bc5102 handle moveFromStorage within the same storage even when storage wrappers are applied to the source storage
the target storage doesn't need additional handling for wrappers as the wrappers implementation of moveFromStorage already deals with that

Any storage based on local storage isn't affected by this as local storage already has it's own way of handling with this

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-09-26 13:54:44 +00:00
Roeland Jago Douma
ae4d01dfb0 Use the actual password to update the tokens
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-09-18 20:53:38 +00:00
Arthur Schiwon
97be271387 adjust tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 14:53:01 +00:00
Roeland Jago Douma
2fdf946dae
Merge pull request #16454 from nextcloud/bugfix/noid/sharelink-shouldnt-open-menu-automatically
Dont show menu automatically when share link is clicked
2019-09-04 10:36:04 +02:00
Daniel Kesselberg
773778dd8c
Add default timeout to expected request options
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-09-03 14:59:09 +02:00
Greta Doci
1993984769 Adjust acceptance tests to changes in link share menu behaviour
Now the link share menu is not automatically opened after a link share
is created, so waiting until it was opened failed in iShareTheLinkFor.

Note that the steps that interact with the link share menu take care
themselves of showing the menu if needed, so there is no need to
explicitly show it despite the change. Also, the waiting in
iShareTheLinkFor was introduced when the link share menu was changed
to automatically open after creating a link share, as that caused some
issues with the steps that opened the menu by themselves (fec8d12fc5).
Due to all this, now that the link share menu is again not automatically
opened the wait can be simply removed.

Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-08-29 10:19:03 +02:00
Roeland Jago Douma
3f12ec95f0
SessionMiddleware: declare session property
* Remove request since we don't useit
* Update tests as well

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-28 13:02:29 +02:00
John Molakvoæ
caf32d25f8
Merge pull request #16879 from only-run-integration-tests-on-php-changes
Only run integration tests when PHP was modified
2019-08-27 18:12:40 +02:00