Artifacts Associated With Ticket ffeb2097af
Ticket change [38f2abdb3b] (rid 180717) by dgp on 2020-03-27 22:28:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Another inconsistency between [binary decode base64] and the base64 package that TIP 317 suggested was the intended model. % package require base64 2.4.2 % base64::decode [base64::encode -maxlen 3 -wrapchar : abc] abc % binary decode base64 [binary encode base64 -maxlen 3 -wrapchar : abc] invalid base64 character ":" at position 3
- foundin initialized to: "8.6+"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "12. ByteArray Object"
- title initialized to:
[binary decode base64] errors on invalid chars instead of ignoring them
- type initialized to: "Bug"
Ticket change [da64668c62] (rid 180718) by dgp on 2020-03-27 23:31:37:
- icomment:
[base64::decode] accepts no options. [binary decode base64] has an optional option -strict that makes it reject whitespace too. % binary decode base64 -strict [binary encode base64 -maxlen 3 abc] invalid base64 character " " at position 3 TIP 317 apparently invented this without description. It's difficult to see what use it meets.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [7b324ab83a] (rid 180719) by dgp on 2020-03-27 23:34:41:
- icomment:
Comments in the base64 package mention RFC 2045. https://datatracker.ietf.org/doc/rfc2045/?include_text=1 It says " Any characters outside of the base64 alphabet are to be ignored in base64-encoded data."
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [cd1edf80b7] (rid 180720) by aku on 2020-03-27 23:39:40:
- icomment:
The comment in Tcllib referencing the RFC is ``` # RFC 2045 says that line breaks and other characters not part # of the Base64 alphabet must be ignored, and that the decoder # can optionally emit a warning or reject the message. We opt # not to do so, but to just ignore the character. ``` at the bottom of `base64.tcl`. My opinion is that the Tcl command should reject any bogus characters only in -strict mode, and in regular mode ignore them like the Tcllib command does.
- login: "aku"
- mimetype: "text/plain"
- icomment:
Ticket change [c5d24c2a45] (rid 180721) by dgp on 2020-03-28 02:47:04:
- icomment:
The tests in the test suite that examine the rejection of characters outside the Base64 alphabet all include the -strict option. At least mild evidence this is a bug rather than a design.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [1edbc4a58d] (rid 180722) by dgp on 2020-03-28 03:31:05:
- icomment:
The original implementation was consistent with the base64 package. A "regression" (an intentional change really) came in https://core.tcl-lang.org/tcl/info/1d99671194f9d92f which aimed to stop a segfault reported here https://core.tcl-lang.org/tcl/info/2380293
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [01e5d1bacd] (rid 180723) by dgp on 2020-03-28 03:34:07:
- icomment:
I note that the segfault and the tests for it were in the uuencode decoder, but the base64 decoder got changed too. This is at least worth another look.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [04ae03a2c9] (rid 180730) by dgp on 2020-03-28 15:35:33:
- assignee changed to: "dgp"
- closedate changed to: "2458937.14969875"
- closer changed to: "dgp"
- icomment: "Fixed."
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"