mirror of https://github.com/poanetwork/gecko.git
don't require strong auth password if auth disabled
This commit is contained in:
parent
a4ed688533
commit
b3b477c7d9
|
@ -411,13 +411,15 @@ func init() {
|
||||||
// HTTP:
|
// HTTP:
|
||||||
Config.HTTPHost = *httpHost
|
Config.HTTPHost = *httpHost
|
||||||
Config.HTTPPort = uint16(*httpPort)
|
Config.HTTPPort = uint16(*httpPort)
|
||||||
if Config.APIRequireAuthToken && Config.APIAuthPassword == "" {
|
if Config.APIRequireAuthToken {
|
||||||
errs.Add(errors.New("api-auth-password must be provided if api-require-auth is true"))
|
if Config.APIAuthPassword == "" {
|
||||||
return
|
errs.Add(errors.New("api-auth-password must be provided if api-require-auth is true"))
|
||||||
}
|
return
|
||||||
if !password.SufficientlyStrong(Config.APIAuthPassword, auth.RequiredPasswordStrength) {
|
}
|
||||||
errs.Add(errors.New("api-auth-password is not strong enough. Add more characters"))
|
if !password.SufficientlyStrong(Config.APIAuthPassword, auth.RequiredPasswordStrength) {
|
||||||
return
|
errs.Add(errors.New("api-auth-password is not strong enough. Add more characters"))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging:
|
// Logging:
|
||||||
|
|
Loading…
Reference in New Issue