summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-sql-driver/mysql/auth.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-06-23 23:22:43 +0800
committerLauris BH <lauris@nix.lv>2019-06-23 18:22:43 +0300
commitaa7c34cf86081b71f796f6e5da60e62a3cda43ce (patch)
treec9e4b4f1490b43e942fa71b37748072d3fe441e8 /vendor/github.com/go-sql-driver/mysql/auth.go
parentbaefea311f1a66a97f9a2779ad3342f4f8167d28 (diff)
downloadgitea-aa7c34cf86081b71f796f6e5da60e62a3cda43ce.tar.gz
gitea-aa7c34cf86081b71f796f6e5da60e62a3cda43ce.zip
Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug * upgrade packages * fix fmt * fix Consistency * fix tests
Diffstat (limited to 'vendor/github.com/go-sql-driver/mysql/auth.go')
-rw-r--r--vendor/github.com/go-sql-driver/mysql/auth.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/vendor/github.com/go-sql-driver/mysql/auth.go b/vendor/github.com/go-sql-driver/mysql/auth.go
index fec7040d4a..14f678a87b 100644
--- a/vendor/github.com/go-sql-driver/mysql/auth.go
+++ b/vendor/github.com/go-sql-driver/mysql/auth.go
@@ -360,15 +360,13 @@ func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {
pubKey := mc.cfg.pubKey
if pubKey == nil {
// request public key from server
- data, err := mc.buf.takeSmallBuffer(4 + 1)
- if err != nil {
- return err
- }
+ data := mc.buf.takeSmallBuffer(4 + 1)
data[4] = cachingSha2PasswordRequestPublicKey
mc.writePacket(data)
// parse public key
- if data, err = mc.readPacket(); err != nil {
+ data, err := mc.readPacket()
+ if err != nil {
return err
}