Skip to content

Commit

Permalink
Add check to avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Feb 16, 2022
1 parent 957fde6 commit d48b6f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/o365/userEnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func CheckTenant(optionsInterface *interface{}, username string) bool {
if len(options.validTenants) == 0 {
options.validTenants = make(map[string]bool)
}
if len(strings.Split(username, "@")) == 1 {
options.Log.Error("User should be in format [email protected]")
return false
}
domain := strings.Split(username, "@")[1]
// If we didn't already checked the domain
options.Mutex.Lock()
Expand Down

0 comments on commit d48b6f5

Please sign in to comment.