mirror of https://github.com/gophish/gophish
Added a contact_address entry in config.json to support transparency efforts (ref #1057).
Also added a warning in the case where a contact address isn't provided, and fixed the JSON formatting of the configuration.pull/1148/merge
parent
da6091e021
commit
64c5e54c64
|
@ -13,5 +13,6 @@
|
||||||
},
|
},
|
||||||
"db_name": "sqlite3",
|
"db_name": "sqlite3",
|
||||||
"db_path": "gophish.db",
|
"db_path": "gophish.db",
|
||||||
"migrations_prefix" : "db/db_"
|
"migrations_prefix": "db/db_",
|
||||||
|
"contact_address": ""
|
||||||
}
|
}
|
|
@ -31,6 +31,7 @@ type Config struct {
|
||||||
DBPath string `json:"db_path"`
|
DBPath string `json:"db_path"`
|
||||||
MigrationsPath string `json:"migrations_prefix"`
|
MigrationsPath string `json:"migrations_prefix"`
|
||||||
TestFlag bool `json:"test_flag"`
|
TestFlag bool `json:"test_flag"`
|
||||||
|
ContactAddress string `json:"contact_address"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conf contains the initialized configuration struct
|
// Conf contains the initialized configuration struct
|
||||||
|
@ -52,4 +53,11 @@ func LoadConfig(filepath string) {
|
||||||
Conf.MigrationsPath = Conf.MigrationsPath + Conf.DBName
|
Conf.MigrationsPath = Conf.MigrationsPath + Conf.DBName
|
||||||
// Explicitly set the TestFlag to false to prevent config.json overrides
|
// Explicitly set the TestFlag to false to prevent config.json overrides
|
||||||
Conf.TestFlag = false
|
Conf.TestFlag = false
|
||||||
|
|
||||||
|
// Print a warning if a contact address isn't provided
|
||||||
|
// (see: https://github.com/gophish/gophish/issues/1057)
|
||||||
|
if Conf.ContactAddress == "" {
|
||||||
|
log.Warnf("No contact address has been configured.")
|
||||||
|
log.Warnf("Please consider adding a contact_address entry in your config.json")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue