mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-17 03:01:35 +02:00
fixup: add caching for actor and application public keys
Why does go lint scream at be but go build doesn't >:(
This commit is contained in:
parent
d3e087d139
commit
f875b733f3
1 changed files with 2 additions and 2 deletions
|
@ -111,7 +111,7 @@ func storePublicKey(ctx *gitea_context.APIContext, person *ap.Person, pubKeyByte
|
|||
return nil
|
||||
}
|
||||
|
||||
func getPublicKeyFromResponse(ctx *gitea_context.APIContext, b []byte, keyID *url.URL) (person *ap.Person, pubKeyBytes []byte, p crypto.PublicKey, err error) {
|
||||
func getPublicKeyFromResponse(b []byte, keyID *url.URL) (person *ap.Person, pubKeyBytes []byte, p crypto.PublicKey, err error) {
|
||||
person = ap.PersonNew(ap.IRI(keyID.String()))
|
||||
err = person.UnmarshalJSON(b)
|
||||
if err != nil {
|
||||
|
@ -207,7 +207,7 @@ func verifyHTTPSignatures(ctx *gitea_context.APIContext) (authenticated bool, er
|
|||
return false, err
|
||||
}
|
||||
|
||||
person, pubKeyBytes, pubKey, err := getPublicKeyFromResponse(ctx, b, idIRI)
|
||||
person, pubKeyBytes, pubKey, err := getPublicKeyFromResponse(b, idIRI)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue