author | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-04-10 18:22:40 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-04-10 18:48:35 UTC |
parent | b86463f1233d12b54142ef8bc71be325a41a6e7c |
cmd/chasquid-util/chasquid-util.go | +3 | -0 |
diff --git a/cmd/chasquid-util/chasquid-util.go b/cmd/chasquid-util/chasquid-util.go index 43282cb..8ced913 100644 --- a/cmd/chasquid-util/chasquid-util.go +++ b/cmd/chasquid-util/chasquid-util.go @@ -82,6 +82,9 @@ func userDBForDomain(domain string) string { func userDBFromArgs(create bool) (string, string, *userdb.DB) { username := args["<username>"].(string) user, domain := envelope.Split(username) + if domain == "" { + Fatalf("Domain missing, username should be of the form 'user@domain'") + } db, err := userdb.Load(userDBForDomain(domain)) if err != nil {