diff --git a/appinfo/info.xml b/appinfo/info.xml
index 2225101ec..0dd691cfd 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -26,7 +26,6 @@ While theoretically any other authentication provider implementing either one of
User_SAML
-
https://portal.nextcloud.com/article/configuring-single-sign-on-10.html
@@ -61,9 +60,4 @@ While theoretically any other authentication provider implementing either one of
OCA\User_SAML\Settings\Admin
OCA\User_SAML\Settings\Section
-
-
- OCA\User_SAML\DavPlugin
-
-
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 150f395a2..491e9e104 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -12,10 +12,12 @@
use OC\Security\CSRF\CsrfTokenManager;
use OC\User\LoginException;
use OC_User;
+use OCA\DAV\Events\SabrePluginAddEvent;
use OCA\User_SAML\DavPlugin;
use OCA\User_SAML\GroupBackend;
use OCA\User_SAML\GroupManager;
use OCA\User_SAML\Listener\LoadAdditionalScriptsListener;
+use OCA\User_SAML\Listener\SabrePluginEventListener;
use OCA\User_SAML\Middleware\OnlyLoggedInMiddleware;
use OCA\User_SAML\SAMLSettings;
use OCA\User_SAML\UserBackend;
@@ -50,6 +52,7 @@ public function __construct(array $urlParams = []) {
public function register(IRegistrationContext $context): void {
$context->registerMiddleware(OnlyLoggedInMiddleware::class);
$context->registerEventListener(BeforeTemplateRenderedEvent::class, LoadAdditionalScriptsListener::class);
+ $context->registerEventListener(SabrePluginAddEvent::class, SabrePluginEventListener::class);
$context->registerService(DavPlugin::class, function (ContainerInterface $c) {
return new DavPlugin(
$c->get(ISession::class),
diff --git a/lib/Listener/SabrePluginEventListener.php b/lib/Listener/SabrePluginEventListener.php
new file mode 100644
index 000000000..c30724ecd
--- /dev/null
+++ b/lib/Listener/SabrePluginEventListener.php
@@ -0,0 +1,26 @@
+ */
+class SabrePluginEventListener implements IEventListener {
+ public function handle(Event $event): void {
+ if (!$event instanceof SabrePluginAddEvent) {
+ return;
+ }
+ $event->getServer()->addPlugin(Server::get(DavPlugin::class));
+ }
+}
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index dd0a1ef0d..a1e48ba4b 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -4,12 +4,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
-
-
-
-
-
-
@@ -29,11 +23,6 @@
-
-
-
-
-
diff --git a/tests/stub.phpstub b/tests/stub.phpstub
index 04451c801..40d5235bf 100644
--- a/tests/stub.phpstub
+++ b/tests/stub.phpstub
@@ -69,6 +69,20 @@ namespace OC\User {
}
}
+namespace OCA\DAV\Connector\Sabre {
+ class Auth {
+ public const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
+ }
+}
+
+namespace OCA\DAV\Events {
+ use OCP\EventDispatcher\Event;
+ use Sabre\DAV\Server;
+ class SabrePluginAddEvent extends Event {
+ public function getServer(): Server;
+ }
+}
+
class OC_User {
public static function useBackend($userBackend): void;
public static function handleApacheAuth(): void;
diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json
index 3f6744b57..051d53ec8 100644
--- a/vendor-bin/psalm/composer.json
+++ b/vendor-bin/psalm/composer.json
@@ -1,7 +1,8 @@
{
"require-dev": {
"nextcloud/ocp": "dev-stable28",
- "vimeo/psalm": "^5.26"
+ "vimeo/psalm": "^5.26",
+ "sabre/dav": "4.7.0"
},
"config": {
"platform": {
diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock
index 7dfbafb43..3d889007c 100644
--- a/vendor-bin/psalm/composer.lock
+++ b/vendor-bin/psalm/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "a746ea836f63ffdca84b6be9af2ed4ee",
+ "content-hash": "82e4e755c70ea5f51c40de5df7ca9b26",
"packages": [],
"packages-dev": [
{
@@ -1214,6 +1214,451 @@
},
"time": "2021-05-03T11:20:27+00:00"
},
+ {
+ "name": "sabre/dav",
+ "version": "4.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/dav.git",
+ "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/dav/zipball/074373bcd689a30bcf5aaa6bbb20a3395964ce7a",
+ "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "ext-date": "*",
+ "ext-dom": "*",
+ "ext-iconv": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-pcre": "*",
+ "ext-simplexml": "*",
+ "ext-spl": "*",
+ "lib-libxml": ">=2.7.0",
+ "php": "^7.1.0 || ^8.0",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
+ "sabre/event": "^5.0",
+ "sabre/http": "^5.0.5",
+ "sabre/uri": "^2.0",
+ "sabre/vobject": "^4.2.1",
+ "sabre/xml": "^2.0.1"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^2.19",
+ "monolog/monolog": "^1.27 || ^2.0",
+ "phpstan/phpstan": "^0.12 || ^1.0",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
+ },
+ "suggest": {
+ "ext-curl": "*",
+ "ext-imap": "*",
+ "ext-pdo": "*"
+ },
+ "bin": [
+ "bin/sabredav",
+ "bin/naturalselection"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Sabre\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ }
+ ],
+ "description": "WebDAV Framework for PHP",
+ "homepage": "http://sabre.io/",
+ "keywords": [
+ "CalDAV",
+ "CardDAV",
+ "WebDAV",
+ "framework",
+ "iCalendar"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/dav/issues",
+ "source": "https://github.com/fruux/sabre-dav"
+ },
+ "time": "2024-10-29T11:46:02+00:00"
+ },
+ {
+ "name": "sabre/event",
+ "version": "5.1.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/event.git",
+ "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/event/zipball/86d57e305c272898ba3c28e9bd3d65d5464587c2",
+ "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.17.1||^3.63",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/coroutine.php",
+ "lib/Loop/functions.php",
+ "lib/Promise/functions.php"
+ ],
+ "psr-4": {
+ "Sabre\\Event\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ }
+ ],
+ "description": "sabre/event is a library for lightweight event-based programming",
+ "homepage": "http://sabre.io/event/",
+ "keywords": [
+ "EventEmitter",
+ "async",
+ "coroutine",
+ "eventloop",
+ "events",
+ "hooks",
+ "plugin",
+ "promise",
+ "reactor",
+ "signal"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/event/issues",
+ "source": "https://github.com/fruux/sabre-event"
+ },
+ "time": "2024-08-27T11:23:05+00:00"
+ },
+ {
+ "name": "sabre/http",
+ "version": "5.1.12",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/http.git",
+ "reference": "dedff73f3995578bc942fa4c8484190cac14f139"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/http/zipball/dedff73f3995578bc942fa4c8484190cac14f139",
+ "reference": "dedff73f3995578bc942fa4c8484190cac14f139",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "ext-curl": "*",
+ "ext-mbstring": "*",
+ "php": "^7.1 || ^8.0",
+ "sabre/event": ">=4.0 <6.0",
+ "sabre/uri": "^2.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.17.1||^3.63",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
+ },
+ "suggest": {
+ "ext-curl": " to make http requests with the Client class"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/functions.php"
+ ],
+ "psr-4": {
+ "Sabre\\HTTP\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ }
+ ],
+ "description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
+ "homepage": "https://github.com/fruux/sabre-http",
+ "keywords": [
+ "http"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/http/issues",
+ "source": "https://github.com/fruux/sabre-http"
+ },
+ "time": "2024-08-27T16:07:41+00:00"
+ },
+ {
+ "name": "sabre/uri",
+ "version": "2.3.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/uri.git",
+ "reference": "b76524c22de90d80ca73143680a8e77b1266c291"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/uri/zipball/b76524c22de90d80ca73143680a8e77b1266c291",
+ "reference": "b76524c22de90d80ca73143680a8e77b1266c291",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^3.63",
+ "phpstan/extension-installer": "^1.4",
+ "phpstan/phpstan": "^1.12",
+ "phpstan/phpstan-phpunit": "^1.4",
+ "phpstan/phpstan-strict-rules": "^1.6",
+ "phpunit/phpunit": "^9.6"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/functions.php"
+ ],
+ "psr-4": {
+ "Sabre\\Uri\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ }
+ ],
+ "description": "Functions for making sense out of URIs.",
+ "homepage": "http://sabre.io/uri/",
+ "keywords": [
+ "rfc3986",
+ "uri",
+ "url"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/uri/issues",
+ "source": "https://github.com/fruux/sabre-uri"
+ },
+ "time": "2024-08-27T12:18:16+00:00"
+ },
+ {
+ "name": "sabre/vobject",
+ "version": "4.5.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/vobject.git",
+ "reference": "900266bb3bd448a9f7f41f82344ad0aba237cb27"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/vobject/zipball/900266bb3bd448a9f7f41f82344ad0aba237cb27",
+ "reference": "900266bb3bd448a9f7f41f82344ad0aba237cb27",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": "^7.1 || ^8.0",
+ "sabre/xml": "^2.1 || ^3.0 || ^4.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.17.1",
+ "phpstan/phpstan": "^0.12 || ^1.11",
+ "phpunit/php-invoker": "^2.0 || ^3.1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
+ },
+ "suggest": {
+ "hoa/bench": "If you would like to run the benchmark scripts"
+ },
+ "bin": [
+ "bin/vobject",
+ "bin/generate_vcards"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Sabre\\VObject\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ },
+ {
+ "name": "Dominik Tobschall",
+ "email": "dominik@fruux.com",
+ "homepage": "http://tobschall.de/",
+ "role": "Developer"
+ },
+ {
+ "name": "Ivan Enderlin",
+ "email": "ivan.enderlin@hoa-project.net",
+ "homepage": "http://mnt.io/",
+ "role": "Developer"
+ }
+ ],
+ "description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
+ "homepage": "http://sabre.io/vobject/",
+ "keywords": [
+ "availability",
+ "freebusy",
+ "iCalendar",
+ "ical",
+ "ics",
+ "jCal",
+ "jCard",
+ "recurrence",
+ "rfc2425",
+ "rfc2426",
+ "rfc2739",
+ "rfc4770",
+ "rfc5545",
+ "rfc5546",
+ "rfc6321",
+ "rfc6350",
+ "rfc6351",
+ "rfc6474",
+ "rfc6638",
+ "rfc6715",
+ "rfc6868",
+ "vCalendar",
+ "vCard",
+ "vcf",
+ "xCal",
+ "xCard"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/vobject/issues",
+ "source": "https://github.com/fruux/sabre-vobject"
+ },
+ "time": "2024-10-14T11:53:54+00:00"
+ },
+ {
+ "name": "sabre/xml",
+ "version": "2.2.11",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sabre-io/xml.git",
+ "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sabre-io/xml/zipball/01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc",
+ "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-xmlreader": "*",
+ "ext-xmlwriter": "*",
+ "lib-libxml": ">=2.6.20",
+ "php": "^7.1 || ^8.0",
+ "sabre/uri": ">=1.0,<3.0.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.17.1||3.63.2",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/Deserializer/functions.php",
+ "lib/Serializer/functions.php"
+ ],
+ "psr-4": {
+ "Sabre\\Xml\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Evert Pot",
+ "email": "me@evertpot.com",
+ "homepage": "http://evertpot.com/",
+ "role": "Developer"
+ },
+ {
+ "name": "Markus Staab",
+ "email": "markus.staab@redaxo.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "sabre/xml is an XML library that you may not hate.",
+ "homepage": "https://sabre.io/xml/",
+ "keywords": [
+ "XMLReader",
+ "XMLWriter",
+ "dom",
+ "xml"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/group/sabredav-discuss",
+ "issues": "https://github.com/sabre-io/xml/issues",
+ "source": "https://github.com/fruux/sabre-xml"
+ },
+ "time": "2024-09-06T07:37:46+00:00"
+ },
{
"name": "sebastian/diff",
"version": "4.0.6",