Fix federation with pixelfed!

This commit is contained in:
Matthias Pfefferle 2023-05-25 14:03:30 +02:00
parent 750d071c8d
commit 221c577826

View file

@ -353,6 +353,12 @@ class Signature {
if ( 'content-length' === $header ) { if ( 'content-length' === $header ) {
$signed_data .= $header . ': ' . $headers['content_length'][0] . "\n"; $signed_data .= $header . ': ' . $headers['content_length'][0] . "\n";
} }
if ( 'user-agent' === $header ) {
$signed_data .= $header . ': ' . $headers['user_agent'][0] . "\n";
}
if ( 'accept' === $header ) {
$signed_data .= $header . ': ' . $headers['accept'][0] . "\n";
}
if ( 'date' === $header ) { if ( 'date' === $header ) {
// allow a bit of leeway for misconfigured clocks. // allow a bit of leeway for misconfigured clocks.
$d = new DateTime( $headers[ $header ][0] ); $d = new DateTime( $headers[ $header ][0] );