Overview
| Artifact ID: | 7104273b0299d5ba450a39a01a4d0349c245fa85 |
|---|---|
| Ticket: | 3033307fffffffffffffffffffffffffffffffff
binary decode base64 breaks with trailing spaces |
| User & Date: | a_kovalenko on 2010-07-23 18:10:38 |
Changes
- icomment:
Clarification: I don't mean "whitespace" here when I say that it's too liberal. E.g. single-character string, "P", is illegal when it's the _whole_ base64 input, yet Tcl [binary decode] accepts it. "P===" is also illegal and also accepted. These "holes" may be fixed easily, too, but after that this function will look even more ugly. It seems that ill-defined semantics of the `cut' variable (does it count bytes or 6bit units?) _is_ the cause of an impressive amount of "special-case" checks within such a small function. I believe that my patch at least provides correct decoding of _correct_ base64, so it may be useful as a palliative.
- login: "a_kovalenko"
- mimetype: "text/plain"
- username: "a_kovalenko"