From 2e1fcc22c34f60ba98fb7db4f8807803852b6baa Mon Sep 17 00:00:00 2001 From: Hanjun Kim Date: Sat, 23 Nov 2024 21:10:36 +0900 Subject: [PATCH] fix: handle range proofs in presentation by checking attr_name and p_type, it is now possible to specify more than one predicate on a single attribute this enables range proof for an attribute --- .../protocols/present_proof/v2_0/formats/indy/handler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acapy_agent/protocols/present_proof/v2_0/formats/indy/handler.py b/acapy_agent/protocols/present_proof/v2_0/formats/indy/handler.py index bac3933919..560633a05d 100644 --- a/acapy_agent/protocols/present_proof/v2_0/formats/indy/handler.py +++ b/acapy_agent/protocols/present_proof/v2_0/formats/indy/handler.py @@ -287,12 +287,12 @@ def _check_proof_vs_proposal(): "primary_proof" ]["ge_proofs"]: proof_pred_spec = ge_proof["predicate"] - if proof_pred_spec["attr_name"] != canon(req_name): - continue if not ( - Predicate.get(proof_pred_spec["p_type"]) is req_pred - and proof_pred_spec["value"] == req_value + proof_pred_spec["attr_name"] == canon(req_name) + and Predicate.get(proof_pred_spec["p_type"]) is req_pred ): + continue + if proof_pred_spec["value"] != req_value: raise V20PresFormatHandlerError( f"Presentation predicate on {req_name} " "mismatches proposal request"