This commit is contained in:
Felicio Mununga 2024-03-14 18:24:31 +09:00
parent afae857b2b
commit 50580a1d91
No known key found for this signature in database
GPG Key ID: C4736C7AEBA55BE5
1 changed files with 11 additions and 2 deletions

View File

@ -307,12 +307,21 @@ class RequestClient {
// eslint-disable-next-line no-empty
}
const decodedMetadata =
ApplicationMetadataMessage.fromBinary(messageToDecode)
let decodedMetadata
try {
decodedMetadata = ApplicationMetadataMessage.fromBinary(messageToDecode)
} catch {
return
}
if (!decodedMetadata.payload) {
return
}
if (!decodedMetadata.signature.length) {
return
}
const signerPublicKeyBytes = recoverPublicKey(
decodedMetadata.signature,
decodedMetadata.payload