diff --git a/CHANGELOG.md b/CHANGELOG.md index 03619be6..322befad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # v0.3.0-rc3 (WiP) +> This release increments the configuration version from `1` to `2`. See the note below. + +CHANGE: The email "from" configuration moved from `registration/email_from` to `email/from`. **NOTE: This change increments the configuration `V` from `1` to `2`.** + CHANGE: Replaced un-salted sha512 password hashing with salted hashing based on Argon2 **NOTE: This version will _invalidate_ all account passwords, and will require all users to use the 'Forgot Password?' function to reset their password.** (https://github.com/openziti/zrok/issues/156) FIX: Fixed log message in `resetPasswordRequest.go` (https://github.com/openziti/zrok/issues/175) diff --git a/controller/config.go b/controller/config.go index 18149472..01f87e68 100644 --- a/controller/config.go +++ b/controller/config.go @@ -8,11 +8,10 @@ import ( "github.com/pkg/errors" ) -const ConfigVersion = 1 +const ConfigVersion = 2 type Config struct { V int - ResetPassword *ResetPasswordConfig Admin *AdminConfig Endpoint *EndpointConfig Email *EmailConfig @@ -21,6 +20,7 @@ type Config struct { Maintenance *MaintenanceConfig Metrics *MetricsConfig Registration *RegistrationConfig + ResetPassword *ResetPasswordConfig Store *store.Config Ziti *ZitiConfig } @@ -39,10 +39,10 @@ type EmailConfig struct { Port int Username string Password string `cf:"+secret"` + From string } type RegistrationConfig struct { - EmailFrom string RegistrationUrlTemplate string TokenStrategy string } diff --git a/controller/resetPasswordEmail.go b/controller/resetPasswordEmail.go index 28f12078..07fce6ba 100644 --- a/controller/resetPasswordEmail.go +++ b/controller/resetPasswordEmail.go @@ -35,7 +35,7 @@ func sendResetPasswordEmail(emailAddress, token string) error { } msg := mail.NewMsg() - if err := msg.From(cfg.Registration.EmailFrom); err != nil { + if err := msg.From(cfg.Email.From); err != nil { return errors.Wrap(err, "failed to set from address in reset password email") } if err := msg.To(emailAddress); err != nil { diff --git a/controller/verifyEmail.go b/controller/verifyEmail.go index 0334a9dc..4d480439 100644 --- a/controller/verifyEmail.go +++ b/controller/verifyEmail.go @@ -34,7 +34,7 @@ func sendVerificationEmail(emailAddress, token string) error { } msg := mail.NewMsg() - if err := msg.From(cfg.Registration.EmailFrom); err != nil { + if err := msg.From(cfg.Email.From); err != nil { return errors.Wrap(err, "failed to set from address in verification email") } if err := msg.To(emailAddress); err != nil {