mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
remove acct: scheme from webfinger address before use
This commit is contained in:
parent
66adb75da2
commit
c8847068b2
1 changed files with 4 additions and 2 deletions
|
@ -2447,7 +2447,9 @@ class Activity
|
|||
$username = escape_tags($actorRecord['preferredUsername']);
|
||||
|
||||
$h = parse_url($url);
|
||||
$webfingerAddress = escape_tags($actorRecord['webfinger'] ?? $username . '@' . $h['host']);
|
||||
$webfingerAddress = escape_tags($actorRecord['webfinger']
|
||||
? str_replace('acct:', '', $actorRecord['webfinger'])
|
||||
: $username . '@' . $h['host']);
|
||||
|
||||
$icon = self::getIcon($actorRecord['icon']);
|
||||
|
||||
|
@ -2835,7 +2837,7 @@ class Activity
|
|||
|
||||
$prefix = $gateway . '/.well-known/apgateway/' . $portableId;
|
||||
$machineName = $actorRecord['preferredUsername'] ?? 'unknown';
|
||||
$webfingerAddress = $actorRecord['webfinger'] ?? $machineName . '@' . $parsedUrl['host'];
|
||||
$webfingerAddress = $actorRecord['webfinger'] ? str_replace('acct:', '', $actorRecord['webfinger']) : $machineName . '@' . $parsedUrl['host'];
|
||||
|
||||
$existing = q("select * from hubloc where hubloc_hash = '%s' and hubloc_url = '%s' and hubloc_network = '%s'",
|
||||
dbesc($portableId),
|
||||
|
|
Loading…
Reference in a new issue