mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Remove $_SERVER superglobal dependency from Profile::addVisitorCookieForHTTPSigner
This commit is contained in:
parent
6d009a3e0f
commit
e01040a2e8
2 changed files with 6 additions and 4 deletions
|
@ -813,12 +813,14 @@ class Profile
|
|||
|
||||
/**
|
||||
* Set the visitor cookies (see remote_user()) for signed HTTP requests
|
||||
(
|
||||
*
|
||||
* @param array $server The content of the $_SERVER superglobal
|
||||
* @return array Visitor contact array
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
public static function addVisitorCookieForHTTPSigner(): array
|
||||
public static function addVisitorCookieForHTTPSigner(array $server): array
|
||||
{
|
||||
$requester = HTTPSignature::getSigner('', $_SERVER);
|
||||
$requester = HTTPSignature::getSigner('', $server);
|
||||
if (empty($requester)) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class Photo extends BaseApi
|
|||
throw new NotModifiedException();
|
||||
}
|
||||
|
||||
Profile::addVisitorCookieForHTTPSigner();
|
||||
Profile::addVisitorCookieForHTTPSigner($this->server);
|
||||
|
||||
$customsize = 0;
|
||||
$square_resize = true;
|
||||
|
|
Loading…
Reference in a new issue