From: Bitbucket <com...@bi...> - 2019-08-02 12:06:34
|
6 new commits in naviserver: https://bitbucket.org/naviserver/naviserver/commits/aad12e97a8e5/ Changeset: aad12e97a8e5 User: gustafn Date: 2019-08-02 09:15:18+00:00 Summary: pass the character data in the "binary" cases explicitly as bytearrays. This fixes the formerly "broken" cases in the regression test Affected #: 2 files https://bitbucket.org/naviserver/naviserver/commits/d5857cf3e22c/ Changeset: d5857cf3e22c User: gustafn Date: 2019-08-02 09:46:52+00:00 Summary: make test more robust for different time zones Affected #: 1 file https://bitbucket.org/naviserver/naviserver/commits/599128efdf4a/ Changeset: 599128efdf4a User: gustafn Date: 2019-08-02 10:19:15+00:00 Summary: omit questionable tests with binary content via non-binary mimetype for versions before Tcl 8.7 Affected #: 1 file https://bitbucket.org/naviserver/naviserver/commits/a789ba209e22/ Changeset: a789ba209e22 User: gustafn Date: 2019-08-02 11:23:51+00:00 Summary: use lowercase parameter names Affected #: 1 file https://bitbucket.org/naviserver/naviserver/commits/1e03ee1a342f/ Changeset: 1e03ee1a342f User: gustafn Date: 2019-08-02 12:04:14+00:00 Summary: Do not require the user to convert UTF-8 characters manually to byte arrays on the Tcl level. In the last tow releases (4.99.17 and 4.99.18) the NaviServer behavior went towards Tcl, but this lead to compatibility problems and puts a burden to the user on the Tcl level. See below for some background and consequences. /* * Obtain the binary data from an obj. If the Tcl_Obj is not a bytecode * obj, produce it on the fly to avoid puting the burden to the user. * * Tcl requires the user to convert UTF-8 characters into bytearrays on * the scripting level, as the following example illustrates. The UTF-8 * character "ü" requires 2 bytes: * * % binary encode hex ü * fc * % binary encode hex [encoding convertto utf-8 ü] * c3bc * * When doing a base64 encoding, the casual user expect the same behavior * as in a shell, e.g. for transforming "ü" into a based64 encoded string: * * $ echo -n "ü" |base64 * w7w= * * % ns_base64encode ü * w7w= * * But Tcl requires this interaction "manually": * * % binary encode base64 ü * /A== * * % binary encode base64 [encoding convertto utf-8 ü] * w7w= * * The same principle should as well apply for the crypto commands, where * the NaviServer user should not have to care for converting chars to * bytestrings manually. * * $ echo -n "ü" |openssl sha1 * (stdin)= 94a759fd37735430753c7b6b80684306d80ea16e * * % ns_sha1 "ü" * 94A759FD37735430753C7B6B80684306D80EA16E * * % ns_md string -digest sha1 ü * 94a759fd37735430753c7b6b80684306d80ea16e * * The same should hold as well for 3-byte UTF-8 characters * * $ echo -n "☀" |openssl sha1 * (stdin)= d5b6c20ee0b3f6dafa632a63eafe3fd0db26752d * * % ns_sha1 ☀ * D5B6C20EE0B3F6DAFA632A63EAFE3FD0DB26752D * * % ns_md string -digest sha1 ☀ * d5b6c20ee0b3f6dafa632a63eafe3fd0db26752d * */ Affected #: 3 files https://bitbucket.org/naviserver/naviserver/commits/edb90f3e3853/ Changeset: edb90f3e3853 User: gustafn Date: 2019-08-02 12:05:53+00:00 Summary: improve spelling Affected #: 1 file Repository URL: https://bitbucket.org/naviserver/naviserver/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |