Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indifferent to b64url padding in indy-utils #1055

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

gmulhearn-anonyome
Copy link
Contributor

it was found that recent updates to base64 in indy-utils made the codebase less resilient to b64url padding when decoding. Previously we were indifferent to padding when decoding, then a regression was made which made indy-utils REQUIRE padding. This PR fixes the regression such that indy-utils will decode with or without padding.

this is important for utils such as unpack_message.

according to encryption envelope: https://github.com/hyperledger/aries-rfcs/blob/main/features/0019-encryption-envelope/README.md

NOTE: In the unpack algorithm, the base64url decode implementation used MUST correctly decode padded and unpadded base64URL encoded data.

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1055 (79a5c3e) into main (ed4ee6b) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@          Coverage Diff          @@
##            main   #1055   +/-   ##
=====================================
  Coverage   0.05%   0.05%           
=====================================
  Files        379     379           
  Lines      20912   20912           
  Branches    3853    3853           
=====================================
  Hits          12      12           
  Misses     20899   20899           
  Partials       1       1           
Flag Coverage Δ
unittests-aries-vcx 0.05% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...rtools/indy-utils/src/crypto/base64/rust_base64.rs 0.00% <0.00%> (ø)

@Patrik-Stas Patrik-Stas merged commit baf941f into hyperledger:main Nov 12, 2023
28 checks passed
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.

3 participants