Compare commits
2 Commits
v2.0.0beta
...
master
Author | SHA1 | Date | |
---|---|---|---|
8edd975b11
|
|||
504c21a519
|
@@ -27,7 +27,7 @@ PHP modules
|
||||
The following software packages are *required* for this software to
|
||||
run correctly.
|
||||
|
||||
- PHP 7.3+
|
||||
- PHP 7.4+
|
||||
- MariaDB 10.3+
|
||||
- Web server Apache, lighttpd and nginx will all work. CGI mode is
|
||||
recommended and also some variant of 'suexec' (or a
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"type": "project",
|
||||
"license": "AGPL-3.0-only",
|
||||
"require": {
|
||||
"php": "^7.3.0",
|
||||
"php": "^7.4.0",
|
||||
"ext-bcmath": "*",
|
||||
"ext-ctype": "*",
|
||||
"ext-curl": "*",
|
||||
|
6
composer.lock
generated
6
composer.lock
generated
@@ -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": "f7c49732f6b0c37b67e783fc0d5535d2",
|
||||
"content-hash": "ffd21e90500734effbec6791af16994c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy/binary-driver",
|
||||
@@ -6869,7 +6869,7 @@
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^7.3.0",
|
||||
"php": "^7.4.0",
|
||||
"ext-bcmath": "*",
|
||||
"ext-ctype": "*",
|
||||
"ext-curl": "*",
|
||||
@@ -6885,7 +6885,7 @@
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3.0"
|
||||
"php": "7.4.0"
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ define('GNUSOCIAL_ENGINE', 'GNU social');
|
||||
define('GNUSOCIAL_ENGINE_URL', 'https://gnusocial.rocks/');
|
||||
define('GNUSOCIAL_ENGINE_REPO_URL', 'https://notabug.org/diogo/gnu-social/'); // Change to https://git.gnu.io/gnu/gnu-social
|
||||
|
||||
define('GNUSOCIAL_BASE_VERSION', '2.0.0');
|
||||
define('GNUSOCIAL_BASE_VERSION', '2.0.1');
|
||||
define('GNUSOCIAL_LIFECYCLE', 'beta0'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
|
||||
|
||||
define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);
|
||||
|
@@ -112,8 +112,8 @@ abstract class Installer
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
|
||||
$this->warning('Require PHP version 7.3.0 or greater.');
|
||||
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
|
||||
$this->warning('Require PHP version 7.4.0 or greater.');
|
||||
$pass = false;
|
||||
}
|
||||
|
||||
|
@@ -27,16 +27,6 @@
|
||||
|
||||
defined('GNUSOCIAL') || die;
|
||||
|
||||
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
|
||||
function password_algos(): array
|
||||
{
|
||||
$algos = [PASSWORD_BCRYPT];
|
||||
defined('PASSWORD_ARGON2I') && $algos[] = PASSWORD_ARGON2I;
|
||||
defined('PASSWORD_ARGON2ID') && $algos[] = PASSWORD_ARGON2ID;
|
||||
return $algos;
|
||||
}
|
||||
}
|
||||
|
||||
class AuthCryptModule extends AuthenticationModule
|
||||
{
|
||||
const MODULE_VERSION = '2.0.0';
|
||||
|
@@ -167,12 +167,19 @@ class Activitypub_notice
|
||||
$act->time = time();
|
||||
$act->actor = $actor_profile->asActivityObject();
|
||||
$act->context = new ActivityContext();
|
||||
$options = ['source' => 'ActivityPub',
|
||||
|
||||
[$note_type, $note_scope] = self::getNotePolicy($object, $actor_profile);
|
||||
|
||||
$options = [
|
||||
'source' => 'ActivityPub',
|
||||
'uri' => $id,
|
||||
'url' => $url,
|
||||
'is_local' => self::getNotePolicyType($object, $actor_profile)];
|
||||
'is_local' => $note_type,
|
||||
'scope' => $note_scope,
|
||||
];
|
||||
|
||||
if ($directMessage) {
|
||||
$options['is_local'] = Notice::GATEWAY;
|
||||
$options['scope'] = Notice::MESSAGE_SCOPE;
|
||||
}
|
||||
|
||||
@@ -364,20 +371,17 @@ class Activitypub_notice
|
||||
*
|
||||
* @param array $note received Note
|
||||
* @param Profile $actor_profile Note author
|
||||
* @return int Notice policy type
|
||||
* @return [int NoteType, ?int NoteScope] Notice policy type
|
||||
* @author Bruno Casteleiro <brunoccast@fc.up.pt>
|
||||
*/
|
||||
public static function getNotePolicyType(array $note, Profile $actor_profile): int
|
||||
public static function getNotePolicy(array $note, Profile $actor_profile): array
|
||||
{
|
||||
$addressee = array_unique(array_merge($note['to'], $note['cc']));
|
||||
if (in_array('https://www.w3.org/ns/activitystreams#Public', $addressee)) {
|
||||
return $actor_profile->isLocal() ? Notice::LOCAL_PUBLIC : Notice::REMOTE;
|
||||
} else {
|
||||
// either an unlisted or followers-only note, we'll handle
|
||||
// both as a GATEWAY notice since this type is not visible
|
||||
// from the public timelines, hence partially enough while
|
||||
// we don't have subscription_policy working.
|
||||
return Notice::GATEWAY;
|
||||
if (in_array('https://www.w3.org/ns/activitystreams#Public', $note['to'])) { // Public: Visible for all, shown in public feeds
|
||||
return [$actor_profile->isLocal() ? Notice::LOCAL_PUBLIC : Notice::REMOTE, null];
|
||||
} elseif (in_array('https://www.w3.org/ns/activitystreams#Public', $note['cc'])) { // Unlisted: Visible for all but not shown in public feeds
|
||||
return [$actor_profile->isLocal() ? Notice::LOCAL_NONPUBLIC : Notice::GATEWAY, null];
|
||||
} else { // Either Followers-only or Direct (but this function isn't used for direct)
|
||||
return [$actor_profile->isLocal() ? Notice::LOCAL_NONPUBLIC : Notice::REMOTE, Notice::FOLLOWER_SCOPE];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
vendor/composer/InstalledVersions.php
vendored
4
vendor/composer/InstalledVersions.php
vendored
@@ -30,7 +30,7 @@ class InstalledVersions
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'cd3a9ec6a9a22fb3b46a293be7223f86b0006f24',
|
||||
'reference' => '7d8988d50ce24639daaf48608ce14d91291a519d',
|
||||
'name' => 'gnusocial/gnusocial',
|
||||
),
|
||||
'versions' =>
|
||||
@@ -114,7 +114,7 @@ class InstalledVersions
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'cd3a9ec6a9a22fb3b46a293be7223f86b0006f24',
|
||||
'reference' => '7d8988d50ce24639daaf48608ce14d91291a519d',
|
||||
),
|
||||
'guzzlehttp/psr7' =>
|
||||
array (
|
||||
|
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@@ -6,7 +6,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'cd3a9ec6a9a22fb3b46a293be7223f86b0006f24',
|
||||
'reference' => '7d8988d50ce24639daaf48608ce14d91291a519d',
|
||||
'name' => 'gnusocial/gnusocial',
|
||||
),
|
||||
'versions' =>
|
||||
@@ -90,7 +90,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'cd3a9ec6a9a22fb3b46a293be7223f86b0006f24',
|
||||
'reference' => '7d8988d50ce24639daaf48608ce14d91291a519d',
|
||||
),
|
||||
'guzzlehttp/psr7' =>
|
||||
array (
|
||||
|
4
vendor/composer/platform_check.php
vendored
4
vendor/composer/platform_check.php
vendored
@@ -4,8 +4,8 @@
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70300)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
|
||||
if (!(PHP_VERSION_ID >= 70400)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
|
Reference in New Issue
Block a user