Skip to content

Commit

Permalink
hotfixes: fix with weak pgp key algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
fonstack committed Jan 18, 2024
1 parent 6db5a4d commit 0ce94ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/web/src/hooks/subgraph/vaults/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ const fixVaultsData = (vaults: IVault[]) => {
if (morphoVault && morphoVault.descriptionHash === "QmeLFD6czyZq7GBsqy6Ukdep5oGzr2RfxDvDhdwJ8TyCHU")
morphoVault.descriptionHash = "QmTMTK6NpVgqjr664VTS44opgU1FpvkL2gcvyVYvGu85Fk";

// Override description hash for AlephZero vault
const alephVault = newVaults.find((vault) => vault.id.toLowerCase() === "0x0d88a9ece90994ecb3ba704730819d71c139f60f");
if (alephVault && alephVault.descriptionHash === "QmY3vnuj9i1ephwYSjHzJ9bUx7t18hhQ1mWrUiXwEA32c3")
alephVault.descriptionHash = "Qmb8gadmtnvPHW7Xu3dnBNxLPYyS3371TATQBj1eFJr9tj";

return newVaults;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export async function encryptWithKeys(publicKeyOrKeys: string | string[], dataTo
message: await createMessage({ text: dataToEncrypt }),
encryptionKeys,
sessionKey,
config: {
rejectPublicKeyAlgorithms: new Set(),
},
});
return { encryptedData, sessionKey };
}
Expand All @@ -48,6 +51,9 @@ export async function encryptWithHatsKey(dataToEncrypt: string): Promise<string>
const encryptedData = await encrypt({
message: await createMessage({ text: dataToEncrypt }),
encryptionKeys: hatsPublicKey,
config: {
rejectPublicKeyAlgorithms: new Set(),
},
});

return encryptedData as string;
Expand Down

0 comments on commit 0ce94ed

Please sign in to comment.