Commit Graph

10361 Commits

Author SHA1 Message Date
Roeland Jago Douma b57019bcaa
Log the route not found exception on a lower level
This should be logged but it is not that critical to wanner level 3

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-24 15:39:53 +02:00
Morris Jobke 15561b4e0a
Merge pull request #21977 from onehappycat/issue_21960
Ignore whitespace in sharing by mail
2020-07-24 13:37:36 +02:00
Julius Härtl e1b696929f
Move NotFoundResponse to a proper TemplateResponse
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-24 08:58:14 +02:00
onehappycat e04525c186 Ignore whitespace in sharing by mail
Signed-off-by: onehappycat <one.happy.cat@gmx.com>
2020-07-23 22:20:18 +02:00
Morris Jobke ce314d9484
Merge pull request #21814 from nextcloud/techdebt/noid/federated_share_added-into-typed-event
Move federated_share_added into a typed event
2020-07-23 21:42:48 +02:00
Morris Jobke 173f8abc7e
Merge pull request #21628 from nextcloud/external-to-s3-trashbin-fix
fix moving files from external storage to object store trashbin
2020-07-23 21:35:18 +02:00
Robin Appelman c8cf2e8a5b
fix renameFromStorage messing with folder mimetype
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 20:31:35 +02:00
Simon Spannagel 1fc54d3479 Fix header logo size in notification mails
Signed-off-by: Simon Spannagel <simonspa@kth.se>
2020-07-23 17:52:21 +02:00
Robin Appelman ad7798f9c9
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-23 15:24:52 +02:00
Robin Appelman 5949849322
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-23 15:24:44 +02:00
Roeland Jago Douma e0cc95f3aa
Allow user backends to specify a custom logout url
* Allows SSO backends to do a global logout

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-23 10:42:40 +02:00
Morris Jobke 0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 08:33:17 +02:00
Morris Jobke 346f647962
Merge pull request #21870 from nextcloud/fix/bootstrap-context-container-interfaces
Make the bootstrap context return ContainerInterface instances
2020-07-22 20:38:50 +02:00
Morris Jobke 7b250db60b
Merge pull request #21658 from nextcloud/trashbin-configurable-size
allow admin to configure the max trashbin size
2020-07-21 20:46:43 +02:00
Morris Jobke 7870ca0663
Use the proper IAppContainer and IServerContainer type hints to know which code runs with which container
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-21 20:44:05 +02:00
Christoph Wurst e029055e76
Make the bootstrap context return ContainerInterface instances
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-21 20:42:24 +02:00
Morris Jobke 09e6b26bdd
Merge pull request #21875 from nextcloud/techdebt/deprecate-ilogger
Deprecate ILogger in favor of the PSR-3 logger
2020-07-20 16:45:14 +02:00
Morris Jobke 9ae75a3ca9
Merge pull request #21850 from nextcloud/techdebt/noid/register-alternative-logins
Allow to register AlternativeLogin on RegistrationContext
2020-07-20 14:20:03 +02:00
Morris Jobke 9271d65641
Merge pull request #21880 from nextcloud/webauthn/discourage_user_auth
Discourage webauthn user interaction
2020-07-20 09:24:08 +02:00
Christoph Wurst 9bc6a8437d
Deprecate the query mothod on the server container
The interface method has already been deprecated, but if some code uses
the concrete type instead, the deprecation is not shown (by phpstorm),
so I think it's better to have this method tagged as well.

The "fix" for this deprecation is to simply use `get` instead of
`query`. Right now this will work 100% the same, but the goal is to slim
down the interface and only use what PSR-11 offers.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-17 08:05:07 +02:00
Joas Schilling cae849bcf9
Merge pull request #21869 from nextcloud/techdebt/noid/add-constants-for-magic-strings
Add constants for the magic strings of template rendering
2020-07-16 22:00:57 +02:00
Roeland Jago Douma 884f3d009a
Discourage webauthn user interaction
Else people might have the feeling this is also doing 2FA. And since it
is only prefered it can be ignored and hacked around.

Once we have proper 2FA with webauthn in one go this probably needs to
be revisted.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-16 21:10:07 +02:00
Roeland Jago Douma dfcb49b9b7
Merge pull request #21873 from nextcloud/techdebt/deprecate-server-container-getters
Deprecate the server container getters
2020-07-16 20:27:36 +02:00
Christoph Wurst 8a433a7226
Deprecate ILogger
The logger service was always intended to follow the PSR-3 interface.
It's time to embrace this and switch over to the "official" API,
hence this custom interface can be slowly phased out.

