emailengine-app 2.80.1 → 2.81.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +44 -0
- package/.github/docker-smoke-test.sh +16 -0
- package/.github/workflows/deploy.yml +4 -0
- package/.github/workflows/release.yaml +4 -0
- package/.github/workflows/test.yml +2 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +39 -0
- package/Dockerfile +17 -9
- package/data/google-crawlers.json +1 -1
- package/docker-compose.yml +7 -1
- package/lib/api-routes/account-routes.js +158 -72
- package/lib/api-routes/permission-map.js +6 -1
- package/lib/autodetect-imap-settings.js +4 -4
- package/lib/sentry.js +13 -2
- package/lib/tls/provision.js +1 -1
- package/lib/token-permission-view.js +8 -7
- package/lib/tools.js +1 -0
- package/lib/ui-routes/account-routes.js +195 -61
- package/lib/ui-routes/admin-entities-routes.js +9 -9
- package/package.json +19 -19
- package/sbom.json +1 -1
- package/static/css/flyonui.css +1 -1
- package/static/css/public.css +41 -0
- package/static/css/src/app.tailwind.css +135 -4
- package/static/js/public.js +218 -0
- package/static/licenses.html +54 -30
- package/translations/README.md +4 -3
- package/translations/de.mo +0 -0
- package/translations/de.po +296 -185
- package/translations/en.po +220 -128
- package/translations/es.mo +0 -0
- package/translations/es.po +558 -0
- package/translations/et.mo +0 -0
- package/translations/et.po +288 -181
- package/translations/fr.mo +0 -0
- package/translations/fr.po +295 -183
- package/translations/it.mo +0 -0
- package/translations/it.po +558 -0
- package/translations/ja.mo +0 -0
- package/translations/ja.po +268 -192
- package/translations/locales.json +24 -0
- package/translations/messages.pot +142 -96
- package/translations/nl.mo +0 -0
- package/translations/nl.po +288 -175
- package/translations/pl.mo +0 -0
- package/translations/pl.po +294 -181
- package/translations/sv.mo +0 -0
- package/translations/sv.po +555 -0
- package/translations/tr.mo +0 -0
- package/translations/tr.po +555 -0
- package/update-info.sh +12 -6
- package/views/account/login-redirect.hbs +6 -5
- package/views/account/passkeys.hbs +6 -6
- package/views/account/security.hbs +2 -2
- package/views/accounts/account.hbs +17 -19
- package/views/accounts/edit.hbs +14 -14
- package/views/accounts/index.hbs +3 -3
- package/views/accounts/register/imap-server.hbs +26 -172
- package/views/accounts/register/validating.hbs +139 -0
- package/views/config/ai.hbs +14 -16
- package/views/config/branding.hbs +5 -5
- package/views/config/document-store/chat.hbs +8 -7
- package/views/config/document-store/index.hbs +13 -14
- package/views/config/document-store/mappings/index.hbs +5 -6
- package/views/config/document-store/mappings/new.hbs +1 -2
- package/views/config/document-store/pre-processing/index.hbs +4 -4
- package/views/config/email-processing.hbs +6 -6
- package/views/config/imap-proxy.hbs +6 -7
- package/views/config/license.hbs +8 -8
- package/views/config/logging.hbs +5 -7
- package/views/config/mcp.hbs +14 -18
- package/views/config/network.hbs +3 -3
- package/views/config/oauth/app.hbs +10 -10
- package/views/config/oauth/index.hbs +6 -6
- package/views/config/oauth/subscriptions.hbs +9 -9
- package/views/config/security.hbs +5 -7
- package/views/config/service.hbs +10 -9
- package/views/config/smtp.hbs +8 -11
- package/views/config/tls-upload.hbs +3 -3
- package/views/config/tls.hbs +33 -35
- package/views/config/webhooks.hbs +10 -13
- package/views/dashboard.hbs +9 -8
- package/views/gateways/edit.hbs +3 -3
- package/views/gateways/gateway.hbs +3 -3
- package/views/gateways/index.hbs +6 -6
- package/views/gateways/new.hbs +3 -3
- package/views/internals/index.hbs +14 -12
- package/views/layout/login.hbs +27 -14
- package/views/layout/prompt.hbs +12 -15
- package/views/mcp/authorize.hbs +1 -1
- package/views/partials/accounts_table.hbs +5 -5
- package/views/partials/add_account_modal.hbs +3 -3
- package/views/partials/address_list.hbs +4 -4
- package/views/partials/gateway_form.hbs +5 -5
- package/views/partials/mcp_account_limit.hbs +2 -2
- package/views/partials/oauth_config_header.hbs +2 -2
- package/views/partials/oauth_form.hbs +36 -41
- package/views/partials/public_alerts.hbs +1 -1
- package/views/partials/public_test_labels.hbs +15 -0
- package/views/partials/security_header.hbs +2 -2
- package/views/partials/template_form.hbs +3 -3
- package/views/partials/tls_security_card.hbs +4 -1
- package/views/partials/ui/form-field.hbs +6 -1
- package/views/partials/ui/setting-ref.hbs +12 -7
- package/views/partials/ui/stat-card.hbs +4 -1
- package/views/partials/ui/tabs.hbs +3 -7
- package/views/partials/webhook_form.hbs +9 -12
- package/views/reference/index.hbs +2 -2
- package/views/reference/token.hbs +3 -3
- package/views/suppression-lists/index.hbs +8 -6
- package/views/suppression-lists/list.hbs +13 -8
- package/views/templates/edit.hbs +1 -1
- package/views/templates/index.hbs +10 -11
- package/views/templates/template.hbs +4 -4
- package/views/tokens/index.hbs +17 -17
- package/views/tokens/new.hbs +18 -22
- package/views/webhooks/edit.hbs +1 -1
- package/views/webhooks/index.hbs +10 -11
- package/views/webhooks/new.hbs +1 -1
- package/views/webhooks/webhook.hbs +4 -5
|
@@ -661,6 +661,31 @@ function init(args) {
|
|
|
661
661
|
.label('SMTP TLS')
|
|
662
662
|
};
|
|
663
663
|
|
|
664
|
+
// The names above, in declaration order, for the checking page's hidden inputs - so the field set
|
|
665
|
+
// it posts is the one this schema declares rather than a second copy written out in the template.
|
|
666
|
+
const connectionFieldNames = Object.keys(connectionFields);
|
|
667
|
+
|
|
668
|
+
// Values validated against the fields above, ignoring everything else the form values carry
|
|
669
|
+
// (the signed blob, the address, the typed password, the app-password hint).
|
|
670
|
+
const connectionFieldsSchema = Joi.object(connectionFields).unknown();
|
|
671
|
+
|
|
672
|
+
// Whether autodiscovery gave the form enough to configure an account without asking the visitor
|
|
673
|
+
// for anything more. Two decisions read it: the settings page auto-runs its connection check on
|
|
674
|
+
// load, and a setup link issued with skipServerSettings skips that page altogether. One answer,
|
|
675
|
+
// because the skip turns a wrong one into an account created from settings nobody looked at.
|
|
676
|
+
//
|
|
677
|
+
// Asked of the schema rather than of a hand-kept list of required names - the shape that has to
|
|
678
|
+
// be kept in sync by hand, and the reason rebuildFormValues above rebuilds from the schema too.
|
|
679
|
+
// So "complete" means exactly "the create endpoint would accept this": a field added or made
|
|
680
|
+
// required there moves both decisions with it, and a discovered value the schema rejects (an
|
|
681
|
+
// address literal where a hostname is required) falls back to the form rather than skipping
|
|
682
|
+
// ahead to a submit that would 400.
|
|
683
|
+
//
|
|
684
|
+
// `_source` is the part no schema can answer. The usernames and passwords are filled in from
|
|
685
|
+
// what the visitor typed whatever autodiscovery found, so without it a domain that resolved to
|
|
686
|
+
// nothing would look complete on the strength of the password alone.
|
|
687
|
+
const hasCompleteServerSettings = values => !!(values && values._source) && !connectionFieldsSchema.validate(values, { convert: true }).error;
|
|
688
|
+
|
|
664
689
|
// Rebuild safe re-render values from the SAME schema that validated the submission: convert coerces the
|
|
665
690
|
// tri-state TLS/disabled checkboxes to real booleans (so {{#if values.X}} cannot re-check a box from the
|
|
666
691
|
// string 'false'), and stripUnknown drops unexpected / prototype keys (and the appPassword_* hint fields)
|
|
@@ -726,6 +751,71 @@ function init(args) {
|
|
|
726
751
|
return data;
|
|
727
752
|
};
|
|
728
753
|
|
|
754
|
+
// Re-derive the app-password hint for a settings form that is being rendered from posted values
|
|
755
|
+
// rather than from a fresh autodiscovery result, and merge it into those values.
|
|
756
|
+
//
|
|
757
|
+
// serverFormSchema does not carry the appPassword_* fields (they feed unescaped template sinks),
|
|
758
|
+
// so stripUnknown drops them and they cannot be carried in a hidden input - echoing a
|
|
759
|
+
// client-controlled hint into the page was an XSS vector. The hint is therefore rebuilt here from
|
|
760
|
+
// the (trusted) email, out of a static table, never from the submitted payload.
|
|
761
|
+
//
|
|
762
|
+
// Shared by the failAction re-render and by the checking page's hand-off to the settings form, so
|
|
763
|
+
// a form reached either way shows the same "Application Password" label and instructions.
|
|
764
|
+
//
|
|
765
|
+
// Try the static domain table first: it is synchronous, needs no network, and covers the
|
|
766
|
+
// canonical provider domains, so a common-domain render costs no Redis round trips, no DNS, and
|
|
767
|
+
// no probe budget. Never throws - the hint is cosmetic and a failAction must not throw.
|
|
768
|
+
const applyAppPasswordHint = async (values, request, parsedBlob) => {
|
|
769
|
+
if (!values.email) {
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
let appPassword = getAppPassword(values.email, false, request.app.gt);
|
|
774
|
+
|
|
775
|
+
// Custom-domain fallback (e.g. Google Workspace / M365 on their own domain) needs an MX
|
|
776
|
+
// lookup. failAction runs BEFORE the handler's signature gate, and the lookup drives outbound
|
|
777
|
+
// DNS, so gate it with the SAME machinery as the handler siblings, not a bare signature
|
|
778
|
+
// check: authorizeSignedProbe rejects a signature-only blob (e.g. a leaked tracking/
|
|
779
|
+
// unsubscribe blob) and one past its TTL, and bounds how many lookups one signed link can
|
|
780
|
+
// drive. Without it, any holder of any validly-signed blob could turn this render into an
|
|
781
|
+
// unbounded DNS oracle. On a normal validation-error re-render the nonce is not yet consumed
|
|
782
|
+
// (the create handler claims it only on success), so the hint still shows. values.data /
|
|
783
|
+
// values.sig are the schema-validated copies - rebuildFormValues drops them when malformed
|
|
784
|
+
// (e.g. duplicated fields).
|
|
785
|
+
if (!appPassword && values.data && values.sig) {
|
|
786
|
+
// Consult the per-domain memo BEFORE the probe/DNS work: a repeat re-submit of the same
|
|
787
|
+
// email must not re-run the MX lookup or draw the probe budget again.
|
|
788
|
+
const domain = values.email.split('@').pop().trim().toLowerCase();
|
|
789
|
+
const cached = getCachedAppPasswordHint(domain);
|
|
790
|
+
if (cached) {
|
|
791
|
+
appPassword = cached.value;
|
|
792
|
+
} else {
|
|
793
|
+
try {
|
|
794
|
+
if (parsedBlob) {
|
|
795
|
+
// Already parsed and signature-checked by the caller, so only the cap is left
|
|
796
|
+
// to apply - re-parsing would mean a second serviceSecret read and HMAC check
|
|
797
|
+
await enforceFormProbeLimit(parsedBlob.n, request.app.gt, request.logger);
|
|
798
|
+
} else {
|
|
799
|
+
await authorizeSignedProbe({ data: values.data, sig: values.sig }, request.app.gt, request.logger);
|
|
800
|
+
}
|
|
801
|
+
appPassword = await resolveAppPassword(values.email, request.app.gt);
|
|
802
|
+
// Cache the outcome (including a falsy "no hint" result) so subsequent renders for
|
|
803
|
+
// this domain are free.
|
|
804
|
+
setCachedAppPasswordHint(domain, appPassword);
|
|
805
|
+
} catch (err) {
|
|
806
|
+
// A rejected/expired blob, an exhausted probe cap, or a lookup failure must never
|
|
807
|
+
// break the render. Do NOT cache on failure - an exhausted probe cap or transient
|
|
808
|
+
// DNS error should not poison the hint for the whole TTL.
|
|
809
|
+
request.logger.debug({ msg: 'Failed to resolve app-password hint for form re-render', err });
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
if (appPassword) {
|
|
815
|
+
Object.assign(values, flattenObjectKeys({ appPassword }));
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
|
|
729
819
|
// The expectation that applies to a parsed form blob (lib/account/expected-identity.js owns the
|
|
730
820
|
// precedence and the lazy Redis fallback).
|
|
731
821
|
const resolveFormExpectation = data => resolveExpectedIdentity(redis, { account: data.account, blobExpectation: data.expectedEmail });
|
|
@@ -820,6 +910,39 @@ function init(args) {
|
|
|
820
910
|
values.imap_auth_pass = request.payload.password;
|
|
821
911
|
values.smtp_auth_pass = request.payload.password;
|
|
822
912
|
|
|
913
|
+
// Autodiscovery has already answered the app-password question for this domain, so record
|
|
914
|
+
// it for the renders that cannot compute it from a static table: the failAction re-render
|
|
915
|
+
// and the checking page's hand-off both reach applyAppPasswordHint with nothing but the
|
|
916
|
+
// address, and would otherwise repeat the MX lookup this result came with. Only a positive
|
|
917
|
+
// answer is recorded - a miss here is not authoritative, since the MX-success branch
|
|
918
|
+
// resolves the hint without knowing whether the domain is an Exchange one.
|
|
919
|
+
if (serverSettings && serverSettings.appPassword) {
|
|
920
|
+
setCachedAppPasswordHint(request.payload.email.split('@').pop().trim().toLowerCase(), serverSettings.appPassword);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
// Nothing is left for the user to fill in: the settings page would auto-verify what is
|
|
924
|
+
// already there and wait for a click. hasCompleteServerSettings() (above, beside
|
|
925
|
+
// connectionFields) is what both that auto-verify and the skip below agree on.
|
|
926
|
+
const settingsComplete = hasCompleteServerSettings(values);
|
|
927
|
+
|
|
928
|
+
if (settingsComplete && data.skipServerSettings) {
|
|
929
|
+
// The setup link asked for the server settings step to be skipped where possible.
|
|
930
|
+
// The page checks the connection and, when it holds, submits the same value set the
|
|
931
|
+
// settings form would have submitted; a failed check hands the user that form after
|
|
932
|
+
// all, so the skip can never end the setup on its own.
|
|
933
|
+
return h.view(
|
|
934
|
+
'accounts/register/validating',
|
|
935
|
+
{
|
|
936
|
+
pageTitleFull: request.app.gt.gettext('Email Account Setup'),
|
|
937
|
+
values,
|
|
938
|
+
connectionFieldNames
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
layout: 'public'
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
|
|
823
946
|
return h.view(
|
|
824
947
|
'accounts/register/imap-server',
|
|
825
948
|
{
|
|
@@ -829,17 +952,7 @@ function init(args) {
|
|
|
829
952
|
// page says why rather than looking like a form that forgot its defaults
|
|
830
953
|
autodetectFailed: !serverSettings,
|
|
831
954
|
autodetectDomain: request.payload.email.split('@').pop(),
|
|
832
|
-
autoTest:
|
|
833
|
-
values._source &&
|
|
834
|
-
values.imap_auth_user &&
|
|
835
|
-
values.smtp_auth_user &&
|
|
836
|
-
values.imap_auth_pass &&
|
|
837
|
-
values.smtp_auth_pass &&
|
|
838
|
-
values.imap_host &&
|
|
839
|
-
values.smtp_host &&
|
|
840
|
-
values.imap_port &&
|
|
841
|
-
values.smtp_port &&
|
|
842
|
-
true
|
|
955
|
+
autoTest: settingsComplete
|
|
843
956
|
},
|
|
844
957
|
{
|
|
845
958
|
layout: 'public'
|
|
@@ -1071,6 +1184,73 @@ function init(args) {
|
|
|
1071
1184
|
...connectionFields
|
|
1072
1185
|
});
|
|
1073
1186
|
|
|
1187
|
+
// Where the checking page sends the user when the connection check did not pass: the ordinary
|
|
1188
|
+
// server settings form, prefilled with everything that was discovered and typed, so the one wrong
|
|
1189
|
+
// field can be corrected. Signature-gated like its siblings because it renders submitted values
|
|
1190
|
+
// back into a page. Rendering it drives no outbound connection of its own, so the gate here is
|
|
1191
|
+
// the signature and the nonce rather than authorizeSignedProbe; the one thing that can still
|
|
1192
|
+
// reach the network is the app-password hint's MX lookup, which draws on the per-nonce probe
|
|
1193
|
+
// budget itself and normally answers from the memo page 1 seeded.
|
|
1194
|
+
server.route({
|
|
1195
|
+
method: 'POST',
|
|
1196
|
+
path: '/accounts/new/imap/settings',
|
|
1197
|
+
|
|
1198
|
+
async handler(request, h) {
|
|
1199
|
+
const data = await parseSignedFormData(redis, request.payload, request.app.gt, { requireNonce: true });
|
|
1200
|
+
|
|
1201
|
+
// Rebuilt from the same schema that validated the submission, exactly as the failAction
|
|
1202
|
+
// re-renders do: coerced tri-state checkboxes, no unknown or prototype keys. The two
|
|
1203
|
+
// passwords are kept rather than dropped - they are what the user typed one step ago and
|
|
1204
|
+
// the form has to come up filled in, the same as it would have been had this page been
|
|
1205
|
+
// rendered directly.
|
|
1206
|
+
const values = rebuildFormValues(serverFormSchema, request.payload);
|
|
1207
|
+
await applyAppPasswordHint(values, request, data);
|
|
1208
|
+
|
|
1209
|
+
return h.view(
|
|
1210
|
+
'accounts/register/imap-server',
|
|
1211
|
+
{
|
|
1212
|
+
pageTitleFull: request.app.gt.gettext('Email Account Setup'),
|
|
1213
|
+
values,
|
|
1214
|
+
// The checking page says a connection failed, so the form opens by saying why it
|
|
1215
|
+
// is being asked for rather than looking like a step that appeared from nowhere.
|
|
1216
|
+
// The detail stays on the page the visitor read it on; this is the reminder. The
|
|
1217
|
+
// no-script Continue and the manual escape from a slow check arrive without it,
|
|
1218
|
+
// because no check ran for them and neither must claim one failed.
|
|
1219
|
+
checkFailed: request.query.checkFailed,
|
|
1220
|
+
// The check just failed, so do not repeat it on load: the page opens on the fields
|
|
1221
|
+
// to correct rather than on a spinner about to give the same answer.
|
|
1222
|
+
autoTest: false
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
layout: 'public'
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
},
|
|
1229
|
+
|
|
1230
|
+
options: {
|
|
1231
|
+
auth: false,
|
|
1232
|
+
|
|
1233
|
+
validate: {
|
|
1234
|
+
options: {
|
|
1235
|
+
stripUnknown: true,
|
|
1236
|
+
abortEarly: false,
|
|
1237
|
+
convert: true
|
|
1238
|
+
},
|
|
1239
|
+
|
|
1240
|
+
failAction,
|
|
1241
|
+
|
|
1242
|
+
// Cosmetic and client-set: it chooses which sentence the page opens with and nothing
|
|
1243
|
+
// else, so it rides the action URL rather than widening a payload schema that carries
|
|
1244
|
+
// two plaintext passwords.
|
|
1245
|
+
query: Joi.object({
|
|
1246
|
+
checkFailed: Joi.boolean().truthy('1').falsy('', '0').default(false)
|
|
1247
|
+
}),
|
|
1248
|
+
|
|
1249
|
+
payload: serverFormSchema
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
|
|
1074
1254
|
server.route({
|
|
1075
1255
|
method: 'POST',
|
|
1076
1256
|
path: '/accounts/new/imap/server',
|
|
@@ -1212,56 +1392,10 @@ function init(args) {
|
|
|
1212
1392
|
// passwords) - see rebuildFormValues.
|
|
1213
1393
|
const values = rebuildFormValues(serverFormSchema, request.payload, ['imap_auth_pass', 'smtp_auth_pass']);
|
|
1214
1394
|
|
|
1215
|
-
//
|
|
1216
|
-
//
|
|
1217
|
-
//
|
|
1218
|
-
|
|
1219
|
-
// from the submitted payload, so they are safe to render.
|
|
1220
|
-
//
|
|
1221
|
-
// Try the static domain table first: it is synchronous, needs no network, and covers the
|
|
1222
|
-
// canonical provider domains, so a common-domain re-render costs no Redis round trips, no
|
|
1223
|
-
// DNS, and no probe budget.
|
|
1224
|
-
if (values.email) {
|
|
1225
|
-
let appPassword = getAppPassword(values.email, false, request.app.gt);
|
|
1226
|
-
|
|
1227
|
-
// Custom-domain fallback (e.g. Google Workspace / M365 on their own domain) needs an
|
|
1228
|
-
// MX lookup. failAction runs BEFORE the handler's signature gate, and the lookup
|
|
1229
|
-
// drives outbound DNS, so gate it with the SAME machinery as the handler siblings, not
|
|
1230
|
-
// a bare signature check: authorizeSignedProbe rejects a signature-only blob (e.g. a
|
|
1231
|
-
// leaked tracking/unsubscribe blob) and one past its TTL, and bounds how many lookups
|
|
1232
|
-
// one signed link can drive. Without it, any holder of any validly-signed blob could
|
|
1233
|
-
// turn this re-render into an unbounded DNS oracle. On a normal validation-error
|
|
1234
|
-
// re-render the nonce is not yet consumed (the handler claims it only on success), so
|
|
1235
|
-
// the hint still shows. values.data/values.sig are the schema-validated copies -
|
|
1236
|
-
// rebuildFormValues drops them when malformed (e.g. duplicated fields).
|
|
1237
|
-
if (!appPassword && values.data && values.sig) {
|
|
1238
|
-
// Consult the per-domain memo BEFORE the probe/DNS work: a repeat re-submit of
|
|
1239
|
-
// the same email must not re-run the MX lookup or draw the probe budget again.
|
|
1240
|
-
const domain = values.email.split('@').pop().trim().toLowerCase();
|
|
1241
|
-
const cached = getCachedAppPasswordHint(domain);
|
|
1242
|
-
if (cached) {
|
|
1243
|
-
appPassword = cached.value;
|
|
1244
|
-
} else {
|
|
1245
|
-
try {
|
|
1246
|
-
await authorizeSignedProbe({ data: values.data, sig: values.sig }, request.app.gt, request.logger);
|
|
1247
|
-
appPassword = await resolveAppPassword(values.email, request.app.gt);
|
|
1248
|
-
// Cache the outcome (including a falsy "no hint" result) so subsequent
|
|
1249
|
-
// re-renders for this domain are free.
|
|
1250
|
-
setCachedAppPasswordHint(domain, appPassword);
|
|
1251
|
-
} catch (err) {
|
|
1252
|
-
// The hint is cosmetic; a rejected/expired blob, an exhausted probe cap, or a
|
|
1253
|
-
// lookup failure must never break the error re-render (failAction must not throw).
|
|
1254
|
-
// Do NOT cache on failure - an exhausted probe cap or transient DNS error should
|
|
1255
|
-
// not poison the hint for the whole TTL.
|
|
1256
|
-
request.logger.debug({ msg: 'Failed to resolve app-password hint for form re-render', err });
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
if (appPassword) {
|
|
1262
|
-
Object.assign(values, flattenObjectKeys({ appPassword }));
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1395
|
+
// The hint fields are not carried by the schema, so rebuild them from the email
|
|
1396
|
+
// (see applyAppPasswordHint) - otherwise a Gmail or iCloud re-render loses the
|
|
1397
|
+
// "Application Password" label and the instructions link.
|
|
1398
|
+
await applyAppPasswordHint(values, request);
|
|
1265
1399
|
|
|
1266
1400
|
return h
|
|
1267
1401
|
.view(
|
|
@@ -306,10 +306,10 @@ return payload;`)
|
|
|
306
306
|
}
|
|
307
307
|
);
|
|
308
308
|
|
|
309
|
-
await request.flash({ type: 'info', message: `Webhook created` });
|
|
309
|
+
await request.flash({ type: 'info', message: `Webhook route created` });
|
|
310
310
|
return h.redirect(adminUrl`/admin/webhooks/webhook/${createRequest.id}`);
|
|
311
311
|
} catch (err) {
|
|
312
|
-
await request.flash({ type: 'danger', message: `Couldn't create webhook. Try again.` });
|
|
312
|
+
await request.flash({ type: 'danger', message: `Couldn't create webhook route. Try again.` });
|
|
313
313
|
request.logger.error({ msg: 'Failed to create webhook route', err });
|
|
314
314
|
|
|
315
315
|
return h.view(
|
|
@@ -349,7 +349,7 @@ return payload;`)
|
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
await request.flash({ type: 'danger', message: `Couldn't create webhook. Try again.` });
|
|
352
|
+
await request.flash({ type: 'danger', message: `Couldn't create webhook route. Try again.` });
|
|
353
353
|
request.logger.debug({ msg: 'Failed to create webhook route', err });
|
|
354
354
|
|
|
355
355
|
return h
|
|
@@ -621,10 +621,10 @@ return payload;`)
|
|
|
621
621
|
}
|
|
622
622
|
);
|
|
623
623
|
|
|
624
|
-
await request.flash({ type: 'info', message: `Webhook saved` });
|
|
624
|
+
await request.flash({ type: 'info', message: `Webhook route saved` });
|
|
625
625
|
return h.redirect(adminUrl`/admin/webhooks/webhook/${request.payload.webhook}`);
|
|
626
626
|
} catch (err) {
|
|
627
|
-
await request.flash({ type: 'danger', message: `Couldn't save webhook. Try again.` });
|
|
627
|
+
await request.flash({ type: 'danger', message: `Couldn't save webhook route. Try again.` });
|
|
628
628
|
request.logger.error({ msg: 'Failed to update webhook route', err });
|
|
629
629
|
|
|
630
630
|
let webhook = await webhooks.get(request.payload.webhook);
|
|
@@ -673,7 +673,7 @@ return payload;`)
|
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
-
await request.flash({ type: 'danger', message: `Couldn't save webhook. Try again.` });
|
|
676
|
+
await request.flash({ type: 'danger', message: `Couldn't save webhook route. Try again.` });
|
|
677
677
|
request.logger.debug({ msg: 'Failed to update webhook route', err });
|
|
678
678
|
|
|
679
679
|
let webhook = await webhooks.get(request.payload.webhook);
|
|
@@ -764,13 +764,13 @@ return payload;`)
|
|
|
764
764
|
try {
|
|
765
765
|
await webhooks.del(request.payload.webhook);
|
|
766
766
|
|
|
767
|
-
await request.flash({ type: 'info', message: `Webhook deleted` });
|
|
767
|
+
await request.flash({ type: 'info', message: `Webhook route deleted` });
|
|
768
768
|
|
|
769
769
|
let accountWebhooksLink = new URL('/admin/webhooks', 'http://localhost');
|
|
770
770
|
|
|
771
771
|
return h.redirect(accountWebhooksLink.pathname + accountWebhooksLink.search);
|
|
772
772
|
} catch (err) {
|
|
773
|
-
await request.flash({ type: 'danger', message: `Couldn't delete webhook. Try again.` });
|
|
773
|
+
await request.flash({ type: 'danger', message: `Couldn't delete webhook route. Try again.` });
|
|
774
774
|
request.logger.error({ msg: 'Failed to delete webhook route', err, webhook: request.payload.webhook, remoteAddress: request.app.ip });
|
|
775
775
|
return h.redirect(adminUrl`/admin/webhooks/webhook/${request.payload.webhook}`);
|
|
776
776
|
}
|
|
@@ -784,7 +784,7 @@ return payload;`)
|
|
|
784
784
|
},
|
|
785
785
|
|
|
786
786
|
async failAction(request, h, err) {
|
|
787
|
-
await request.flash({ type: 'danger', message: `Couldn't delete webhook. Try again.` });
|
|
787
|
+
await request.flash({ type: 'danger', message: `Couldn't delete webhook route. Try again.` });
|
|
788
788
|
request.logger.debug({ msg: 'Failed to delete webhook route', err });
|
|
789
789
|
|
|
790
790
|
return h.redirect('/admin/webhooks').takeover();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailengine-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"productTitle": "EmailEngine",
|
|
6
6
|
"description": "Email Sync Engine",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://emailengine.app/",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@bull-board/api": "9.10.
|
|
55
|
-
"@bull-board/hapi": "9.10.
|
|
54
|
+
"@bull-board/api": "9.10.1",
|
|
55
|
+
"@bull-board/hapi": "9.10.1",
|
|
56
56
|
"@elastic/elasticsearch": "8.15.3",
|
|
57
57
|
"@hapi/accept": "6.0.3",
|
|
58
58
|
"@hapi/bell": "13.2.0",
|
|
@@ -65,24 +65,24 @@
|
|
|
65
65
|
"@msgpack/msgpack": "3.1.3",
|
|
66
66
|
"@phc/pbkdf2": "1.1.14",
|
|
67
67
|
"@postalsys/bounce-classifier": "3.0.0",
|
|
68
|
-
"@postalsys/certs": "1.4.
|
|
68
|
+
"@postalsys/certs": "1.4.2",
|
|
69
69
|
"@postalsys/ee-client": "1.8.0",
|
|
70
|
-
"@postalsys/email-ai-tools": "1.14.
|
|
71
|
-
"@postalsys/email-content": "0.1.
|
|
70
|
+
"@postalsys/email-ai-tools": "1.14.9",
|
|
71
|
+
"@postalsys/email-content": "0.1.7",
|
|
72
72
|
"@postalsys/email-text-tools": "2.4.16",
|
|
73
73
|
"@postalsys/gettext": "4.1.1",
|
|
74
|
-
"@postalsys/joi-messages": "1.0
|
|
74
|
+
"@postalsys/joi-messages": "1.3.0",
|
|
75
75
|
"@postalsys/templates": "2.0.2",
|
|
76
76
|
"@sentry/node": "10.74.0",
|
|
77
77
|
"@simplewebauthn/browser": "14.0.0",
|
|
78
|
-
"@simplewebauthn/server": "14.0.
|
|
79
|
-
"@zone-eu/mailsplit": "5.4.
|
|
78
|
+
"@simplewebauthn/server": "14.0.2",
|
|
79
|
+
"@zone-eu/mailsplit": "5.4.17",
|
|
80
80
|
"@zone-eu/wild-config": "1.7.6",
|
|
81
81
|
"ace-builds": "1.44.0",
|
|
82
|
-
"bullmq": "6.3.
|
|
82
|
+
"bullmq": "6.3.6",
|
|
83
83
|
"compare-versions": "6.1.1",
|
|
84
84
|
"dotenv": "17.4.2",
|
|
85
|
-
"encoding-japanese": "2.
|
|
85
|
+
"encoding-japanese": "2.4.0",
|
|
86
86
|
"exponential-backoff": "3.1.3",
|
|
87
87
|
"fast-xml-parser": "5.11.1",
|
|
88
88
|
"gettext-parser": "7.0.1",
|
|
@@ -93,27 +93,27 @@
|
|
|
93
93
|
"html-to-text": "10.0.1",
|
|
94
94
|
"ical.js": "1.5.0",
|
|
95
95
|
"iconv-lite": "0.7.3",
|
|
96
|
-
"imapflow": "2.0.
|
|
96
|
+
"imapflow": "2.0.5",
|
|
97
97
|
"ioredfour": "1.4.3",
|
|
98
98
|
"ioredis": "6.0.0",
|
|
99
99
|
"ipaddr.js": "2.5.0",
|
|
100
|
-
"joi": "18.2.
|
|
100
|
+
"joi": "18.2.9",
|
|
101
101
|
"libbase64": "1.3.0",
|
|
102
|
-
"libmime": "5.4.
|
|
102
|
+
"libmime": "5.4.4",
|
|
103
103
|
"libqp": "2.1.1",
|
|
104
|
-
"mailparser": "3.9.
|
|
104
|
+
"mailparser": "3.9.28",
|
|
105
105
|
"marked": "15.0.12",
|
|
106
106
|
"minimist": "1.2.8",
|
|
107
107
|
"murmurhash": "2.0.1",
|
|
108
|
-
"nanoid": "3.3.
|
|
109
|
-
"nodemailer": "10.0.
|
|
108
|
+
"nanoid": "3.3.19",
|
|
109
|
+
"nodemailer": "10.0.10",
|
|
110
110
|
"pino": "10.3.1",
|
|
111
111
|
"prom-client": "15.1.3",
|
|
112
112
|
"psl": "1.15.0",
|
|
113
|
-
"pubface": "1.1.
|
|
113
|
+
"pubface": "1.1.16",
|
|
114
114
|
"punycode.js": "2.3.1",
|
|
115
115
|
"qrcode": "1.5.4",
|
|
116
|
-
"smtp-server": "3.19.
|
|
116
|
+
"smtp-server": "3.19.13",
|
|
117
117
|
"socks": "2.8.10",
|
|
118
118
|
"timezones-list": "3.1.0",
|
|
119
119
|
"undici": "7.29.1"
|