Skip to content

fix: query param matching handles params that are not in same order#46

Merged
birme merged 4 commits intomainfrom
45-use-records-false
Apr 10, 2025
Merged

fix: query param matching handles params that are not in same order#46
birme merged 4 commits intomainfrom
45-use-records-false

Conversation

@birme
Copy link
Copy Markdown
Contributor

@birme birme commented Apr 10, 2025

This PR addresses #45 and fix an issue where query param matching required the params to be in the same order. This is solved by parsing the query param string and sort the params before string comparison.

In addition this PR includes:

Validate types for match in catu claim is according to spec:

match = {
  ? exact-match ^ => tstr,
  ? prefix-match ^ => tstr,
  ? suffix-match ^ => tstr,
  ? contains-match ^ => tstr,
  ? regex-match ^ => [ tstr, * tstr ],
  ? sha256-match ^ => bstr,
  ? sha512-256-match ^ => bstr
}

And also adds the useRecords=false option to CBOR encoder/decoder

@birme birme linked an issue Apr 10, 2025 that may be closed by this pull request
@birme birme changed the title feat: validate match value types in catu claim fix: query param matching handles params not in same order Apr 10, 2025
@birme birme changed the title fix: query param matching handles params not in same order fix: query param matching handles params that are not in same order Apr 10, 2025
@birme birme merged commit 313812e into main Apr 10, 2025
3 checks passed
birme added a commit that referenced this pull request Apr 10, 2025
)

* fix: query param matching handles params not in same order

* feat: validate match types for catu claim

* fix: useRecords false for all encode/decode

* chore: remove unused import
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.

cbor-x Encoder, Decoder must use the options useRecords: false

1 participant