allow any string as forgettable field salt

This commit is contained in:
Florian Dold 2021-06-16 12:03:31 +02:00
parent 97091fd45f
commit b4b0d3ff61
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 1 additions and 9 deletions

View File

@ -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",

View File

@ -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)));
}
}