With Nextcloud 20 the logger also got support for
* App id filled out automatically
* Exceptions handling (as replacement for logException)

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 19:19:23 +02:00
Christoph Wurst c889021334
Add a scoped PSR logger for apps
Just like for ILogger we should have a version that has the app ID
pre-set for the context (unless overwritten) so that each log entry can
be traced back to the app that produced it.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 19:11:56 +02:00
Christoph Wurst efd2835b23
Deprecate the server container getters
Service locators are an anti pattern. These getters just make it more
appealing to do the wrong thing. If you want to locate a service the bad
way, just use the `get` method on a container – it will do the same in
also one line of code.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 18:59:56 +02:00
Joas Schilling 49970639fa
Add constants for the magic strings of template rendering
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-16 15:47:28 +02:00
Joas Schilling 0dfcc132ca
Allow to register AlternativeLogin on RegistrationContext
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-16 14:20:24 +02:00
Christoph Wurst 4152216bd8
Use PSR container interface and deprecate our own abstraction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 13:35:45 +02:00
Morris Jobke fc41810d2f
Merge pull request #21822 from nextcloud/enh/events/additionalscripts
Add real events to load additionalscripts
2020-07-15 19:50:01 +02:00
Morris Jobke cc258ad51a
Merge pull request #21844 from bladewing/bladewing-harden-against-mimetype-mismatch
Avoid substr() error when strpos returns false
2020-07-15 19:33:09 +02:00
Roeland Jago Douma 7d7ba61625
Add real events to load additionalscripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-15 14:07:18 +02:00
Christoph Wurst b9a911f0b3
Deprecate the internal Symfony dispatcher adapter
This type is not known on the public API, yet we should make sure that
any usage of this class is noticed and migrated as soon as possible.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-15 13:57:35 +02:00
lui87kw 3fe3d1fca3 Extra white space to follow other ifs
Signed-off-by: lui87kw <lukas.ifflaender@uni-wuerzburg.de>
2020-07-15 10:18:47 +02:00
bladewing 7dafd5831f Avoid substr() error when strpos returns false
"Exception: substr() expects parameter 3 to be int, bool given" can occur on Line 378 $mimePart = substr($icon, 0, strpos($icon, '-'));
This happens, when '-' is not found and strpos returns false instead of an int.
When this occurs, e.g., Activity hangs.

Signed-off-by: lui87kw <lukas.ifflaender@uni-wuerzburg.de>
2020-07-15 10:18:47 +02:00
Julius Härtl 35bdb998ef
Dashboard strict typing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:12 +02:00
Julius Härtl 31a1494529
Add load method for apps to bootstrap their panels
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl b71de68f43
Cleanup public api methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl 81e5593133
Move to lazy panel registration during registration context
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:27:57 +02:00
Julius Härtl 673d70dfc5
Add new dashboard public API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:24:50 +02:00
Morris Jobke 157c652762
Merge pull request #21825 from nextcloud/fix/appframework/services
Fix AppFramework services
2020-07-14 17:07:38 +02:00
Morris Jobke fba64a972f
Merge pull request #21812 from nextcloud/feature/noid/app-bootstrap-without-app.php
Do not load app.php if Application implements IBootstrap
2020-07-14 17:06:06 +02:00
Roeland Jago Douma dca2469462
Merge pull request #21833 from nextcloud/docfix/noid/irequest_getHeader
Fix PHPDoc of IRequest::getHeader
2020-07-14 16:43:09 +02:00
Morris Jobke 6f167f0dd1
Merge pull request #21828 from nextcloud/enhancement/lazy-bootstrap-registration-delegation
Delegate bootstrap registration lazily
2020-07-14 16:37:04 +02:00
Roeland Jago Douma fa9dfd83c9
Fix AppFramework services
* We can't just register an alias as the services need the appId to be
  injected. if we just register an alias this blows up since the main
  container doesn't have the appId.
* Moved the Authtokens over to show the PoC works

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-14 16:01:14 +02:00
Morris Jobke d9cc2f0213
Do not load app.php if Application implements IBootstrap
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-14 15:55:23 +02:00
Christoph Wurst f03f88b437
Delegate bootstrap registration lazily
* Keep the registration context
* Expose the context object for other components
* Ensure registration is only run once

Search providers are migrated for demonstration.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 15:33:32 +02:00
Georg Ehrke 3bdfb380fc
Fix PHPDoc of IRequest::getHeader
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-14 14:20:43 +02:00
Christoph Wurst ab303dddcd
Make the PSR-3 adapter exception-aware
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 09:38:51 +02:00
Morris Jobke cbbbbee8b1
Merge pull request #21785 from nextcloud/techdebt/noid/remove-classmap-in-files_external
Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH us…
2020-07-13 16:47:12 +02:00