You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the first case seems to be invalid but our implementation is accepting it. The second case is technically not valid base64 (note code point length is not divisible by 4), since it's missing an extra padding = character, but I'm guessing both implementations can unambiguously decode it. However, other implementations are stricter:
>> atob("YmxvYg=");
Uncaught DOMException: String contains an invalid character
This removes our implementation of base64 encoding/decoding from
`aws-smithy-types`, switching to the `base64` Rust crate.
Our implementation was written at a time when we wanted to keep
dependencies at an absolute minimum. However, a performant base64
implementation is now needed for the server.
Our implementation was also accepting invalid base64 (see #1277).
Fixes#1277.
Consider this patch:
cargo test test_base64_misc -- --nocapture
yields:So the first case seems to be invalid but our implementation is accepting it. The second case is technically not valid base64 (note code point length is not divisible by 4), since it's missing an extra padding
=
character, but I'm guessing both implementations can unambiguously decode it. However, other implementations are stricter:These two cases are deemed as invalid base64 according to Smithy protocol tests.
The text was updated successfully, but these errors were encountered: