Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1213,29 +1213,13 @@ func (cn *conn) auth(r *readBuf, o values) {
w := cn.writeBuf('p')
w.string(o["password"])
cn.send(w)

t, r := cn.recv()
if t != 'R' {
errorf("unexpected password response: %q", t)
}

if r.int32() != 0 {
errorf("unexpected authentication response: %q", t)
}
return
case 5:
s := string(r.next(4))
w := cn.writeBuf('p')
w.string("md5" + md5s(md5s(o["password"]+o["user"])+s))
cn.send(w)

t, r := cn.recv()
if t != 'R' {
errorf("unexpected password response: %q", t)
}

if r.int32() != 0 {
errorf("unexpected authentication response: %q", t)
}
return
case 7: // GSSAPI, startup
if newGss == nil {
errorf("kerberos error: no GSSAPI provider registered (import github.com/lib/pq/auth/kerberos if you need Kerberos support)")
Expand Down