From 33d13bcb7008b352f91cbccceeee42b6e2d64270 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 26 Apr 2022 09:34:45 +0100 Subject: [PATCH] Try splitting the right thing --- keyserver/internal/cross_signing.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyserver/internal/cross_signing.go b/keyserver/internal/cross_signing.go index 869e6c9ec..3e0bbf55c 100644 --- a/keyserver/internal/cross_signing.go +++ b/keyserver/internal/cross_signing.go @@ -364,7 +364,7 @@ func (a *KeyInternalAPI) processSelfSignatures( case *gomatrixserverlib.CrossSigningKey: for keyID := range sig.Keys { split := strings.SplitN(string(keyID), ":", 2) - if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == keyID { + if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == targetKeyID { targetKeyID = keyID // contains the ed25519: or other scheme break } @@ -382,7 +382,7 @@ func (a *KeyInternalAPI) processSelfSignatures( case *gomatrixserverlib.DeviceKeys: for keyID := range sig.Keys { split := strings.SplitN(string(keyID), ":", 2) - if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == keyID { + if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == targetKeyID { targetKeyID = keyID // contains the ed25519: or other scheme break }