Repository navigation
Changes since v1.10.1.
Security fixes
-
Return
ErrMalformPktinstead of panicking on truncated initial handshake
packets, including the greeting received before TLS negotiation.
(GHSA-9qjq-77h9-895w, #1850) -
Discard connections after a failed
LOAD DATA LOCAL INFILE, including reader
Close()errors, so unread results from a multi-statement batch cannot be
returned to a later caller. Preserve the server's response status and avoid
retrying the batch after an upload write failure. (GHSA-4v5x-9mc8-gr98) -
Reject
interpolateParams=truecombined with an unsafe multibyte charset
(big5,sjis,gbk,cp932,gb18030) given bycharsetorCharset().
Previously onlycollationwas checked. Collations are now matched
case-insensitively and by their charset prefix. The check also runs again
after aBeforeConnectcallback has modified the config. Stop rejecting
gb2312_bin; GB2312 trailing bytes cannot contain a backslash. The error text
changed frominvalid DSN: interpolateParams can not be used with unsafe collations
tointerpolateParams cannot be used with unsafe charsets, because it may also
be returned byNewConnectororConnector.ConnectafterBeforeConnect.
Applications comparing the complete error string must update their comparison. (#1836) -
Fix
interpolateParamsnot treating--followed by\v,\f, another
control character, DEL, or a raw0xA0byte as a comment. Other non-ASCII
bytes after--remain outside the supported interpolation grammar. (#1836) -
Fix
interpolateParamstreating the*that opens/*/as closing the
comment. (#1835)
Bugfixes
-
Honor
BeforeConnectchanges to the timeout, dialer, logger, and connection
attributes without modifying the shared connector. (#1809) -
Validate prepared statement arguments and packet size before sending long
data, and reset the statement if a long-data write fails. (#1810) -
Fix the reported precision of unsigned DECIMAL columns. (#1813)
-
Preserve full two-byte column collation IDs so IDs above 255 do not cause
text columns to be reported as binary columns. (#1818) -
Fix the inverted check for collations outside the handshake's one-byte map.
Accept them when a charset is supplied, usingSET NAMES ... COLLATE;
reject them when no charset is supplied instead of silently using the
default collation. (#1832) -
Preserve and log idle server error packets before discarding a connection,
with bounded diagnostics over plain, TLS, and zlib connections. (#1843)