0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 12:23:42 +01:00

Try splitting the right thing

This commit is contained in:
Neil Alexander 2022-04-26 09:34:45 +01:00
parent ce4d0a9789
commit 33d13bcb70
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -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
}