diff --git a/internal/applicant/applicant.go b/internal/applicant/applicant.go index c565e1ff..5acc8800 100644 --- a/internal/applicant/applicant.go +++ b/internal/applicant/applicant.go @@ -47,7 +47,7 @@ type applicantOptions struct { DnsPropagationTimeout int32 DnsTTL int32 DisableFollowCNAME bool - ReplacedARIAccount string + ReplacedARIAcctId string ReplacedARICertId string } @@ -93,7 +93,7 @@ func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) { lastCertX509, _ := certcrypto.ParsePEMCertificate([]byte(lastCertificate.Certificate)) if lastCertX509 != nil { replacedARICertId, _ := certificate.MakeARICertID(lastCertX509) - options.ReplacedARIAccount = lastCertificate.ACMEAccountUrl + options.ReplacedARIAcctId = lastCertificate.ACMEAccountUrl options.ReplacedARICertId = replacedARICertId } } @@ -170,7 +170,7 @@ func apply(challengeProvider challenge.Provider, options *applicantOptions) (*Ap Domains: options.Domains, Bundle: true, } - if options.ReplacedARICertId != "" && options.ReplacedARIAccount != acmeUser.Registration.URI { + if options.ReplacedARICertId != "" && options.ReplacedARIAcctId != acmeUser.Registration.URI { certRequest.ReplacesCertID = options.ReplacedARICertId } certResource, err := client.Certificate.Obtain(certRequest) diff --git a/ui/src/pages/settings/SettingsPassword.tsx b/ui/src/pages/settings/SettingsPassword.tsx index 59447be7..de1cb5ef 100644 --- a/ui/src/pages/settings/SettingsPassword.tsx +++ b/ui/src/pages/settings/SettingsPassword.tsx @@ -34,7 +34,7 @@ const SettingsPassword = () => { onSubmit: async (values) => { try { await authWithPassword(getAuthStore().record!.email, values.oldPassword); - await saveAdmin({ password: values.newPassword }); + await saveAdmin({ password: values.newPassword, passwordConfirm: values.confirmPassword }); messageApi.success(t("common.text.operation_succeeded")); diff --git a/ui/src/repository/admin.ts b/ui/src/repository/admin.ts index 15074fee..1d43eca0 100644 --- a/ui/src/repository/admin.ts +++ b/ui/src/repository/admin.ts @@ -10,7 +10,7 @@ export const getAuthStore = () => { return getPocketBase().authStore; }; -export const save = (data: { email: string } | { password: string }) => { +export const save = (data: { email: string } | { password: string; passwordConfirm: string }) => { return getPocketBase() .collection(COLLECTION_NAME) .update(getAuthStore().record?.id || "", data);