forked from mystiq/dex
fix merge error in config.go
Signed-off-by: justin-slowik <justin.slowik@thermofisher.com>
This commit is contained in:
parent
1404477326
commit
1ea2892b79
1 changed files with 1 additions and 5 deletions
|
@ -103,12 +103,8 @@ func (p *password) UnmarshalJSON(b []byte) error {
|
||||||
data.Hash = os.Getenv(data.HashFromEnv)
|
data.Hash = os.Getenv(data.HashFromEnv)
|
||||||
}
|
}
|
||||||
if len(data.Hash) == 0 {
|
if len(data.Hash) == 0 {
|
||||||
if len(data.HashFromEnv) > 0 {
|
|
||||||
data.Hash = os.Getenv(data.HashFromEnv)
|
|
||||||
} else {
|
|
||||||
return fmt.Errorf("no password hash provided")
|
return fmt.Errorf("no password hash provided")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If this value is a valid bcrypt, use it.
|
// If this value is a valid bcrypt, use it.
|
||||||
_, bcryptErr := bcrypt.Cost([]byte(data.Hash))
|
_, bcryptErr := bcrypt.Cost([]byte(data.Hash))
|
||||||
|
|
Loading…
Reference in a new issue