Skip to content

Conversation

anweiss
Copy link
Owner

@anweiss anweiss commented Feb 11, 2025

Fix #228

@anweiss anweiss requested a review from Copilot February 11, 2025 01:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR addresses issue #228 by updating the CBORValidator to include a new field (range_upper) and reworking validation logic for ranges, particularly for byte string (.size) validations. Key changes include:

  • Adding a new field range_upper to CBORValidator and initializing it in multiple constructors.
  • Refactoring range validation logic to handle different value types (including Bytes and Integer) with clearer error messages.
  • Changing generic_rules args initialization from vec![] to Vec::new().
  • Removing outdated comments and adding new tests for validating byte string size ranges.

Changes

File Description
src/validator/cbor.rs Introduces range_upper field, adjusts range validation logic, and adds tests for .size range validations

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

anweiss and others added 3 commits February 10, 2025 20:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@anweiss anweiss merged commit 3242844 into main Feb 11, 2025
17 checks passed
@anweiss anweiss deleted the fix-228 branch February 11, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bstr .size with a range not working
1 participant