mirror of
https://github.com/openziti/zrok.git
synced 2024-11-21 23:53:19 +01:00
registration/email_from -> email/from (#178)
This commit is contained in:
parent
1043b16d5d
commit
685683312b
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user