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

Fix the issue where the validity of the encoded strkey is not verified in certain scenarios. #541

Merged
merged 6 commits into from
Sep 27, 2023

Conversation

overcat
Copy link
Member

@overcat overcat commented Sep 21, 2023

We have replaced the base32 library, and their internal implementations are slightly different, which has caused a bug.

fix #540

@overcat overcat changed the title Fix issues where the validity of the encoded strkey is not verified in certain scenarios. Fix the issue where the validity of the encoded strkey is not verified in certain scenarios. Sep 21, 2023
@@ -23,7 +25,8 @@ class StrKey {

public static final int ACCOUNT_ID_ADDRESS_LENGTH = 56;
private static final byte[] b32Table = decodingTable();
private static final Base32 base32Codec = new Base32();
private static final Base32 base32Codec =
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't seem to be necessary to configure with additional settings and STRICT, since base32decode() determines validity now, and it may lead to partial duplication of functionality. I tried reverting this line locally, and the tests still pass.

@overcat
Copy link
Member Author

overcat commented Sep 27, 2023

Hi @sreuland, can you check the status? I retriggered the CI, but it was still unable to merge.

@overcat overcat closed this Sep 27, 2023
@overcat overcat reopened this Sep 27, 2023
@overcat overcat merged commit 19eb5a1 into lightsail-network:master Sep 27, 2023
6 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.

AccountConverter.enableMuxed() not throwing exceptions with trailing characters of a valid mux account
2 participants