gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 02/02: allow any string as forgettable field salt


From: gnunet
Subject: [taler-wallet-core] 02/02: allow any string as forgettable field salt
Date: Wed, 16 Jun 2021 12:04:45 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

commit b4b0d3ff6140552b1b75c8f49e539cade3422f1c
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Jun 16 12:03:31 2021 +0200

    allow any string as forgettable field salt
---
 packages/taler-wallet-core/src/operations/pay.ts     | 1 +
 packages/taler-wallet-core/src/util/contractTerms.ts | 9 ---------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/pay.ts 
b/packages/taler-wallet-core/src/operations/pay.ts
index 4425262b..c62ad0f2 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 c2e75955..e5280244 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)));
   }
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]