mirror of
https://github.com/friendica/friendica
synced 2024-11-19 17:03:41 +00:00
Ensure nodeinfo-provided protocols are strings in Model\GServer::parseNodeinfo2
- https://github.com/friendica/friendica/issues/10168#issuecomment-828281803
This commit is contained in:
parent
8bdfdc7d52
commit
302070875c
1 changed files with 4 additions and 1 deletions
|
@ -802,6 +802,7 @@ class GServer
|
|||
/**
|
||||
* Parses Nodeinfo 2
|
||||
*
|
||||
* @see https://git.feneas.org/jaywink/nodeinfo2
|
||||
* @param string $nodeinfo_url address of the nodeinfo path
|
||||
* @return array Server data
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
|
@ -850,8 +851,10 @@ class GServer
|
|||
if (!empty($nodeinfo['protocols'])) {
|
||||
$protocols = [];
|
||||
foreach ($nodeinfo['protocols'] as $protocol) {
|
||||
if (is_string($protocol)) {
|
||||
$protocols[$protocol] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($protocols['dfrn'])) {
|
||||
$server['network'] = Protocol::DFRN;
|
||||
|
|
Loading…
Reference in a new issue