trim webfinger request
This commit is contained in:
parent
4418cb4349
commit
932397b47b
2 changed files with 3 additions and 1 deletions
2
boot.php
2
boot.php
|
@ -1685,8 +1685,10 @@ function fetch_lrdd_template($host) {
|
||||||
$url1 = 'https://' . $host . '/.well-known/host-meta' ;
|
$url1 = 'https://' . $host . '/.well-known/host-meta' ;
|
||||||
$url2 = 'http://' . $host . '/.well-known/host-meta' ;
|
$url2 = 'http://' . $host . '/.well-known/host-meta' ;
|
||||||
$links = fetch_xrd_links($url1);
|
$links = fetch_xrd_links($url1);
|
||||||
|
logger('fetch_lrdd_template from: ' . $url1);
|
||||||
logger('template (https): ' . print_r($links,true));
|
logger('template (https): ' . print_r($links,true));
|
||||||
if(! count($links)) {
|
if(! count($links)) {
|
||||||
|
logger('fetch_lrdd_template from: ' . $url2);
|
||||||
$links = fetch_xrd_links($url2);
|
$links = fetch_xrd_links($url2);
|
||||||
logger('template (http): ' . print_r($links,true));
|
logger('template (http): ' . print_r($links,true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ function webfinger_content(&$a) {
|
||||||
$o .= '<br /><br />';
|
$o .= '<br /><br />';
|
||||||
|
|
||||||
if(x($_GET,'addr')) {
|
if(x($_GET,'addr')) {
|
||||||
$addr = $_GET['addr'];
|
$addr = trim($_GET['addr']);
|
||||||
if(strpos($addr,'@' !== false))
|
if(strpos($addr,'@' !== false))
|
||||||
$res = webfinger($addr);
|
$res = webfinger($addr);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue