D-Programming-Language/phobos — pull request #440 by CyberShadow (2012-02-19 17:16:36+00:00)
Title: std.base64: Fix invariants when decoding truncated strings

We should never throw Errors on malformed data - especially since the module does not provide validation facilities. Base64 is widely used on the web, so encoded strings need to be treated like user input.

The added unittests are purposefully vague. This is to allow changing the implementation within the spec (whether to throw, ignore or try parsing trailing bytes).