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

Removing padding from url invitations #3238

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

jamshale
Copy link
Contributor

@jamshale jamshale commented Sep 17, 2024

I didn't understand this for a while but looking at the RFC PR, I think this is all that's needed.

Uses the common util in the wallet directory to remove the padding from the url via the bytes_to_b64 function. Then this same util module is used with b64_to_bytes which pads the invitation string when one is received. This was already in place, meaning that aca-py already handled unpadded invitation urls.

This util is used in several other places, mostly for attachment and jws signing. They all remove padding as well. The only place it looks to be used with padding is for bbs_bls_signature proof values. I'm not sure if this is required or not.

NOTE: I changed it for the old connection invitation endpoint as well even though is depreciated and didn't get update in the RFC.

@jamshale jamshale closed this Sep 17, 2024
Signed-off-by: Jamie Hale <[email protected]>
@jamshale jamshale reopened this Sep 17, 2024
@jamshale jamshale linked an issue Sep 17, 2024 that may be closed by this pull request
@jamshale jamshale marked this pull request as ready for review September 17, 2024 19:59
Signed-off-by: Jamie Hale <[email protected]>
Copy link

sonarcloud bot commented Sep 17, 2024

@jamshale jamshale changed the title Feat/3204 Removing padding from url invitations Sep 18, 2024
@jamshale jamshale merged commit 8384c3c into openwallet-foundation:main Sep 18, 2024
11 checks passed
ff137 pushed a commit to ff137/acapy that referenced this pull request Oct 22, 2024
* Removing padding for oob invitation url

Signed-off-by: Jamie Hale <[email protected]>

* Removing padding for connection invitation url

Signed-off-by: Jamie Hale <[email protected]>

* Fix padding test

Signed-off-by: Jamie Hale <[email protected]>

* Re-sync

Signed-off-by: Jamie Hale <[email protected]>

---------

Signed-off-by: Jamie Hale <[email protected]>
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.

Remove padding on generated base64url encoded strings
2 participants