Skip to content

Commit

Permalink
Allow overrwriting connection attribute "_client_name"
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Dec 17, 2021
1 parent 3ab2571 commit b5117fc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,6 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
connectAttrsBuf = appendLengthEncodedString(connectAttrsBuf, []byte("github.com/go-sql-driver/mysql"))

for k, v := range mc.cfg.ConnectAttrs {
if k == "_client_name" {
// do not allow overwriting reserved values
continue
}
connectAttrsBuf = appendLengthEncodedString(connectAttrsBuf, []byte(k))
connectAttrsBuf = appendLengthEncodedString(connectAttrsBuf, []byte(v))
}
Expand Down

0 comments on commit b5117fc

Please sign in to comment.