mirror of
https://github.com/openvk/openvk
synced 2024-11-15 11:39:13 +03:00
ActivityPub: Fix PublicKey Output
This commit is contained in:
parent
0c2a5b5eb7
commit
d069aab0dd
1 changed files with 2 additions and 4 deletions
|
@ -8,6 +8,7 @@ use Latte\Engine as TemplatingEngine;
|
||||||
use openvk\Web\Models\Entities\IP;
|
use openvk\Web\Models\Entities\IP;
|
||||||
use openvk\Web\Themes\Themepacks;
|
use openvk\Web\Themes\Themepacks;
|
||||||
use openvk\Web\Models\Repositories\{IPs, Users, APITokens, Tickets};
|
use openvk\Web\Models\Repositories\{IPs, Users, APITokens, Tickets};
|
||||||
|
use Nette\InvalidStateException as ISE;
|
||||||
|
|
||||||
abstract class OpenVKPresenter extends SimplePresenter
|
abstract class OpenVKPresenter extends SimplePresenter
|
||||||
{
|
{
|
||||||
|
@ -315,9 +316,6 @@ abstract class OpenVKPresenter extends SimplePresenter
|
||||||
if(!file_exists(OPENVK_ROOT . ($private ? "/data/private.pem" : "/data/public.pem")))
|
if(!file_exists(OPENVK_ROOT . ($private ? "/data/private.pem" : "/data/public.pem")))
|
||||||
throw new ISE("private.pem and public.pem files are missing. Please, check 10th step for a installation guide in README file.");
|
throw new ISE("private.pem and public.pem files are missing. Please, check 10th step for a installation guide in README file.");
|
||||||
|
|
||||||
$key = file(OPENVK_ROOT . ($private ? "/data/private.pem" : "/data/public.pem"));
|
return file(OPENVK_ROOT . ($private ? "/data/private.pem" : "/data/public.pem"));
|
||||||
$key[0] = null;
|
|
||||||
$key[count($key)-1] = null;
|
|
||||||
return "-----BEGIN PUBLIC KEY-----\n" . str_replace("\n", '', implode('', $key)) . "\n-----END PUBLIC KEY-----\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue