Commit Graph

10901 Commits

Author SHA1 Message Date
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
2020-12-22 09:53:31 +01:00
Julius Härtl 5094e29ebd
Merge pull request #24594 from kofemann/dcache 2020-12-22 09:26:07 +01:00
Tigran Mkrtchyan 4f2dc18f58 storage: update IStorage#file_put_contents docs to match usage
The current phpdoc of IStorage#file_put_contents doesnt corresponds to
it's actual usage in code, e.g.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2020-12-21 19:04:18 +01:00
Roeland Jago Douma 4f0fae8f00
Actually set the TTL on redis set
Else well the keys remain for ever and ever.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-21 13:33:16 +01:00
Julius Härtl fbbb48fcc2
Merge pull request #24730 from J0WI/fix-trusted-ipv6
Fix IPv6 localhost regex
2020-12-21 09:59:31 +01:00
Roeland Jago Douma 4973f9b952
Merge pull request #24715 from nextcloud/bug/noid/limit-get-incomplete-to-1
Limit getIncomplete query to one row
2020-12-21 09:15:10 +01:00
Christoph Wurst f37e150d1c
Merge pull request #24702 from nextcloud/enhancement/well-known-handler-api
Add well known handlers API
2020-12-18 13:34:04 +01:00
Roeland Jago Douma 484f52bb4d
Also unset the other possible unused paramters
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-16 20:31:30 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
J0WI 331f30f085 Fix IPv6 localhost regex
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-12-16 14:37:56 +01:00
Christoph Wurst 6995223b1e
Add well known handlers API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 13:13:05 +01:00
Christoph Wurst 820f9f4f63
Merge pull request #24629 from nextcloud/enh/noid/optional-before-required
Make $vars and $secureRandom required.
2020-12-16 12:43:06 +01:00
Roeland Jago Douma 1d4c8961ef
Merge pull request #24659 from nextcloud/enh/noid/dav-honour-sharing.maxAutocompleteResults
dav principal search to honour sharing.maxAutocompleteResults setting
2020-12-16 10:47:32 +01:00
Daniel Kesselberg e0e76bb784
Limit getIncomplete query to one row
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-15 21:42:26 +01:00
Julius Härtl a4b5312729 Do not include non-required scripts on the upgrade page
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-15 21:14:07 +01:00
Julius Härtl 2bedfbd4b0
Merge pull request #24488 from zzkt/patch-1 2020-12-15 15:19:40 +01:00
Julius Härtl d37034f161
Merge pull request #24683 from doc75/federation_confidentiality 2020-12-15 14:35:50 +01:00
Arthur Schiwon d8ad4ef6b5
use a consistent default value for sharing.maxAutocompleteResults
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-15 11:53:39 +01:00
Julius Härtl b56d7f9f4e
Merge pull request #23017 from nextcloud/enh/distinguish-users 2020-12-14 16:54:47 +01:00
Joas Schilling 39bee7948d
Merge pull request #24631 from nextcloud/bugfix/noid/prevent-select-asterix-and-specifics
Prevent * and other things in the same query for Oracle
2020-12-14 14:31:15 +01:00
Julius Härtl 131fcac91e
Show unique displayname context in the sharing input
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:14:59 +01:00
Joas Schilling 5828f3c4f9
Prevent * and other things in the same query for Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-14 09:35:50 +01:00
Guillaume Virlet 83491c6c58 [Fix #24682]: ensure federation cloud id is retruned if FN property not found
Signed-off-by: Guillaume Virlet <github@virlet.org>
2020-12-13 13:57:41 +01:00
Lukas Reschke 8a8aa4f7dc Add sanitizers for JSON output
Those functions set proper content-types that prevent rendering of
data. Therefore it's safe to mark them as sanitizers.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2020-12-11 21:23:11 +00:00
nik gaffney 794cc3d803 repair text/org MIME types
Signed-off-by: nik gaffney <nik@fo.am>
2020-12-11 18:21:33 +01:00
Roeland Jago Douma 582ce5a6ad
Merge pull request #24416 from nextcloud/fix/app-store-check-php-compat
Check php compatibility of app store app releases
2020-12-10 21:42:58 +01:00
Daniel Kesselberg 8ebd31d686
Make $vars and $secureRandom required.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-10 17:06:32 +01:00
Roeland Jago Douma ccd5ca5476
Merge pull request #23044 from nextcloud/migration-10.5
Handle owncloud migration to latest release
2020-12-10 14:32:13 +01:00
Julius Härtl c4ea37b8a1
Address minor comments
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:51:41 +01:00
Julius Härtl 36ffad5ba7
Make sure the migrations table schema is always checked
Signed-off-by: Julius Härtl <jus@bitgrid.net>

Revert "Make sure the migrations table schema is always checked"

This reverts commit 258955ef738a52d9da2ac2fe59466e6093d7e9bc.

Set current vendor during upgrade and perform migrations table change if needed

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:24:03 +01:00
Julius Härtl 20949d7f48
Properly migrate from new owncloud avatar location
as the files are not scanned we cannot use the OCP\Files api

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:23:29 +01:00
Julius Härtl f3150f29a7
Introduce deck share type to ShareAPIController
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:24 +01:00
Julius Härtl f2f3ad733f
Dummy general share checks for deck
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl e906138d8d
Let sharees endpoint properly handle deck shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl fcc0d35895
Add share type for deck
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl fdea545415
Allow apps to register their share providers from outside
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl 9fe94f282f
Readd repair steps that are relevant when migrating from ownCloud
This reverts commit d9b1492e03.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:35 +01:00
Julius Härtl 2607ac3fb2
Allow major/minor match for owncloud version
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:33 +01:00
Julius Härtl f5501ca276
Avoid checking for brute force protection capabilities when upgrading
This might happen a releases that doesn't have this table yet

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:33 +01:00
Julius Härtl 7518f67f33
Drop fk constraints on locks table
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:32 +01:00
Joas Schilling c8e0f3015f
Merge pull request #24398 from nextcloud/fix/do-not-update-incompatible-app
Do not update incompatible apps
2020-12-09 09:28:25 +01:00
Joas Schilling 13a1eb6494
Merge pull request #24598 from nextcloud/techdebt/noid/wrap-the-exception-to-make-debuggin-easier
Make debugging migration exceptions easier
2020-12-08 17:10:20 +01:00
Joas Schilling 86a3b7e7bf
Merge pull request #24486 from nextcloud/feature/noid/phone-number-validation
Phone number validation and search
2020-12-08 17:05:38 +01:00
Joas Schilling 13a438b322
Fix PHP code style
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-08 13:08:47 +01:00
Joas Schilling 354c5ff024
Add a repairstep to validate the phone numbers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 20:35:54 +01:00
Joas Schilling c1f28f8d35
Make debugging migration exceptions easier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 19:35:01 +01:00
Tigran Mkrtchyan f3513f3fe4 files: Local#writeStream should use it's own file_put_contents
The OC\Files\Storage\Local#writeStream use system provided file_put_contents.
However, it overrides file_put_contents, thus expects that the default behaviour
can be different.

Use Local#file_put_contents in writeStream to benefit from class specific functionality.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2020-12-07 18:11:40 +01:00
Roeland Jago Douma 7f61535a1a
GD images
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-07 15:44:04 +01:00
Roeland Jago Douma c02e6fcae2
fix appconfig tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-07 15:44:04 +01:00
Roeland Jago Douma 0e10d8cb7c
Fix locking logic
The comparrison on php8 return true while <php8 it is false.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-07 15:44:04 +01:00
Joas Schilling f648635758
Make the throwing optional, so background tasks don't break
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling 46b073d7ce
Add a config for default region of phone numbers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling 9e04e6f99a
Also translate the phone number when coming in via the accounts manager API directly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling fe9c46e595
Add an endpoint to search for accounts based on phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Joas Schilling eaba155a09
Add a database table for the accounts data so we can search it better
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Joas Schilling da9462b482
Make code strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Christoph Wurst cbb34af53f
Do not update incompatible apps
Previously there was no (platform) dependency check for an app that was
installed before. So Nextcloud happily upgraded an app that now requires
a php version newer than the current one. Which means in the lucky case
you see a failing upgrade due to the language incompatibility, or in the
unlucky case you see unexpected errors later in production.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-04 17:05:22 +01:00
Christoph Wurst 24237f1a34
Check php compatibility of app store app releases
Apps might increase the minimum php version requirement, in which case
an update could break the app or even the whole instance. We must not
install those releases, or better, don't even show them for
update/installation. This extends the app fetcher code to filter out the
releases that are not installable.

The filter respects minimum and maximum requirements. E.g. apps that are
still only released for php7.3 won't show up for php7.4 instances. This
behavior is new but if an app lists an explicit version requirement,
then we ought to repect that.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-04 16:52:31 +01:00
Roeland Jago Douma f0862dcfaa
Merge pull request #24552 from nextcloud/enh/remember_me_is_not_app_password
Remember me is not an app_password
2020-12-04 16:35:44 +01:00
Morris Jobke 0d7819eb6c
Merge pull request #24550 from nextcloud/enh/fix/new_session_id_if_decrypt_fails
Generate a new session id if the decrypting the session data fails
2020-12-04 12:52:59 +01:00
Morris Jobke 5cc348ae72
Fix typo
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-04 12:51:45 +01:00
Roeland Jago Douma 48b4b83b5a
Remember me is not an app_password
While technically they are stored the same. This session variable is
used to indicate that a user is using an app password to authenticate.
Like from a client. Or when having it generated automatically.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-04 12:40:28 +01:00
Roeland Jago Douma 858f623081
Generate a new session id if the decrypting the session data fails
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-04 11:42:40 +01:00
Vincent Petry 9b3361ce87
Don't log params of imagecreatefromstring
To prevent flooding the log with actual image data.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-04 09:30:20 +01:00
Roeland Jago Douma c9cd633665
Fix the download of multiple files from the webUI
needed a setupFS call

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-03 13:20:01 +01:00
Joas Schilling 64bc7c79e8
Merge pull request #24498 from nextcloud/enhancement/nextcloud-log-normalizer
Replace abandoned log normalizer with our fork
2020-12-03 11:04:49 +01:00
Julius Härtl 04d67d558e
Also handle legacy cipher support when encryption is disabled but an old master key is present
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-03 09:47:05 +01:00
Christoph Wurst 244c53dea1
Replace abandoned log normalizer with our fork
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-03 09:44:25 +01:00
Morris Jobke 4d64ec9944
Merge pull request #24519 from nextcloud/fix/bug/emailtemplate
Fix vsprint parameter
2020-12-03 09:13:58 +01:00
Roeland Jago Douma 3d315ec64f
Fix vsprint parameter
%2\$; is not valid. On php7 this is just ignored but on php8 it gives an
error. %2\$s; works.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-03 08:25:11 +01:00
Roeland Jago Douma 04c037ebfd
[3rdparty] Migrate to Opis/Closure
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-02 20:16:57 +01:00
Roeland Jago Douma 6f4d3edb5e
Merge pull request #24113 from nextcloud/extend-cache-events
extend cache events
2020-12-02 19:48:20 +01:00
Christoph Wurst 4deff37a3c
Merge pull request #23278 from nextcloud/enh/noid/user-limits
Allow subscription to indicate that a userlimit is reached
2020-12-02 18:22:13 +01:00
Morris Jobke e580f91143
Merge pull request #23257 from aler9/patch-32bit-filesize-master
Fix file size computation on 32bit platforms
2020-12-02 16:22:24 +01:00
Roeland Jago Douma d69407963c
Merge pull request #24500 from nextcloud/bugfix/noid/log_query_no_crash
Prevent log_query to mess up regular execution flow
2020-12-02 16:15:26 +01:00
Robin Appelman aef1cdba03
code style and dispatchTyped
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-12-02 16:15:02 +01:00
Morris Jobke c0a05c0412
Add notification for user limit
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Morris Jobke d87705a894
Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Vincent Petry a50bcdabcc
Prevent log_query to mess up regular execution flow
When the "log_query" debug config parameter is set, SQL queries are
logged. However, if an error occurs when converting the values to
string, it will abort the request.

This fix catches the error and continues instead.

Also added handler for DateTime value which is already known to cause
aborts here.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-02 14:10:35 +01:00
aler9 ac0c7a8fe0 Fix file size computation on 32bit platforms
Signed-off-by: aler9 <46489434+aler9@users.noreply.github.com>
2020-12-02 12:05:14 +01:00
Christoph Wurst 9a3cc099db
Merge pull request #24414 from nextcloud/techdebt/remove-update-php
Remove the deprecated update.php
2020-11-30 12:11:03 +01:00
Morris Jobke 83a75c670b
Replace static call to Share::unshare with ShareManager->deleteShare in tests
And then cleanup all the code that is dead then...

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-30 09:51:18 +01:00
Morris Jobke 6564a95160
Remove now unused methods in Share.php due to the reduced code complexity in Share::getItems
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-29 23:28:16 +01:00
Morris Jobke 10e5ae5e18
Remove unused method Share Helper::generateTarget
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-29 22:52:52 +01:00
Morris Jobke a125d8aaa1
Reduce code complexity in Share::getItems by tracing all remaining callers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-29 22:30:09 +01:00
Morris Jobke 596df8fc6f
Remove unused Share::getItemSharedWithBySource()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-29 22:24:12 +01:00
Christoph Wurst fd649afb1f
Remove the deprecated update.php
* It was documented as deprecated.
* The app code checker warned about it
* It's been three years

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-27 13:02:59 +01:00
Robin Appelman 88f35d52d2
rename cache event to follow new naming standards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:39:46 +01:00
Robin Appelman 23fb497ff5
extend cache events
- adds cache remove event
- expose storage id in event
- emit events during cache move

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:22:03 +01:00
Christoph Wurst 7dd39a91ee
Remove dead method \OC\Updater::checkAppUpgrade
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-26 14:48:41 +01:00
Christoph Wurst 54e3beba16
Merge pull request #24319 from nextcloud/techdebt/noid/streamline-user-creation-and-deletion-events
Streamline user creation and deletion events
2020-11-26 14:09:54 +01:00
Roeland Jago Douma 2172432420
Merge pull request #23912 from nextcloud/objectstore-copy
use in objectstore copy
2020-11-25 16:09:26 +01:00
Arthur Schiwon 9cfa8a6c44
send expected format of cloud id
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 23:14:43 +01:00
blizzz 5d03b5c5dd
Merge pull request #24162 from nextcloud/fix/noid/fedshares-displaynamez
set the display name of federated sharees from addressbook
2020-11-24 17:23:37 +01:00
blizzz 6156a49f6e
Merge pull request #24341 from nextcloud/fix/sharing-enforce-expire-checkbox
Fix the config key on the sharing expire checkbox
2020-11-24 15:49:49 +01:00
Robin Appelman 9d4848e863
use in objectstore copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-24 15:16:58 +01:00
Christoph Wurst 2526c5e042
Fix the config key on the sharing expire checkbox
We don't use `shareapi_internal_enforce_expire_date` anywhere.
`shareapi_enforce_internal_expire_date` is the one we want.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-24 14:17:41 +01:00
Arthur Schiwon 16a78f535a
set the display name of federated sharees from addressbook
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 11:30:11 +01:00
Roeland Jago Douma c2c539a754
Merge pull request #24323 from nextcloud/fix/comments-tab-missing
Fix reverse registration and missing comments tab
2020-11-24 09:34:50 +01:00
Roeland Jago Douma 8ac9767881
Merge pull request #24312 from nextcloud/bugfix/noid/fix-router-alias
Add proper alias for internal router class
2020-11-24 08:43:29 +01:00