diff options
author | Florian Dold <florian@dold.me> | 2021-06-16 12:03:31 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-16 12:04:06 +0200 |
commit | b4b0d3ff6140552b1b75c8f49e539cade3422f1c (patch) | |
tree | c4ade41fa27c02f52711e2e5f2317d479cab3bb9 /packages/taler-wallet-core/src | |
parent | 97091fd45f3fa7f6ea7291fab961840a07a52991 (diff) | |
download | wallet-core-b4b0d3ff6140552b1b75c8f49e539cade3422f1c.tar.xz |
allow any string as forgettable field salt
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 1 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/contractTerms.ts | 9 |
2 files changed, 1 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 4425262b8..c62ad0f25 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -721,6 +721,7 @@ async function processDownloadProposalImpl( ); if (!isWellFormed) { + logger.trace(`malformed contract terms: ${j2s(proposalResp.contract_terms)}`); const err = makeErrorDetails( TalerErrorCode.WALLET_CONTRACT_TERMS_MALFORMED, "validation for well-formedness failed", diff --git a/packages/taler-wallet-core/src/util/contractTerms.ts b/packages/taler-wallet-core/src/util/contractTerms.ts index c2e75955b..e52802441 100644 --- a/packages/taler-wallet-core/src/util/contractTerms.ts +++ b/packages/taler-wallet-core/src/util/contractTerms.ts @@ -165,14 +165,6 @@ export namespace ContractTermsUtil { if (typeof fv !== "string") { return false; } - try { - const decFv = decodeCrock(fv); - if (decFv.length != 32) { - return false; - } - } catch (e) { - return false; - } } } else if (k === "$forgotten") { const fgo = anyJson.$forgotten; @@ -230,7 +222,6 @@ export namespace ContractTermsUtil { export function hashContractTerms(contractTerms: unknown): string { const cleaned = scrub(contractTerms); const canon = canonicalJson(cleaned) + "\0"; - console.warn(`canon '${canon}'`) return encodeCrock(hash(stringToBytes(canon))); } } |