diff --git a/CHANGELOG.md b/CHANGELOG.md index 084e625d..66da40e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ - Fixed `autodate` fields not refreshing when calling `Save` multiple times on the same `Record` instance ([#6000](https://github.com/pocketbase/pocketbase/issues/6000)). +- Added more descriptive test OTP id and failure log message ([#5982](https://github.com/pocketbase/pocketbase/discussions/5982)). + +- Moved the default UI CSP from meta tag to response header ([#5995](https://github.com/pocketbase/pocketbase/discussions/5995)). + ## v0.23.3 diff --git a/forms/test_email_send.go b/forms/test_email_send.go index 5c1d51e7..77da7dca 100644 --- a/forms/test_email_send.go +++ b/forms/test_email_send.go @@ -107,7 +107,7 @@ func (form *TestEmailSend) Submit() error { case TestTemplateEmailChange: return mails.SendRecordChangeEmail(form.app, record, form.Email) case TestTemplateOTP: - return mails.SendRecordOTP(form.app, record, "OTP_ID", "123456") + return mails.SendRecordOTP(form.app, record, "_PB_TEST_OTP_ID_", "123456") case TestTemplateAuthAlert: return mails.SendRecordAuthAlert(form.app, record) default: diff --git a/mails/record.go b/mails/record.go index dacc9511..caf92486 100644 --- a/mails/record.go +++ b/mails/record.go @@ -89,8 +89,8 @@ func SendRecordOTP(app core.App, authRecord *core.Record, otpId string, pass str otp, err := e.App.FindOTPById(otpId) if err != nil { - e.App.Logger().Error( - "Failed to find OTP to update its sentTo field", + e.App.Logger().Warn( + "Unabled to find OTP to update its sentTo field (either it was already deleted or the id is nonexisting)", "error", err, "otpId", otpId, )