mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-23 22:56:08 +09:00
fix: relay signature handling
A change sometime ago moved to setting some signature fields in the incoming object to undefined as opposed to deleting them. The trouble is that downstream code checks against existence, not undefinedness and rejects the message. Resolves: #9665
This commit is contained in:
parent
35cacf704e
commit
88295aad8f
@ -70,13 +70,13 @@ export class LdSignature {
|
||||
...options,
|
||||
"@context": "https://w3id.org/identity/v1",
|
||||
};
|
||||
transformedOptions["type"] = undefined;
|
||||
transformedOptions["id"] = undefined;
|
||||
transformedOptions["signatureValue"] = undefined;
|
||||
delete transformedOptions["type"];
|
||||
delete transformedOptions["id"];
|
||||
delete transformedOptions["signatureValue"];
|
||||
const canonizedOptions = await this.normalize(transformedOptions);
|
||||
const optionsHash = this.sha256(canonizedOptions);
|
||||
const transformedData = { ...data };
|
||||
transformedData["signature"] = undefined;
|
||||
delete transformedData["signature"];
|
||||
const cannonidedData = await this.normalize(transformedData);
|
||||
if (this.debug) console.debug(`cannonidedData: ${cannonidedData}`);
|
||||
const documentHash = this.sha256(cannonidedData);
|
||||
|
Loading…
Reference in New Issue
Block a user