1
0
Fork 0
forked from forgejo/forgejo

Upgrade xorm to v1.0.3 (#12210)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Lunny Xiao 2020-07-12 05:07:52 +08:00 committed by GitHub
parent 3973a4609e
commit d08996c7b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 2115 additions and 1783 deletions

View file

@ -360,13 +360,15 @@ func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {
pubKey := mc.cfg.pubKey
if pubKey == nil {
// request public key from server
data := mc.buf.takeSmallBuffer(4 + 1)
data, err := mc.buf.takeSmallBuffer(4 + 1)
if err != nil {
return err
}
data[4] = cachingSha2PasswordRequestPublicKey
mc.writePacket(data)
// parse public key
data, err := mc.readPacket()
if err != nil {
if data, err = mc.readPacket(); err != nil {
return err
}