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

Error message decoding strings is wrong or wrongly applied #45

Open
KariOlson-KD opened this issue Aug 8, 2019 · 1 comment
Open

Error message decoding strings is wrong or wrongly applied #45

KariOlson-KD opened this issue Aug 8, 2019 · 1 comment
Milestone

Comments

@KariOlson-KD
Copy link

When decoding Base64 strings, I see this error pretty frequently:
"Expected consent string to contain at least 17bytes, but found only 17 bytes"

This message is either being thrown in error:
You needed at least x and you got exactly x. This is not a problem.

Or the error message is being generated incorrectly and one of the two values is wrong. The correct error should be either of :
"Expected consent string to contain at least 17bytes, but found only 16 bytes"
"Expected consent string to contain at least 18bytes, but found only 17 bytes"

Here are some examples of strings that are generate this error when querying for purpose 5:
BOP02S_OkoBERAKABCENBDA
BOmOjKtOmOjKtAKABBENBDA

@lanusau
Copy link
Collaborator

lanusau commented Aug 8, 2019

Yes, its a misleading message, but the error is only in the message, the actual check is correct and these strings are invalid. The first number is the index of the byte array is being accessed and its counted from 0, so for index 17 you need 18 bytes.
I will fix it in the next release.

@lanusau lanusau added this to the 3.0.3 milestone Aug 8, 2019
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

No branches or pull requests

2 participants