diff options
Diffstat (limited to 'modules/caddyhttp/caddyauth')
-rw-r--r-- | modules/caddyhttp/caddyauth/basicauth.go | 4 | ||||
-rw-r--r-- | modules/caddyhttp/caddyauth/command.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/caddyauth/basicauth.go b/modules/caddyhttp/caddyauth/basicauth.go index b4cf838..d709f94 100644 --- a/modules/caddyhttp/caddyauth/basicauth.go +++ b/modules/caddyhttp/caddyauth/basicauth.go @@ -77,8 +77,8 @@ func (hba *HTTPBasicAuth) Provision(ctx caddy.Context) error { } acct.Username = repl.ReplaceAll(acct.Username, "") - acct.Password = repl.ReplaceAll(string(acct.Password), "") - acct.Salt = repl.ReplaceAll(string(acct.Salt), "") + acct.Password = repl.ReplaceAll(acct.Password, "") + acct.Salt = repl.ReplaceAll(acct.Salt, "") if acct.Username == "" || acct.Password == "" { return fmt.Errorf("account %d: username and password are required", i) diff --git a/modules/caddyhttp/caddyauth/command.go b/modules/caddyhttp/caddyauth/command.go index 70a11a0..24f6c5a 100644 --- a/modules/caddyhttp/caddyauth/command.go +++ b/modules/caddyhttp/caddyauth/command.go @@ -76,7 +76,7 @@ func cmdHashPassword(fs caddycmd.Flags) (int, error) { return caddy.ExitCodeFailedStartup, err } - hashBase64 := base64.StdEncoding.EncodeToString([]byte(hash)) + hashBase64 := base64.StdEncoding.EncodeToString(hash) fmt.Println(hashBase64) |