http auth fixes #36

This commit is contained in:
Josh Baker 2016-08-25 05:25:20 -07:00
parent 1d427c849f
commit 7b8c2dae85
1 changed files with 3 additions and 2 deletions

View File

@ -311,12 +311,13 @@ func (c *Controller) handleInputCommand(conn *server.Conn, msg *server.Message,
return writeErr(errors.New("invalid password"))
}
conn.Authenticated = true
return writeOutput(server.OKMessage(msg, start))
if msg.ConnType != server.HTTP {
return writeOutput(server.OKMessage(msg, start))
}
} else if msg.Command == "auth" {
return writeErr(errors.New("invalid password"))
}
}
// choose the locking strategy
switch msg.Command {
default: