From 29174615a7ac810fe09afa6c91a3d0a15ff9c568 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 31 Mar 2023 17:05:14 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Digest=E3=83=98=E3=83=83=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=81=AB=E3=82=A2=E3=83=AB=E3=82=B4=E3=83=AA=E3=82=BA?= =?UTF-8?q?=E3=83=A0=E3=82=92=E8=A8=98=E8=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/dev/usbharu/hideout/plugins/ActivityPub.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/ActivityPub.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/ActivityPub.kt index 03f40bff..46e61062 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/ActivityPub.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/ActivityPub.kt @@ -59,10 +59,11 @@ val httpSignaturePlugin = createClientPlugin("HttpSign", ::HttpSignaturePluginCo println(request.bodyType) println(request.bodyType?.type) if (request.bodyType?.type == String::class) { + println(body as String) println("Digest !!") val digest = hex(UserAuthService.sha256.digest((body as String).toByteArray(Charsets.UTF_8))) - request.headers.append("Digest", digest) + request.headers.append("Digest", "sha-256="+digest) } if (request.headers.contains("Signature")) {