feat: validate personal and enterprise auth tenants
This commit is contained in:
@@ -1143,6 +1143,12 @@ func (s *Session) login(msg *ClientComMessage) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := validateLoginTenant(s, msg); err != nil {
|
||||
logs.Warn.Println("s.login: invalid login tenant", err, s.sid)
|
||||
s.queueOut(decodeStoreError(types.ErrPolicy, msg.Id, msg.Timestamp, loginTenantErrorParams(err)))
|
||||
return
|
||||
}
|
||||
|
||||
handler := store.Store.GetLogicalAuthHandler(msg.Login.Scheme)
|
||||
if handler == nil {
|
||||
recordSessionLoginFailure(s, msg.Login.Scheme, msg.Login.Secret, nil, msg.Id, types.ErrUnsupported, msg.Timestamp)
|
||||
|
||||
Reference in New Issue
Block a user