From 221c5778264457e050adc5d2208dab2d6ae85db5 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 25 May 2023 14:03:30 +0200 Subject: [PATCH] Fix federation with pixelfed! --- includes/class-signature.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/class-signature.php b/includes/class-signature.php index 0ef8bcb..5ab47cc 100644 --- a/includes/class-signature.php +++ b/includes/class-signature.php @@ -353,6 +353,12 @@ class Signature { if ( 'content-length' === $header ) { $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 ) { // allow a bit of leeway for misconfigured clocks. $d = new DateTime( $headers[ $header ][0] );