mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:00:16 +00:00
Issue 14175: Fix problems with upper case host names
This commit is contained in:
parent
c432924d27
commit
df0440ea97
2 changed files with 5 additions and 9 deletions
|
@ -84,13 +84,9 @@ class APContact
|
||||||
|
|
||||||
if (!empty($link['template']) && ($link['rel'] == ActivityNamespace::OSTATUSSUB)) {
|
if (!empty($link['template']) && ($link['rel'] == ActivityNamespace::OSTATUSSUB)) {
|
||||||
$data['subscribe'] = $link['template'];
|
$data['subscribe'] = $link['template'];
|
||||||
}
|
} elseif (!empty($link['href']) && !empty($link['type']) && ($link['rel'] == 'self') && ($link['type'] == 'application/activity+json')) {
|
||||||
|
|
||||||
if (!empty($link['href']) && !empty($link['type']) && ($link['rel'] == 'self') && ($link['type'] == 'application/activity+json')) {
|
|
||||||
$data['url'] = $link['href'];
|
$data['url'] = $link['href'];
|
||||||
}
|
} elseif (!empty($link['href']) && !empty($link['type']) && ($link['rel'] == ActivityNamespace::WEBFINGERPROFILE) && ($link['type'] == 'text/html')) {
|
||||||
|
|
||||||
if (!empty($link['href']) && !empty($link['type']) && ($link['rel'] == ActivityNamespace::WEBFINGERPROFILE) && ($link['type'] == 'text/html')) {
|
|
||||||
$data['alias'] = $link['href'];
|
$data['alias'] = $link['href'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ class HTTPSignature
|
||||||
$content = json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
$content = json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
// Header data that is about to be signed.
|
// Header data that is about to be signed.
|
||||||
$host = parse_url($target, PHP_URL_HOST);
|
$host = strtolower(parse_url($target, PHP_URL_HOST));
|
||||||
$path = parse_url($target, PHP_URL_PATH);
|
$path = parse_url($target, PHP_URL_PATH);
|
||||||
$digest = 'SHA-256=' . base64_encode(hash('sha256', $content, true));
|
$digest = 'SHA-256=' . base64_encode(hash('sha256', $content, true));
|
||||||
$content_length = strlen($content);
|
$content_length = strlen($content);
|
||||||
|
@ -502,7 +502,7 @@ class HTTPSignature
|
||||||
|
|
||||||
if (!empty($owner['uprvkey'])) {
|
if (!empty($owner['uprvkey'])) {
|
||||||
// Header data that is about to be signed.
|
// Header data that is about to be signed.
|
||||||
$host = parse_url($request, PHP_URL_HOST);
|
$host = strtolower(parse_url($request, PHP_URL_HOST));
|
||||||
$path = parse_url($request, PHP_URL_PATH);
|
$path = parse_url($request, PHP_URL_PATH);
|
||||||
$date = DateTimeFormat::utcNow(DateTimeFormat::HTTP);
|
$date = DateTimeFormat::utcNow(DateTimeFormat::HTTP);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue