Decorate key ID properly

This commit is contained in:
Neil Alexander 2021-08-06 12:48:00 +01:00
parent e83f55063d
commit 98d5aac9c9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -448,6 +448,11 @@ func (a *KeyInternalAPI) processOtherSignatures(
return fmt.Errorf("there are no signatures from uploading user %q", userID)
}
// If the key ID is naked then we should add a scheme to it.
if !strings.HasPrefix(string(targetKeyID), "ed25519:") {
targetKeyID = "ed25519:" + targetKeyID
}
for originKeyID, originSig := range sigs {
if err := a.DB.StoreCrossSigningSigsForTarget(
ctx, userID, originKeyID, targetUserID, targetKeyID, originSig,