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

Ensure Bech32.encode throws for output length > 90 #335

Closed
webmaster128 opened this issue Aug 3, 2020 · 0 comments · Fixed by #340
Closed

Ensure Bech32.encode throws for output length > 90 #335

webmaster128 opened this issue Aug 3, 2020 · 0 comments · Fixed by #340

Comments

@webmaster128
Copy link
Member

webmaster128 commented Aug 3, 2020

The bech32 spec says an address is no longer than 90 characters. To avoid any kind of decoding trouble later on, we should ensure this library throws when the result address exceeds 90 characters.

For decoding on the other hand there is no reason to enfore this restriction. Here we could even test if the current implementation supports very long addresses.

Some sample data here: cosmos/cosmos-sdk#6237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants