do not add provider without salt
This commit is contained in:
parent
78b5518185
commit
8e9bca396e
@ -301,6 +301,13 @@ async function getProviderInfo(
|
||||
}
|
||||
try {
|
||||
const jsonResp: EscrowConfigurationResponse = await resp.json();
|
||||
if (!jsonResp.provider_salt) {
|
||||
return {
|
||||
status: "error",
|
||||
code: TalerErrorCode.ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED,
|
||||
hint: "provider did not have provider salt",
|
||||
}
|
||||
}
|
||||
return {
|
||||
status: "ok",
|
||||
http_status: 200,
|
||||
@ -656,12 +663,12 @@ async function uploadSecret(
|
||||
let policyExpiration: TalerProtocolTimestamp = { t_s: 0 };
|
||||
try {
|
||||
policyVersion = Number(resp.headers.get("Anastasis-Version") ?? "0");
|
||||
} catch (e) {}
|
||||
} catch (e) { }
|
||||
try {
|
||||
policyExpiration = {
|
||||
t_s: Number(resp.headers.get("Anastasis-Policy-Expiration") ?? "0"),
|
||||
};
|
||||
} catch (e) {}
|
||||
} catch (e) { }
|
||||
successDetails[prov.provider_url] = {
|
||||
policy_version: policyVersion,
|
||||
policy_expiration: policyExpiration,
|
||||
|
Loading…
Reference in New Issue
Block a user