From be7bd590eb76d03c52f3d07a29e0e70e5a7114f3 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 3 Dec 2023 10:27:46 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20HTTP=20Signature=E3=81=AE=E3=83=98?= =?UTF-8?q?=E3=83=83=E3=83=80=E3=83=BC=E5=8F=96=E5=BE=97=E6=99=82=E3=81=AB?= =?UTF-8?q?=E5=A4=A7=E6=96=87=E5=AD=97=E5=B0=8F=E6=96=87=E5=AD=97=E3=81=AE?= =?UTF-8?q?=E5=B7=AE=E3=82=92=E7=84=A1=E8=A6=96=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activitypub/interfaces/api/inbox/InboxControllerImpl.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/api/inbox/InboxControllerImpl.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/api/inbox/InboxControllerImpl.kt index d87d045a..9fb8d101 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/api/inbox/InboxControllerImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/api/inbox/InboxControllerImpl.kt @@ -23,7 +23,9 @@ class InboxControllerImpl(private val apService: APService) : InboxController { val request = (requireNotNull(RequestContextHolder.getRequestAttributes()) as ServletRequestAttributes).request val headersList = request.headerNames?.toList().orEmpty() - if (headersList.contains("Signature").not()) { + LOGGER.trace("Inbox Headers {}", headersList) + + if (headersList.map { it.lowercase() }.contains("signature").not()) { return ResponseEntity.status(HttpStatus.UNAUTHORIZED) .header( WWW_AUTHENTICATE,