-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove incorrect ASCII conversion #979
Conversation
Hey @eddyashton thanks for your PR! For this one I definitely need to try a couple samples in addition, so I'll have this reviewed by EoW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Thanks very much for bringing this up @eddyashton .
Don't worry about merging, my plan is to get the regression-full
check that is failing green today, then merge your PR after double checking that run to ensure we're not relying on broken behavior in existing examples 👍
Hey @eddyashton apologies for the delay here! I've been extremely randomized lately. I spent some time digging around, understanding the failure and why it was suddenly cropping up. Essentially, we "regressed" in that we FIXED a bug. We were expecting an To merge this PR, I would ask that you do the following:
Thank you so much for the original report + fix! |
@scbedd No worries, thanks for the thorough review! |
When
oav
is validating thebyte
format, it reports errors for many valid base64 strings.I believe this should permit any valid base64, but the conversion to ASCII is dropping/re-encoding bytes that aren't valid ASCII. The result is that any real base64 in an example (which isn't merely a base-64 encoding of ASCII, as the example generator constructs), will produce a validation error.
Ideally this would return a more precise error message ("here's the character I don't think is valid base64"), as relying on the JS Buffer parser means we only accept url-safe, fully padded values. But that's a larger change, so making this standalone fix for now.
Examples of roundtripping with the code before and after, below