From c4714d3053a4f4d1c41b2f0057752313549a93ad Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Wed, 9 Apr 2025 15:18:13 +0200 Subject: [PATCH 01/15] Use Secure WebSocket Resolution for CLN-001. --- solid/lib/Notifications/SolidPubSub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solid/lib/Notifications/SolidPubSub.php b/solid/lib/Notifications/SolidPubSub.php index e0acaf4c..47608fb3 100644 --- a/solid/lib/Notifications/SolidPubSub.php +++ b/solid/lib/Notifications/SolidPubSub.php @@ -12,7 +12,7 @@ public function __construct($pubsubUrl) { } public function send($path, $type) { - $pubsub = str_replace(["https://", "http://"], "ws://", $this->pubsub); + $pubsub = str_replace(["https://", "http://"], "wss://", $this->pubsub); $client = new Client($pubsub, array( 'headers' => array( From c643159cbd33e4d45d43802c10b49025a2d1475d Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Tue, 3 Jun 2025 23:49:14 +0200 Subject: [PATCH 02/15] update pubsub image --- .github/workflows/solid-tests-suites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 4ae2e5f3..a68dccd8 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -3,7 +3,7 @@ name: Solid Test Suites env: # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:35166933e3d30bde801fd156bd2f21ebba9cdeca464ebd574c6be4cdb14d35cd + PUBSUB_TAG: latest@sha256:d3a5038e7574b167517d1e7aabb444422f76a23f859dd286f7dcfbd165779c01 COOKIE_TAG: latest@sha256:c71a3947f97d96ce09823743182582e0d919738be0d4ef5c8c55a9c22c615b91 on: From a01753ede1172ad2e198d4b98f1be0496815e541 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Tue, 3 Jun 2025 23:56:26 +0200 Subject: [PATCH 03/15] fix exception --- solid/lib/Notifications/SolidPubSub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solid/lib/Notifications/SolidPubSub.php b/solid/lib/Notifications/SolidPubSub.php index 47608fb3..c4ae3417 100644 --- a/solid/lib/Notifications/SolidPubSub.php +++ b/solid/lib/Notifications/SolidPubSub.php @@ -23,7 +23,7 @@ public function send($path, $type) { try { $client->send("pub $path\n"); } catch (\WebSocket\Exception $exception) { - throw new Exception('Could not write to pubsub server', 502, $exception); + throw new \Exception('Could not write to pubsub server', 502, $exception); } } } From b78ca848df6ecd60e5f673a31d0d20c6c2b298e1 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 12:06:58 +0200 Subject: [PATCH 04/15] add websocket client --- solid/composer.json | 4 +- solid/composer.lock | 296 ++++++++++++++++++++++++++++++++------------ 2 files changed, 218 insertions(+), 82 deletions(-) diff --git a/solid/composer.json b/solid/composer.json index 924bce73..4a62d37b 100644 --- a/solid/composer.json +++ b/solid/composer.json @@ -32,8 +32,8 @@ "pdsinterop/flysystem-nextcloud": "^0.2", "pdsinterop/flysystem-rdf": "^0.6", "pdsinterop/solid-auth": "^0.12.2", - "pdsinterop/solid-crud": "^0.8", - "psr/log": "^1.1" + "pdsinterop/solid-crud": "dev-feature/wss", + "phrity/websocket": "^3.5" }, "require-dev": { "phpunit/phpunit": "^8 || ^9" diff --git a/solid/composer.lock b/solid/composer.lock index e1053ebb..ec3153b7 100644 --- a/solid/composer.lock +++ b/solid/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": "0dfcf10433b54d08c6bf8c7ed8115e1f", + "content-hash": "cc0bc814626b598e13effe83a418ef2a", "packages": [ { "name": "arc/base", @@ -1545,16 +1545,16 @@ }, { "name": "pdsinterop/solid-crud", - "version": "v0.8.0", + "version": "dev-feature/wss", "source": { "type": "git", "url": "https://github.com/pdsinterop/php-solid-crud.git", - "reference": "ca1421770b17c69cc5989ce6864e86405030a50c" + "reference": "bf674388a5d1544d9931a4fa92f2f932a81b69c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdsinterop/php-solid-crud/zipball/ca1421770b17c69cc5989ce6864e86405030a50c", - "reference": "ca1421770b17c69cc5989ce6864e86405030a50c", + "url": "https://api.github.com/repos/pdsinterop/php-solid-crud/zipball/bf674388a5d1544d9931a4fa92f2f932a81b69c4", + "reference": "bf674388a5d1544d9931a4fa92f2f932a81b69c4", "shasum": "" }, "require": { @@ -1566,8 +1566,7 @@ "php": "^8.0", "pietercolpaert/hardf": "^0.3", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "textalk/websocket": "^1.5" + "psr/http-message": "^1.0" }, "require-dev": { "phpunit/phpunit": "^9" @@ -1586,33 +1585,157 @@ "description": "Solid HTTPS REST API specification compliant implementation for handling Resource CRUD", "support": { "issues": "https://github.com/pdsinterop/php-solid-crud/issues", - "source": "https://github.com/pdsinterop/php-solid-crud/tree/v0.8.0" + "source": "https://github.com/pdsinterop/php-solid-crud/tree/feature/wss" }, - "time": "2025-05-16T09:04:57+00:00" + "time": "2025-06-06T10:02:27+00:00" + }, + { + "name": "phrity/comparison", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/sirn-se/phrity-comparison.git", + "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sirn-se/phrity-comparison/zipball/aedd44d59db08de7d6c31812d1490c22aab35c92", + "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Phrity\\Comparison\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sören Jensen", + "email": "sirn@sirn.se", + "homepage": "https://phrity.sirn.se" + } + ], + "description": "Interfaces and helper trait for comparing objects. Comparator for sort and filter applications.", + "homepage": "https://phrity.sirn.se/comparison", + "keywords": [ + "comparable", + "comparator", + "comparison", + "equalable", + "filter", + "sort" + ], + "support": { + "issues": "https://github.com/sirn-se/phrity-comparison/issues", + "source": "https://github.com/sirn-se/phrity-comparison/tree/1.4.0" + }, + "time": "2025-05-26T20:12:39+00:00" + }, + { + "name": "phrity/net-stream", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/sirn-se/phrity-net-stream.git", + "reference": "0ecc50a8ee7a708033d391ed60878b0bd5397bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sirn-se/phrity-net-stream/zipball/0ecc50a8ee7a708033d391ed60878b0bd5397bf8", + "reference": "0ecc50a8ee7a708033d391ed60878b0bd5397bf8", + "shasum": "" + }, + "require": { + "php": "^8.1", + "phrity/util-errorhandler": "^1.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 | ^2.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", + "phrity/net-uri": "^2.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Phrity\\Net\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sören Jensen", + "email": "sirn@sirn.se", + "homepage": "https://phrity.sirn.se" + } + ], + "description": "Socket stream classes implementing PSR-7 Stream and PSR-17 StreamFactory", + "homepage": "https://phrity.sirn.se/net-stream", + "keywords": [ + "Socket", + "client", + "psr-17", + "psr-7", + "server", + "stream", + "stream factory" + ], + "support": { + "issues": "https://github.com/sirn-se/phrity-net-stream/issues", + "source": "https://github.com/sirn-se/phrity-net-stream/tree/2.3.0" + }, + "time": "2025-05-22T08:28:09+00:00" }, { "name": "phrity/net-uri", - "version": "1.3.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-uri.git", - "reference": "3f458e0c4d1ddc0e218d7a5b9420127c63925f43" + "reference": "08de4cf07e439c4708f572249659f09198ac99f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/3f458e0c4d1ddc0e218d7a5b9420127c63925f43", - "reference": "3f458e0c4d1ddc0e218d7a5b9420127c63925f43", + "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/08de4cf07e439c4708f572249659f09198ac99f0", + "reference": "08de4cf07e439c4708f572249659f09198ac99f0", "shasum": "" }, "require": { - "php": "^7.4 | ^8.0", + "ext-mbstring": "*", + "php": "^8.1", + "phrity/comparison": "^1.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0 | ^2.0" + "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^9.0 | ^10.0", - "squizlabs/php_codesniffer": "^3.0" + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", + "phrity/util-errorhandler": "^1.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "ext-intl": "Enables IDN conversion for non-ASCII domains" }, "type": "library", "autoload": { @@ -1641,9 +1764,9 @@ ], "support": { "issues": "https://github.com/sirn-se/phrity-net-uri/issues", - "source": "https://github.com/sirn-se/phrity-net-uri/tree/1.3.0" + "source": "https://github.com/sirn-se/phrity-net-uri/tree/2.2.0" }, - "time": "2023-08-21T10:33:06+00:00" + "time": "2025-05-25T13:05:13+00:00" }, { "name": "phrity/util-errorhandler", @@ -1697,6 +1820,68 @@ }, "time": "2025-05-26T18:26:51+00:00" }, + { + "name": "phrity/websocket", + "version": "3.5.0", + "source": { + "type": "git", + "url": "https://github.com/sirn-se/websocket-php.git", + "reference": "df3b4dbe3a8741159ae5cb5735476ebc4813d909" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sirn-se/websocket-php/zipball/df3b4dbe3a8741159ae5cb5735476ebc4813d909", + "reference": "df3b4dbe3a8741159ae5cb5735476ebc4813d909", + "shasum": "" + }, + "require": { + "php": "^8.1", + "phrity/net-stream": "^2.3", + "phrity/net-uri": "^2.1", + "psr/http-message": "^1.1 | ^2.0", + "psr/log": "^1.0 | ^2.0 | ^3.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", + "phrity/net-mock": "^2.3", + "phrity/util-errorhandler": "^1.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "WebSocket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Fredrik Liljegren" + }, + { + "name": "Sören Jensen", + "email": "sirn@sirn.se", + "homepage": "https://phrity.sirn.se" + } + ], + "description": "WebSocket client and server", + "homepage": "https://phrity.sirn.se/websocket", + "keywords": [ + "client", + "server", + "websocket" + ], + "support": { + "issues": "https://github.com/sirn-se/websocket-php/issues", + "source": "https://github.com/sirn-se/websocket-php/tree/3.5.0" + }, + "time": "2025-05-23T13:13:41+00:00" + }, { "name": "pietercolpaert/hardf", "version": "0.3.1", @@ -1972,30 +2157,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2016,9 +2201,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "ralouphie/getallheaders", @@ -2205,57 +2390,6 @@ }, "time": "2022-09-19T07:53:57+00:00" }, - { - "name": "textalk/websocket", - "version": "1.6.3", - "source": { - "type": "git", - "url": "https://github.com/Textalk/websocket-php.git", - "reference": "67de79745b1a357caf812bfc44e0abf481cee012" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/67de79745b1a357caf812bfc44e0abf481cee012", - "reference": "67de79745b1a357caf812bfc44e0abf481cee012", - "shasum": "" - }, - "require": { - "php": "^7.4 | ^8.0", - "phrity/net-uri": "^1.0", - "phrity/util-errorhandler": "^1.0", - "psr/http-message": "^1.0", - "psr/log": "^1.0 | ^2.0 | ^3.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen" - } - ], - "description": "WebSocket client and server", - "support": { - "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.6.3" - }, - "time": "2022-11-07T18:59:33+00:00" - }, { "name": "web-token/jwt-core", "version": "v2.2.11", @@ -4087,7 +4221,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "pdsinterop/solid-crud": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From b900d322604e72bb6cd6337956dd213d34419ad1 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 12:09:16 +0200 Subject: [PATCH 05/15] update websocket client code --- solid/lib/Notifications/SolidPubSub.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/solid/lib/Notifications/SolidPubSub.php b/solid/lib/Notifications/SolidPubSub.php index c4ae3417..2a5ce9b8 100644 --- a/solid/lib/Notifications/SolidPubSub.php +++ b/solid/lib/Notifications/SolidPubSub.php @@ -14,14 +14,10 @@ public function __construct($pubsubUrl) { public function send($path, $type) { $pubsub = str_replace(["https://", "http://"], "wss://", $this->pubsub); - $client = new Client($pubsub, array( - 'headers' => array( - 'Sec-WebSocket-Protocol' => 'solid-0.1' - ) - )); - + $client = new Client($pubsub); + $client->addHeader("Sec-WebSocket-Protocol", "solid-0.1"); try { - $client->send("pub $path\n"); + $client->text("pub $path\n"); } catch (\WebSocket\Exception $exception) { throw new \Exception('Could not write to pubsub server', 502, $exception); } From 79a29c0ced28ddfad4444c6fc33a40cb069e5f2c Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 14:15:45 +0200 Subject: [PATCH 06/15] allow self-signed certificates --- solid/lib/Notifications/SolidPubSub.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solid/lib/Notifications/SolidPubSub.php b/solid/lib/Notifications/SolidPubSub.php index 2a5ce9b8..8d96a0ca 100644 --- a/solid/lib/Notifications/SolidPubSub.php +++ b/solid/lib/Notifications/SolidPubSub.php @@ -15,6 +15,11 @@ public function send($path, $type) { $pubsub = str_replace(["https://", "http://"], "wss://", $this->pubsub); $client = new Client($pubsub); + $client->setContext(['ssl' => [ + 'verify_peer' => false, // if false, accept SSL handshake without client certificate + 'verify_peer_name' => false, + 'allow_self_signed' => true, + ]]); $client->addHeader("Sec-WebSocket-Protocol", "solid-0.1"); try { $client->text("pub $path\n"); From 23c6378e810ca7e62b8ef37cd878ba5ca63b90b8 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 14:22:35 +0200 Subject: [PATCH 07/15] update solid-crud and solid-auth --- solid/composer.json | 4 ++-- solid/composer.lock | 30 ++++++++++++++---------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/solid/composer.json b/solid/composer.json index 4a62d37b..82b53028 100644 --- a/solid/composer.json +++ b/solid/composer.json @@ -31,8 +31,8 @@ "lcobucci/jwt": "^4.1", "pdsinterop/flysystem-nextcloud": "^0.2", "pdsinterop/flysystem-rdf": "^0.6", - "pdsinterop/solid-auth": "^0.12.2", - "pdsinterop/solid-crud": "dev-feature/wss", + "pdsinterop/solid-auth": "^0.13", + "pdsinterop/solid-crud": "^0.8", "phrity/websocket": "^3.5" }, "require-dev": { diff --git a/solid/composer.lock b/solid/composer.lock index ec3153b7..0704a6b4 100644 --- a/solid/composer.lock +++ b/solid/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": "cc0bc814626b598e13effe83a418ef2a", + "content-hash": "f31a4097fe6ac68cfd4641ac50324fdc", "packages": [ { "name": "arc/base", @@ -1496,16 +1496,16 @@ }, { "name": "pdsinterop/solid-auth", - "version": "v0.12.2", + "version": "v0.13.0", "source": { "type": "git", "url": "https://github.com/pdsinterop/php-solid-auth.git", - "reference": "1d1160ee0f7ca71d3e34151aea94232e1cfa49ff" + "reference": "f5fa8941c4178c18d5e278fb814351033a5f2a03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdsinterop/php-solid-auth/zipball/1d1160ee0f7ca71d3e34151aea94232e1cfa49ff", - "reference": "1d1160ee0f7ca71d3e34151aea94232e1cfa49ff", + "url": "https://api.github.com/repos/pdsinterop/php-solid-auth/zipball/f5fa8941c4178c18d5e278fb814351033a5f2a03", + "reference": "f5fa8941c4178c18d5e278fb814351033a5f2a03", "shasum": "" }, "require": { @@ -1539,22 +1539,22 @@ "description": "OAuth2, OpenID and OIDC for Solid Server implementations.", "support": { "issues": "https://github.com/pdsinterop/php-solid-auth/issues", - "source": "https://github.com/pdsinterop/php-solid-auth/tree/v0.12.2" + "source": "https://github.com/pdsinterop/php-solid-auth/tree/v0.13.0" }, - "time": "2025-05-28T14:53:41+00:00" + "time": "2025-06-06T09:08:14+00:00" }, { "name": "pdsinterop/solid-crud", - "version": "dev-feature/wss", + "version": "v0.8.1", "source": { "type": "git", "url": "https://github.com/pdsinterop/php-solid-crud.git", - "reference": "bf674388a5d1544d9931a4fa92f2f932a81b69c4" + "reference": "4b973948cca24bd38fd843dd3d356cb4f7c5de04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdsinterop/php-solid-crud/zipball/bf674388a5d1544d9931a4fa92f2f932a81b69c4", - "reference": "bf674388a5d1544d9931a4fa92f2f932a81b69c4", + "url": "https://api.github.com/repos/pdsinterop/php-solid-crud/zipball/4b973948cca24bd38fd843dd3d356cb4f7c5de04", + "reference": "4b973948cca24bd38fd843dd3d356cb4f7c5de04", "shasum": "" }, "require": { @@ -1585,9 +1585,9 @@ "description": "Solid HTTPS REST API specification compliant implementation for handling Resource CRUD", "support": { "issues": "https://github.com/pdsinterop/php-solid-crud/issues", - "source": "https://github.com/pdsinterop/php-solid-crud/tree/feature/wss" + "source": "https://github.com/pdsinterop/php-solid-crud/tree/v0.8.1" }, - "time": "2025-06-06T10:02:27+00:00" + "time": "2025-06-06T12:20:43+00:00" }, { "name": "phrity/comparison", @@ -4221,9 +4221,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "pdsinterop/solid-crud": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 11a8b221f9d728960ae727b96b2aa74fac5d3d55 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 14:27:26 +0200 Subject: [PATCH 08/15] update pubsub --- .github/workflows/solid-tests-suites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index a68dccd8..6745b6d0 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -3,7 +3,7 @@ name: Solid Test Suites env: # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:d3a5038e7574b167517d1e7aabb444422f76a23f859dd286f7dcfbd165779c01 + PUBSUB_TAG: latest@sha256:d15c40e7317143d6d9fc706494fd16c686d852d437089e1d7d715a1e3a514f4b COOKIE_TAG: latest@sha256:c71a3947f97d96ce09823743182582e0d919738be0d4ef5c8c55a9c22c615b91 on: From 3271dbf0be411cd21e0631905774446ae41e0de4 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 14:41:14 +0200 Subject: [PATCH 09/15] update pubsub --- .github/workflows/solid-tests-suites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 6745b6d0..f80590a0 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -3,7 +3,7 @@ name: Solid Test Suites env: # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:d15c40e7317143d6d9fc706494fd16c686d852d437089e1d7d715a1e3a514f4b + PUBSUB_TAG: latest@sha256:ab180a21f0f3e42e7d80acb785ab96e88076f2a00461309e65fe425623bed9fa COOKIE_TAG: latest@sha256:c71a3947f97d96ce09823743182582e0d919738be0d4ef5c8c55a9c22c615b91 on: From cdb1f9b3dc8ac0f1337c595fb74fbb48fad83bc1 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 14:51:22 +0200 Subject: [PATCH 10/15] add tmate for debugging, only run on 30 --- .github/workflows/solid-tests-suites.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index f80590a0..a097653b 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -82,8 +82,8 @@ jobs: fail-fast: false matrix: nextcloud_version: - - 28 - - 29 +# - 28 +# - 29 - 30 test: - 'solidtestsuite/solid-crud-tests:v7.0.5' @@ -153,6 +153,10 @@ jobs: --env-file ./env-vars-testers.list \ ${{ matrix.test }} + - name: Setup tmate session - ${{ matrix.test }} + if: failure() + uses: mxschmitt/action-tmate@v3 + - name: Show nextcloud logs - ${{ matrix.test }} if: always() run: | From 27c5582ea9685e787e263ed443d379ec482ef030 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 15:28:45 +0200 Subject: [PATCH 11/15] update pubsub --- .github/workflows/solid-tests-suites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index a097653b..1efda7e9 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -3,7 +3,7 @@ name: Solid Test Suites env: # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:ab180a21f0f3e42e7d80acb785ab96e88076f2a00461309e65fe425623bed9fa + PUBSUB_TAG: latest@sha256:b73a2a5c98d2005bb667dfc69d1c859d704366024298b9caa24ea2e182c456c2 COOKIE_TAG: latest@sha256:c71a3947f97d96ce09823743182582e0d919738be0d4ef5c8c55a9c22c615b91 on: From add785b4d8ae5a838eefab95aaae8c12edcfc9f2 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 15:39:43 +0200 Subject: [PATCH 12/15] pin psr/log to version 1.1 for nc-28 and 29 compat --- solid/composer.json | 3 ++- solid/composer.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/solid/composer.json b/solid/composer.json index 82b53028..5ec83de0 100644 --- a/solid/composer.json +++ b/solid/composer.json @@ -33,7 +33,8 @@ "pdsinterop/flysystem-rdf": "^0.6", "pdsinterop/solid-auth": "^0.13", "pdsinterop/solid-crud": "^0.8", - "phrity/websocket": "^3.5" + "phrity/websocket": "^3.5", + "psr/log": "^1.1" }, "require-dev": { "phpunit/phpunit": "^8 || ^9" diff --git a/solid/composer.lock b/solid/composer.lock index 0704a6b4..40beba96 100644 --- a/solid/composer.lock +++ b/solid/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": "f31a4097fe6ac68cfd4641ac50324fdc", + "content-hash": "d71bcfd1c20fc01d5d37b45d79fdc793", "packages": [ { "name": "arc/base", @@ -2157,30 +2157,30 @@ }, { "name": "psr/log", - "version": "3.0.2", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2201,9 +2201,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2024-09-11T13:17:53+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "ralouphie/getallheaders", From d2f7986a6323507bc5cf9ba8bd154d9875fb461e Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 15:44:08 +0200 Subject: [PATCH 13/15] restore tests --- .github/workflows/solid-tests-suites.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 1efda7e9..da00f1e2 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -82,8 +82,8 @@ jobs: fail-fast: false matrix: nextcloud_version: -# - 28 -# - 29 + - 28 + - 29 - 30 test: - 'solidtestsuite/solid-crud-tests:v7.0.5' @@ -153,9 +153,9 @@ jobs: --env-file ./env-vars-testers.list \ ${{ matrix.test }} - - name: Setup tmate session - ${{ matrix.test }} - if: failure() - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session - ${{ matrix.test }} +# if: failure() +# uses: mxschmitt/action-tmate@v3 - name: Show nextcloud logs - ${{ matrix.test }} if: always() From 94220bee39dc5e18836d0f8aa52f613ea60ab6d1 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 6 Jun 2025 16:20:14 +0200 Subject: [PATCH 14/15] update to https --- env-vars-server.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-vars-server.list b/env-vars-server.list index 1f38d6fe..75b5fae7 100644 --- a/env-vars-server.list +++ b/env-vars-server.list @@ -4,4 +4,4 @@ ALICE_WEBID=https://server/apps/solid/~alice/profile/card#me COOKIE_TYPE=nextcloud-compatible USERNAME=alice PASSWORD=alice123 -PUBSUB_URL=http://pubsub:8080 +PUBSUB_URL=https://pubsub:8080 From fbde9944d7a0b54c2d6215fadb5a5aeca7a0ba2c Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Thu, 19 Jun 2025 16:47:34 +0200 Subject: [PATCH 15/15] fix link hijacking issue in simplyview --- .../js/vendor/simplyedit/simply.everything.js | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/solid/js/vendor/simplyedit/simply.everything.js b/solid/js/vendor/simplyedit/simply.everything.js index 57e66774..0b0d8168 100644 --- a/solid/js/vendor/simplyedit/simply.everything.js +++ b/solid/js/vendor/simplyedit/simply.everything.js @@ -556,38 +556,6 @@ properties for a given parent, keep seperate index for this? } } - var linkHandler = function(evt) { - if (evt.ctrlKey) { - return; - } - if (evt.which != 1) { - return; // not a 'left' mouse click - } - var link = evt.target; - while (link && link.tagName!='A') { - link = link.parentElement; - } - if (link - && link.pathname - && link.hostname==global.location.hostname - && !link.link - && !link.dataset.simplyCommand - ) { - let path = getPath(link.pathname+link.hash); - if ( !route.has(path) ) { - path = getPath(link.pathname); - } - if ( route.has(path) ) { - let params = runListeners('goto', { path: path}); - if (params.path) { - route.goto(params.path); - } - evt.preventDefault(); - return false; - } - } - }; - var options = { root: '/' }; @@ -642,7 +610,6 @@ properties for a given parent, keep seperate index for this? route.match(getPath(document.location.pathname)); } }); - global.document.addEventListener('click', linkHandler); }, load: function(routes) { parseRoutes(routes);