rodzic
df7836d9fa
commit
91319bda5d
|
@ -1464,6 +1464,13 @@ HTML;
|
|||
$signature = base64_decode( $signatureParts["signature"] );
|
||||
$algorithm = $signatureParts["algorithm"];
|
||||
|
||||
// There might be many different signing algorithms
|
||||
// TODO: Find a way to transform these automatically
|
||||
// See https://github.com/superseriousbusiness/gotosocial/issues/1186#issuecomment-1976166659 and https://github.com/snarfed/bridgy-fed/issues/430 for hs2019
|
||||
if ( "hs2019" == $algorithm ) {
|
||||
$algorithm = "sha256";
|
||||
}
|
||||
|
||||
// Finally! Calculate whether the signature is valid
|
||||
// Returns 1 if verified, 0 if not, false or -1 if an error occurred
|
||||
$verified = openssl_verify(
|
||||
|
|
Ładowanie…
Reference in New Issue