From 25487b5cd6e3ca56251796eacd0c47c183c1237d Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 16 Apr 2024 19:30:45 +1000 Subject: [PATCH 1/7] composer update --- composer.lock | 130 +++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/composer.lock b/composer.lock index 41d61ba10..846ae776a 100644 --- a/composer.lock +++ b/composer.lock @@ -1250,16 +1250,16 @@ }, { "name": "doctrine/orm", - "version": "2.19.0", + "version": "2.19.4", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "a809a71aa6a233a6c82e68ebaaf8954adc4998dc" + "reference": "b27489348658cd718d18005de37b94f7f8561467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/a809a71aa6a233a6c82e68ebaaf8954adc4998dc", - "reference": "a809a71aa6a233a6c82e68ebaaf8954adc4998dc", + "url": "https://api.github.com/repos/doctrine/orm/zipball/b27489348658cd718d18005de37b94f7f8561467", + "reference": "b27489348658cd718d18005de37b94f7f8561467", "shasum": "" }, "require": { @@ -1345,22 +1345,22 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.19.0" + "source": "https://github.com/doctrine/orm/tree/2.19.4" }, - "time": "2024-03-03T17:43:41+00:00" + "time": "2024-04-15T13:11:10+00:00" }, { "name": "doctrine/persistence", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "b6fd1f126b13c1f7e7321f7338b14a19116b5de4" + "reference": "477da35bd0255e032826f440b94b3e37f2d56f42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/b6fd1f126b13c1f7e7321f7338b14a19116b5de4", - "reference": "b6fd1f126b13c1f7e7321f7338b14a19116b5de4", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/477da35bd0255e032826f440b94b3e37f2d56f42", + "reference": "477da35bd0255e032826f440b94b3e37f2d56f42", "shasum": "" }, "require": { @@ -1429,7 +1429,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.3.1" + "source": "https://github.com/doctrine/persistence/tree/3.3.2" }, "funding": [ { @@ -1445,7 +1445,7 @@ "type": "tidelift" } ], - "time": "2024-03-01T19:53:13+00:00" + "time": "2024-03-12T14:54:36+00:00" }, { "name": "ezyang/htmlpurifier", @@ -1615,16 +1615,16 @@ }, { "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.16", + "version": "v1.0.18", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c" + "reference": "2c8a6cffc3220e99352ad958fe7cf06bf6f7690f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/ecadbdc9052e4ad08c60c8a02268712e50427f7c", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/2c8a6cffc3220e99352ad958fe7cf06bf6f7690f", + "reference": "2c8a6cffc3220e99352ad958fe7cf06bf6f7690f", "shasum": "" }, "require": { @@ -1681,7 +1681,7 @@ ], "support": { "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.16" + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.18" }, "funding": [ { @@ -1693,7 +1693,7 @@ "type": "tidelift" } ], - "time": "2023-05-24T07:17:17+00:00" + "time": "2024-03-20T12:50:41+00:00" }, { "name": "gregwar/captcha", @@ -2513,16 +2513,16 @@ }, { "name": "masterminds/html5", - "version": "2.8.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", "shasum": "" }, "require": { @@ -2530,7 +2530,7 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" }, "type": "library", "extra": { @@ -2574,9 +2574,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" }, - "time": "2023-05-10T11:58:31+00:00" + "time": "2024-03-31T07:05:07+00:00" }, { "name": "mf2/mf2", @@ -4158,16 +4158,16 @@ }, { "name": "smarty/smarty", - "version": "v4.4.1", + "version": "v4.5.2", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d" + "reference": "732040276609d0c3ad3381781c7444e7c5df9456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/f4152e9b814ae2369b6e4935c05e1e0c3654318d", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/732040276609d0c3ad3381781c7444e7c5df9456", + "reference": "732040276609d0c3ad3381781c7444e7c5df9456", "shasum": "" }, "require": { @@ -4218,9 +4218,9 @@ "support": { "forum": "https://github.com/smarty-php/smarty/discussions", "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v4.4.1" + "source": "https://github.com/smarty-php/smarty/tree/v4.5.2" }, - "time": "2024-02-26T13:58:37+00:00" + "time": "2024-04-05T22:34:05+00:00" }, { "name": "spomky-labs/base64url", @@ -4364,16 +4364,16 @@ }, { "name": "spomky-labs/pki-framework", - "version": "1.1.1", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/Spomky-Labs/pki-framework.git", - "reference": "86102bdd19379b2c6e5b0feb94fd490d40e7d133" + "reference": "0b10c8b53366729417d6226ae89a665f9e2d61b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Spomky-Labs/pki-framework/zipball/86102bdd19379b2c6e5b0feb94fd490d40e7d133", - "reference": "86102bdd19379b2c6e5b0feb94fd490d40e7d133", + "url": "https://api.github.com/repos/Spomky-Labs/pki-framework/zipball/0b10c8b53366729417d6226ae89a665f9e2d61b6", + "reference": "0b10c8b53366729417d6226ae89a665f9e2d61b6", "shasum": "" }, "require": { @@ -4385,7 +4385,7 @@ "ekino/phpstan-banned-code": "^1.0", "ext-gmp": "*", "ext-openssl": "*", - "infection/infection": "^0.27", + "infection/infection": "^0.28", "php-parallel-lint/php-parallel-lint": "^1.3", "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.8", @@ -4393,8 +4393,8 @@ "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^10.1", - "rector/rector": "^0.19", + "phpunit/phpunit": "^10.1|^11.0", + "rector/rector": "^1.0", "roave/security-advisories": "dev-latest", "symfony/phpunit-bridge": "^6.4|^7.0", "symfony/string": "^6.4|^7.0", @@ -4459,7 +4459,7 @@ ], "support": { "issues": "https://github.com/Spomky-Labs/pki-framework/issues", - "source": "https://github.com/Spomky-Labs/pki-framework/tree/1.1.1" + "source": "https://github.com/Spomky-Labs/pki-framework/tree/1.2.1" }, "funding": [ { @@ -4471,7 +4471,7 @@ "type": "patreon" } ], - "time": "2024-02-05T20:37:46+00:00" + "time": "2024-03-30T18:03:49+00:00" }, { "name": "stephenhill/base58", @@ -8024,16 +8024,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.13", + "version": "10.1.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d51c3aec14896d5e80b354fad58e998d1980f8f8" + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d51c3aec14896d5e80b354fad58e998d1980f8f8", - "reference": "d51c3aec14896d5e80b354fad58e998d1980f8f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", "shasum": "" }, "require": { @@ -8090,7 +8090,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.13" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" }, "funding": [ { @@ -8098,7 +8098,7 @@ "type": "github" } ], - "time": "2024-03-09T16:54:15+00:00" + "time": "2024-03-12T15:33:41+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8345,16 +8345,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.12", + "version": "10.5.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "41a9886b85ac7bf3929853baf96b95361cd69d2b" + "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/41a9886b85ac7bf3929853baf96b95361cd69d2b", - "reference": "41a9886b85ac7bf3929853baf96b95361cd69d2b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/835df1709ac6c968ba34bf23f3c30e5d5a266de8", + "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8", "shasum": "" }, "require": { @@ -8426,7 +8426,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.12" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.18" }, "funding": [ { @@ -8442,20 +8442,20 @@ "type": "tidelift" } ], - "time": "2024-03-09T12:04:07+00:00" + "time": "2024-04-14T07:05:31+00:00" }, { "name": "psy/psysh", - "version": "v0.12.0", + "version": "v0.12.3", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d" + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/750bf031a48fd07c673dbe3f11f72362ea306d0d", - "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", "shasum": "" }, "require": { @@ -8519,9 +8519,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.0" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" }, - "time": "2023-12-20T15:28:09+00:00" + "time": "2024-04-02T15:57:53+00:00" }, { "name": "sebastian/cli-parser", @@ -8895,16 +8895,16 @@ }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { @@ -8919,7 +8919,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -8947,7 +8947,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -8955,7 +8955,7 @@ "type": "github" } ], - "time": "2023-04-11T05:39:26+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", From c8535febe6318a19867c2cf4302a40c6c7ee9860 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 17 Apr 2024 09:04:59 +1000 Subject: [PATCH 2/7] change coords to double in database --- boot.php | 2 +- install/schema_mysql.sql | 4 ++-- install/schema_postgres.sql | 4 ++-- src/Lib/Libzot.php | 7 ++++++ src/Update/_1278.php | 48 +++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 src/Update/_1278.php diff --git a/boot.php b/boot.php index 1d21c71ee..c8d9cebfe 100755 --- a/boot.php +++ b/boot.php @@ -27,7 +27,7 @@ use Code\Lib\Url; */ const REPOSITORY_ID = 'streams'; -const DB_UPDATE_VERSION = 1277; +const DB_UPDATE_VERSION = 1278; const PROJECT_BASE = __DIR__; const ACTIVITYPUB_ENABLED = true; const NOMAD_PROTOCOL_VERSION = '13.3'; diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 83202a0d6..6d5d9b325 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -617,8 +617,8 @@ CREATE TABLE IF NOT EXISTS `item` ( `item_delayed` tinyint NOT NULL DEFAULT 0 , `item_pending_remove` tinyint NOT NULL DEFAULT 0 , `item_blocked` tinyint NOT NULL DEFAULT 0 , - `lat` float NOT NULL DEFAULT '0', - `lon` float NOT NULL DEFAULT '0', + `lat` double NOT NULL DEFAULT '0', + `lon` double NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `created` (`created`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index e7fa509c2..d91792203 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -631,8 +631,8 @@ CREATE TABLE "item" ( "item_delayed" smallint NOT NULL DEFAULT '0', "item_pending_remove" smallint NOT NULL DEFAULT '0', "item_blocked" smallint NOT NULL DEFAULT '0', - "lat" float NOT NULL DEFAULT '0', - "lon" float NOT NULL DEFAULT '0', + "lat" double NOT NULL DEFAULT '0', + "lon" double NOT NULL DEFAULT '0', "item_search_vector" tsvector, PRIMARY KEY ("id") ); diff --git a/src/Lib/Libzot.php b/src/Lib/Libzot.php index 45c52f593..d367d7d21 100644 --- a/src/Lib/Libzot.php +++ b/src/Lib/Libzot.php @@ -908,6 +908,11 @@ class Libzot $px = 1; } + if (! empty($arr['did'])) { + // see if this system supports did and if this channel has been migrated already. + // If not, migrate it. + } + $x = xchan_store_lowlevel( [ 'xchan_hash' => $xchan_hash, @@ -3029,8 +3034,10 @@ class Libzot // Communication details + $ret['id'] = $e['xchan_guid']; $ret['id_sig'] = self::sign($e['xchan_guid'], $e['channel_prvkey']); + $ret['did'] = Channel::getDidResolver($e); $primary = new Primary([ 'address' => $e['xchan_addr'], diff --git a/src/Update/_1278.php b/src/Update/_1278.php new file mode 100644 index 000000000..4fa569398 --- /dev/null +++ b/src/Update/_1278.php @@ -0,0 +1,48 @@ + Date: Wed, 17 Apr 2024 12:34:14 +1000 Subject: [PATCH 3/7] spurious activities in feeds --- include/feedutils.php | 2 +- include/items.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/feedutils.php b/include/feedutils.php index e05c52ac2..48888a34f 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -148,7 +148,7 @@ function get_feed_for($channel, $observer_hash, $params) 'top' => $params['top'], 'cat' => $params['cat'], 'compat' => $params['compat'], - 'noadd' => true + 'noadd' => $params['noadd'] ], $channel, $observer_hash, diff --git a/include/items.php b/include/items.php index 847fdd1cf..f860eddbc 100644 --- a/include/items.php +++ b/include/items.php @@ -4253,7 +4253,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C } if (isset($arr['noadd']) && $arr['noadd']) { - $item_normal .= " and not verb in ('Add', 'Remove') "; + $sql_options .= " and not verb in ('Add', 'Remove') "; } if (isset($arr['star']) && $arr['star']) { From b6ff1b7621a8d0f53b3a78463bc80e887988ec6a Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 17 Apr 2024 12:52:11 +1000 Subject: [PATCH 4/7] reverse statement order --- include/items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/items.php b/include/items.php index f860eddbc..cc1b3f5b8 100644 --- a/include/items.php +++ b/include/items.php @@ -4249,11 +4249,11 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C } if (! (isset($arr['include_follow']) && intval($arr['include_follow']))) { - $item_normal .= " and not verb in ( 'Follow' , 'Ignore' ) "; + $item_normal .= " and verb not in ( 'Follow' , 'Ignore' ) "; } if (isset($arr['noadd']) && $arr['noadd']) { - $sql_options .= " and not verb in ('Add', 'Remove') "; + $sql_options .= " and verb not in ('Add', 'Remove') "; } if (isset($arr['star']) && $arr['star']) { From 7597703826dcf280145123cec2bcaed1dae3ce90 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 17 Apr 2024 13:03:53 +1000 Subject: [PATCH 5/7] use item_restrict --- include/items.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index cc1b3f5b8..fa9e4d525 100644 --- a/include/items.php +++ b/include/items.php @@ -4252,9 +4252,6 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C $item_normal .= " and verb not in ( 'Follow' , 'Ignore' ) "; } - if (isset($arr['noadd']) && $arr['noadd']) { - $sql_options .= " and verb not in ('Add', 'Remove') "; - } if (isset($arr['star']) && $arr['star']) { $sql_options .= " and item_starred = 1 "; @@ -4422,6 +4419,11 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C $item_restrict = ''; } + if (isset($arr['noadd']) && $arr['noadd']) { + $item_restrict .= " and verb not in ('Add', 'Remove') "; + } + + if (((isset($arr['compat']) && $arr['compat']) || ((isset($arr['nouveau']) && $arr['nouveau']) && ($client_mode & CLIENT_MODE_LOAD))) && $channel) { // "New Item View" - show all items unthreaded in reverse created date order From de00a8a9067a14cab4a070c6ed2e4665bd50c01f Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 16 Apr 2024 21:28:52 -0700 Subject: [PATCH 6/7] version --- version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.php b/version.php index 0997078fc..16692fe8f 100644 --- a/version.php +++ b/version.php @@ -1,2 +1,2 @@ Date: Wed, 17 Apr 2024 19:15:41 +1000 Subject: [PATCH 7/7] return correct type --- src/Module/Apresolver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Module/Apresolver.php b/src/Module/Apresolver.php index f25427739..3bc659573 100644 --- a/src/Module/Apresolver.php +++ b/src/Module/Apresolver.php @@ -86,6 +86,7 @@ class Apresolver extends Controller if ($this->module) { return $this->module->get(); } + return ''; } protected function mapObject($path, $channel)