mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-10-30 08:06:35 +00:00
The implementation of these encodings in the data-encoding crate is overly strict when extraneous/excess padding is used, presenting problems from the perspective of Postel's law especially in the context of email: there are base64 encoders widely deployed that can produce extraneous padding that is otherwise harmless but which will raise an error from this crate. This commit works around this by manipulating the encoding context to remove the padding requirement, as well as the padding, and decodes the input without padding.