-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Exception when decoding Jackson-encoded Base64
binary value in YAML
#90
Comments
Ok. Thank you for reporting this. Sounds like a bug indeed, related to splitting of base64 encoded lines to conform to 76 character limitation (for some variants). Not sure what would be the best way to fix, and which part (jackson yaml codec or snakeyaml) is responsible for either unnecessary escaping, or missing decoding. |
I have the same problem encoding/decoding binary arrays longer than 76 characters after upgrading from 2.9.2 to 2.9.6. I submitted a PR to try to fix it by changing the way the encoding is done in Base64Variant |
Because of FasterXML/jackson-dataformats-text#90 binary (Base64) data in YAML are not serialized correctly. This commit introduces quite ugly hack that deals with it.
Base64
binary value in YAML
Using jackson-dataformats-text-2.9.6 binary values that exceed a given length cannot be decoded back and the following exception is thrown:
This is related to #62 which forces the
Base64Variant
to beMIME
. When the encoded value exceeds a given size, line seperators are inserted into the encoded value but it then fails to be decoded.I created the following small test and added it to the
SimpleGenerationTest
inyaml
:This test passed correctly when
length
is small (50
) but with larger size (like100
) it fails.The text was updated successfully, but these errors were encountered: