hyperledger / anoncreds-v2-rs

Anonymous Credential Exchange 2.0
Apache License 2.0
34 stars 13 forks source link

fix out of range panic #28

Closed haroldcarr closed 4 months ago

haroldcarr commented 4 months ago

This adds a test case that expects InvalidPresentationData when someone tries to create a range proof with a value that is outside the required range.

Without the fix, it panics:

thread 'out_of_range_panic' panicked at 'attempt to add with overflow', src/presentation/range.rs:147:38

This PR adds a check for out of range in presentation/range.rs in RangeBuilder.commit.

swcurran commented 4 months ago

@haroldcarr — thanks for the PR. We can’t merge the PR until the DCO (DCO - Developer Certificate of Origin - https://github.com/apps/dco) is applied. Can you please fix that as per the “Details” in the failed check above? Thanks!

haroldcarr commented 4 months ago

DONE

On Thu, Jul 18, 2024 at 6:54 AM Stephen Curran @.***> wrote:

@haroldcarr https://github.com/haroldcarr — thanks for the PR. We can’t merge the PR until the DCO (DCO - Developer Certificate of Origin - https://github.com/apps/dco) is applied. Can you please fix that as per the “Details” in the failed check above? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/hyperledger/anoncreds-v2-rs/pull/28#issuecomment-2236591869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFE4KVYBHOX7OUFV2CQVFDZM7CILAVCNFSM6AAAAABLA6JJ22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGU4TCOBWHE . You are receiving this because you were mentioned.Message ID: @.***>

swcurran commented 4 months ago

@haroldcarr — the DCO check is still failing. Might be easiest just to create a new commit with the same changes, and then a new PR. Sorry for the pain.

haroldcarr commented 4 months ago

done https://github.com/hyperledger/anoncreds-v2-rs/pull/29