emailengine-app 2.79.8 → 2.79.9
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/.github/dependabot.yml +22 -0
- package/.github/workflows/test.yml +39 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/DOCKER_DEPLOYMENT.md +6 -7
- package/Dockerfile +35 -11
- package/config/default.toml +2 -1
- package/copy-static-files.sh +23 -5
- package/data/google-crawlers.json +1 -1
- package/lib/account.js +26 -1
- package/lib/api-routes/bull-board-routes.js +3 -2
- package/lib/api-routes/route-helpers.js +8 -0
- package/lib/auth-token.js +73 -2
- package/lib/autodetect-imap-settings.js +33 -25
- package/lib/consts.js +8 -1
- package/lib/egress-fetch.js +133 -0
- package/lib/export.js +35 -2
- package/lib/handlebars-helpers.js +129 -0
- package/lib/imap-proxy-auth.js +41 -21
- package/lib/imapproxy/imap-core/README.md +1 -0
- package/lib/imapproxy/imap-core/lib/tls-options.js +5 -46
- package/lib/imapproxy/imap-server.js +9 -10
- package/lib/openapi/index.js +3 -0
- package/lib/outbox.js +28 -3
- package/lib/rate-limit.js +23 -4
- package/lib/schemas.js +10 -3
- package/lib/security-headers.js +396 -0
- package/lib/sentry.js +36 -4
- package/lib/smtp-auth.js +86 -7
- package/lib/tools.js +265 -120
- package/lib/ui-routes/account-routes.js +4 -3
- package/lib/ui-routes/export-routes.js +4 -0
- package/lib/ui-routes/mcp-consent-routes.js +7 -0
- package/lib/ui-routes/network-config-routes.js +4 -3
- package/lib/ui-routes/route-helpers.js +24 -8
- package/lib/ui-routes/smtp-test-routes.js +7 -0
- package/lib/webhook-egress.js +5 -0
- package/package.json +21 -24
- package/sbom.json +1 -1
- package/server.js +37 -36
- package/static/js/ace/css/ace.css +1462 -0
- package/static/js/ace/css/kuroir-1.png +0 -0
- package/static/js/ace/css/kuroir-2.png +0 -0
- package/static/js/ace/css/main-1.png +0 -0
- package/static/js/ace/css/main-10.svg +4 -0
- package/static/js/ace/css/main-11.svg +5 -0
- package/static/js/ace/css/main-12.svg +4 -0
- package/static/js/ace/css/main-13.png +0 -0
- package/static/js/ace/css/main-14.png +0 -0
- package/static/js/ace/css/main-15.png +0 -0
- package/static/js/ace/css/main-16.png +0 -0
- package/static/js/ace/css/main-17.png +0 -0
- package/static/js/ace/css/main-18.png +0 -0
- package/static/js/ace/css/main-19.png +0 -0
- package/static/js/ace/css/main-2.png +0 -0
- package/static/js/ace/css/main-20.png +0 -0
- package/static/js/ace/css/main-21.png +0 -0
- package/static/js/ace/css/main-22.png +0 -0
- package/static/js/ace/css/main-23.png +0 -0
- package/static/js/ace/css/main-24.png +0 -0
- package/static/js/ace/css/main-25.svg +1 -0
- package/static/js/ace/css/main-26.png +0 -0
- package/static/js/ace/css/main-3.png +0 -0
- package/static/js/ace/css/main-4.png +0 -0
- package/static/js/ace/css/main-5.svg +7 -0
- package/static/js/ace/css/main-6.svg +9 -0
- package/static/js/ace/css/main-7.svg +7 -0
- package/static/js/ace/css/main-8.svg +9 -0
- package/static/js/ace/css/main-9.svg +6 -0
- package/static/js/ace/css/theme/kuroir.css +78 -0
- package/static/js/ace/css/theme/tomorrow_night.css +128 -0
- package/static/js/ace/css/theme/tomorrow_night_eighties.css +128 -0
- package/static/js/ace/css/theme/xcode.css +106 -0
- package/static/js/ace/css/tomorrow_night-1.png +0 -0
- package/static/js/ace/css/tomorrow_night-2.png +0 -0
- package/static/js/ace/css/tomorrow_night_eighties-1.png +0 -0
- package/static/js/ace/css/tomorrow_night_eighties-2.png +0 -0
- package/static/js/ace/css/xcode-1.png +0 -0
- package/static/js/ace/css/xcode-2.png +0 -0
- package/static/js/ee-client.js +256 -102
- package/static/js/public.js +7 -0
- package/static/js/ui.js +32 -0
- package/static/licenses.html +331 -291
- package/static/vendor/simplewebauthn/browser.min.js +2 -2
- package/translations/messages.pot +203 -157
- package/views/accounts/account.hbs +15 -37
- package/views/accounts/browse.hbs +3 -1
- package/views/accounts/edit.hbs +1 -1
- package/views/accounts/register/imap-server.hbs +1 -1
- package/views/config/ai.hbs +1 -1
- package/views/config/branding.hbs +2 -2
- package/views/config/document-store/chat.hbs +1 -1
- package/views/config/document-store/index.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -1
- package/views/config/license.hbs +1 -1
- package/views/config/mcp.hbs +1 -1
- package/views/config/network.hbs +14 -16
- package/views/config/oauth/app.hbs +2 -2
- package/views/config/service.hbs +1 -1
- package/views/config/smtp.hbs +1 -1
- package/views/config/webhooks.hbs +2 -2
- package/views/error.hbs +4 -2
- package/views/internals/index.hbs +1 -1
- package/views/layout/app.hbs +3 -11
- package/views/mcp/authorize.hbs +1 -1
- package/views/partials/ace_assets.hbs +13 -0
- package/views/partials/add_account_modal.hbs +1 -1
- package/views/partials/address_list.hbs +4 -4
- package/views/partials/filter_editor_js.hbs +2 -2
- package/views/partials/gateway_js.hbs +1 -1
- package/views/partials/oauth_form.hbs +1 -1
- package/views/partials/public_theme_init.hbs +1 -1
- package/views/partials/template_form.hbs +2 -2
- package/views/partials/test_send.hbs +7 -4
- package/views/partials/theme_init.hbs +1 -1
- package/views/partials/ui/details.hbs +2 -2
- package/views/partials/webhooks_editor_functions.hbs +1 -1
- package/views/reference/redirect.hbs +1 -1
- package/views/templates/template.hbs +2 -2
- package/views/tokens/new.hbs +1 -1
- package/views/unsubscribe.hbs +1 -1
- package/views/webhooks/webhook.hbs +2 -2
- package/workers/api.js +42 -112
- package/workers/export.js +1 -5
- package/workers/imap.js +1 -3
- package/workers/smtp.js +12 -43
- package/workers/submit.js +6 -12
- package/workers/webhooks.js +6 -17
- package/static/front/EmailEngine_logo_horiz.png +0 -0
- package/static/front/EmailEngine_logo_vert.png +0 -0
- package/static/front/index.html +0 -57
- package/static/front/logo.png +0 -0
- package/static/vendor/handlebars/handlebars.min-v4.7.9.js +0 -29
|
@@ -285,8 +285,13 @@
|
|
|
285
285
|
To
|
|
286
286
|
{{/if}}
|
|
287
287
|
|
|
288
|
+
{{#if account.oauth2.accessTokenInvalidated}}
|
|
289
|
+
{{!-- the expiry was rewound to force a renewal, so the stored end is meaningless --}}
|
|
290
|
+
invalidated, a new token is requested on the next connection
|
|
291
|
+
{{else}}
|
|
288
292
|
<span class="local-date-time code-link" data-time="{{account.oauth2.expiresStr}}"
|
|
289
293
|
title="{{account.oauth2.expiresStr}}"></span>
|
|
294
|
+
{{/if}}
|
|
290
295
|
</dd>
|
|
291
296
|
{{/if}}
|
|
292
297
|
|
|
@@ -946,7 +951,7 @@ submitLabel="Delete account"}}
|
|
|
946
951
|
{{!-- no #crumb input: the layout already renders the element the script reads --}}
|
|
947
952
|
<input type="hidden" id="account-id" value="{{account.account}}">
|
|
948
953
|
|
|
949
|
-
<script>
|
|
954
|
+
<script nonce="{{cspNonce}}">
|
|
950
955
|
document.addEventListener('DOMContentLoaded', () => {
|
|
951
956
|
|
|
952
957
|
const reconnectAccount = async () => {
|
|
@@ -1340,11 +1345,14 @@ submitLabel="Delete account"}}
|
|
|
1340
1345
|
const account = document.getElementById('account-id').value.trim();
|
|
1341
1346
|
|
|
1342
1347
|
try {
|
|
1343
|
-
|
|
1348
|
+
// the crumb travels in the header: the route validates DELETE in restful mode
|
|
1349
|
+
const res = await fetch(`/admin/accounts/${account}/export/${currentExportId}`, {
|
|
1344
1350
|
method: 'DELETE',
|
|
1345
|
-
headers: { '
|
|
1346
|
-
body: JSON.stringify({ crumb: document.getElementById('crumb').value })
|
|
1351
|
+
headers: { 'X-CSRF-Token': document.getElementById('crumb').value }
|
|
1347
1352
|
});
|
|
1353
|
+
if (!res.ok) {
|
|
1354
|
+
throw new Error(`HTTP ${res.status}`);
|
|
1355
|
+
}
|
|
1348
1356
|
|
|
1349
1357
|
stopPolling();
|
|
1350
1358
|
currentExportId = null;
|
|
@@ -1357,39 +1365,8 @@ submitLabel="Delete account"}}
|
|
|
1357
1365
|
});
|
|
1358
1366
|
</script>
|
|
1359
1367
|
|
|
1360
|
-
<script
|
|
1361
|
-
|
|
1362
|
-
<script>
|
|
1368
|
+
<script nonce="{{cspNonce}}">
|
|
1363
1369
|
document.addEventListener('DOMContentLoaded', () => {
|
|
1364
|
-
Handlebars.registerHelper('equals', function (compareVal, baseVal, options) {
|
|
1365
|
-
if (baseVal == compareVal) {
|
|
1366
|
-
return options.fn(this);
|
|
1367
|
-
}
|
|
1368
|
-
return options.inverse(this);
|
|
1369
|
-
});
|
|
1370
|
-
|
|
1371
|
-
Handlebars.registerHelper('inc', function (nr, inc, options) {
|
|
1372
|
-
return Number(nr) + Number(inc);
|
|
1373
|
-
});
|
|
1374
|
-
|
|
1375
|
-
// status -> FlyonUI color/icon maps for the delivery-test results template
|
|
1376
|
-
const STATUS_COLORS = { pass: 'success', softfail: 'warning', fail: 'error', permerror: 'info', temperror: 'info' };
|
|
1377
|
-
Handlebars.registerHelper('statusColor', result => STATUS_COLORS[result] || 'neutral');
|
|
1378
|
-
|
|
1379
|
-
Handlebars.registerHelper('statusIcon', result => {
|
|
1380
|
-
switch (result) {
|
|
1381
|
-
case 'pass':
|
|
1382
|
-
return 'icon-[tabler--circle-check]';
|
|
1383
|
-
case 'neutral':
|
|
1384
|
-
case 'none':
|
|
1385
|
-
return 'icon-[tabler--circle-off]';
|
|
1386
|
-
default:
|
|
1387
|
-
return 'icon-[tabler--alert-triangle]';
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
|
|
1391
|
-
const testSendTemplate = Handlebars.compile(document.getElementById('test-send-template').innerHTML);
|
|
1392
|
-
|
|
1393
1370
|
let aborted = false;
|
|
1394
1371
|
|
|
1395
1372
|
const createSmtpTestAccount = async (account, gateway) => {
|
|
@@ -1462,7 +1439,8 @@ submitLabel="Delete account"}}
|
|
|
1462
1439
|
return false
|
|
1463
1440
|
}
|
|
1464
1441
|
document.getElementById('test-send-results').classList.remove('hidden');
|
|
1465
|
-
|
|
1442
|
+
// rendered server-side by /admin/smtp/check-test from views/partials/test_send.hbs
|
|
1443
|
+
document.getElementById('test-send-results').innerHTML = results.html;
|
|
1466
1444
|
}).catch(err => {
|
|
1467
1445
|
if (aborted) {
|
|
1468
1446
|
return false
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
{{/ui/modal}}
|
|
28
28
|
|
|
29
|
-
<script type="module">
|
|
29
|
+
<script type="module" nonce="{{cspNonce}}">
|
|
30
30
|
import { EmailEngineClient } from '/static/js/ee-client.js';
|
|
31
31
|
|
|
32
32
|
// Create client with UI container. The embed follows the admin theme -
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
apiUrl: window.location.origin,
|
|
37
37
|
account: '{{account}}',
|
|
38
38
|
accessToken: '{{sessionToken}}',
|
|
39
|
+
// the widget appends its own stylesheet element; the admin policy accepts it with this nonce
|
|
40
|
+
styleNonce: '{{cspNonce}}',
|
|
39
41
|
container: document.getElementById('email-client'),
|
|
40
42
|
darkMode: uiEffectiveTheme() === 'dark',
|
|
41
43
|
showDarkModeToggle: false,
|
package/views/accounts/edit.hbs
CHANGED
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
|
|
141
141
|
<input type="hidden" id="availablePaths" value="{{availablePaths}}">
|
|
142
142
|
|
|
143
|
-
<script>
|
|
143
|
+
<script nonce="{{cspNonce}}">
|
|
144
144
|
document.addEventListener('DOMContentLoaded', () => {
|
|
145
145
|
let availablePaths = JSON.parse(document.getElementById('availablePaths').value);
|
|
146
146
|
// native datalist suggestions for the Sent Mail folder input (the
|
|
@@ -290,7 +290,7 @@ focus ring on) the corner close button --}}
|
|
|
290
290
|
|
|
291
291
|
<input type="hidden" id="autoTest" value="{{#if autoTest}}true{{/if}}">
|
|
292
292
|
|
|
293
|
-
<script>
|
|
293
|
+
<script nonce="{{cspNonce}}">
|
|
294
294
|
document.addEventListener('DOMContentLoaded', () => {
|
|
295
295
|
|
|
296
296
|
let formTested = false;
|
package/views/config/ai.hbs
CHANGED
|
@@ -311,7 +311,7 @@ defaultTestPayload='{"account":"test","path":"INBOX","subject":"test email"}'}}
|
|
|
311
311
|
|
|
312
312
|
<input type="hidden" id="defaultPromptJson" value="{{defaultPromptJson}}">
|
|
313
313
|
|
|
314
|
-
<script>
|
|
314
|
+
<script nonce="{{cspNonce}}">
|
|
315
315
|
document.addEventListener('DOMContentLoaded', () => {
|
|
316
316
|
|
|
317
317
|
const editorPrompt = uiAceEditor("editor-prompt", "markdown", document.getElementById('openAiPromptElement').value, {
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
</form>
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
{{> ace_assets}}
|
|
82
82
|
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
83
83
|
|
|
84
|
-
<script>
|
|
84
|
+
<script nonce="{{cspNonce}}">
|
|
85
85
|
document.addEventListener('DOMContentLoaded', () => {
|
|
86
86
|
|
|
87
87
|
const editors = new Map();
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
|
|
141
141
|
<input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
|
|
142
142
|
|
|
143
|
-
<script>
|
|
143
|
+
<script nonce="{{cspNonce}}">
|
|
144
144
|
document.addEventListener('DOMContentLoaded', () => {
|
|
145
145
|
|
|
146
146
|
let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);
|
package/views/config/license.hbs
CHANGED
|
@@ -122,7 +122,7 @@ submitLabel="Remove License"}}
|
|
|
122
122
|
Remove the current license key from this EmailEngine instance?
|
|
123
123
|
{{/ui/confirm-modal}}
|
|
124
124
|
|
|
125
|
-
<script>
|
|
125
|
+
<script nonce="{{cspNonce}}">
|
|
126
126
|
document.addEventListener('DOMContentLoaded', () => {
|
|
127
127
|
let licenseTextElm = document.getElementById('licenseTextElement')
|
|
128
128
|
let fileSelectElm = document.getElementById('licenseFile');
|
package/views/config/mcp.hbs
CHANGED
package/views/config/network.hbs
CHANGED
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
10
10
|
|
|
11
11
|
{{#> ui/card title="Proxy Settings" bodyClass="space-y-4"}}
|
|
12
|
-
<p>Route all
|
|
12
|
+
<p>Route all outbound connections through a proxy: IMAP and SMTP sessions, Gmail API and Microsoft
|
|
13
|
+
Graph requests, OAuth2 token exchange, webhook delivery, and EmailEngine's own requests such as
|
|
14
|
+
license validation. Supports HTTP CONNECT, SOCKS4, and SOCKS5.</p>
|
|
13
15
|
|
|
14
16
|
<div>
|
|
15
17
|
{{> ui/setting-ref name="proxyEnabled"}}
|
|
16
18
|
{{> ui/checkbox id="proxy_enabled" name="proxyEnabled" label="Enable Global Proxy" class="proxy-status"
|
|
17
19
|
checked=values.proxyEnabled error=errors.proxyEnabled
|
|
18
|
-
hint="Routes all connections through the proxy below. Individual accounts can override
|
|
20
|
+
hint="Routes all outbound connections through the proxy below. Individual accounts can override it for their IMAP and SMTP connections."}}
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
23
|
<div>
|
|
@@ -43,14 +45,15 @@
|
|
|
43
45
|
{{/ui/card}}
|
|
44
46
|
|
|
45
47
|
{{#> ui/card title="HTTP Proxy Settings" bodyClass="space-y-4"}}
|
|
46
|
-
<p>
|
|
47
|
-
|
|
48
|
+
<p>Optional. Use a different proxy for HTTP/HTTPS requests only: webhook delivery, OAuth2 token exchange,
|
|
49
|
+
Gmail API and Microsoft Graph calls, and license validation. When disabled, these requests use the
|
|
50
|
+
global proxy above.</p>
|
|
48
51
|
|
|
49
52
|
<div>
|
|
50
53
|
{{> ui/setting-ref name="httpProxyEnabled"}}
|
|
51
54
|
{{> ui/checkbox id="http_proxy_enabled" name="httpProxyEnabled" label="Enable HTTP Proxy"
|
|
52
55
|
class="http-proxy-status" checked=values.httpProxyEnabled error=errors.httpProxyEnabled
|
|
53
|
-
hint="Routes
|
|
56
|
+
hint="Routes outbound HTTP/HTTPS requests through the proxy below instead of the global proxy."}}
|
|
54
57
|
</div>
|
|
55
58
|
|
|
56
59
|
<div>
|
|
@@ -181,11 +184,7 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
181
184
|
{{/ui/confirm-modal}}
|
|
182
185
|
|
|
183
186
|
|
|
184
|
-
<script
|
|
185
|
-
{{{addressListTemplate}}}
|
|
186
|
-
</script>
|
|
187
|
-
|
|
188
|
-
<script>
|
|
187
|
+
<script nonce="{{cspNonce}}">
|
|
189
188
|
document.addEventListener('DOMContentLoaded', () => {
|
|
190
189
|
let reloadBtn = document.getElementById('reload-btn');
|
|
191
190
|
|
|
@@ -223,10 +222,9 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
223
222
|
|
|
224
223
|
checkCheckboxes()
|
|
225
224
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
let html = addressListTemplate(data);
|
|
225
|
+
let redrawAddressList = html => {
|
|
226
|
+
// rendered server-side by /admin/config/network/reload from the same
|
|
227
|
+
// address_list partial as the initial page
|
|
230
228
|
document.getElementById('address-list').innerHTML = html;
|
|
231
229
|
|
|
232
230
|
for (let elm of document.querySelectorAll('#address-list .checkbox-entry')) {
|
|
@@ -250,8 +248,8 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
250
248
|
return;
|
|
251
249
|
}
|
|
252
250
|
|
|
253
|
-
if (data.
|
|
254
|
-
redrawAddressList(data);
|
|
251
|
+
if (data.html) {
|
|
252
|
+
redrawAddressList(data.html);
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
}).catch(err => {
|
|
@@ -355,7 +355,7 @@ fieldName="app" fieldValue=app.id submitLabel="Delete app" submitIcon="icon-[tab
|
|
|
355
355
|
</form>
|
|
356
356
|
{{/ui/modal}}
|
|
357
357
|
|
|
358
|
-
<script>
|
|
358
|
+
<script nonce="{{cspNonce}}">
|
|
359
359
|
document.addEventListener('DOMContentLoaded', () => {
|
|
360
360
|
document.getElementById('addServiceAccountModal').addEventListener('open.overlay', () => {
|
|
361
361
|
document.getElementById('service-account-name').focus();
|
|
@@ -364,7 +364,7 @@ fieldName="app" fieldValue=app.id submitLabel="Delete app" submitIcon="icon-[tab
|
|
|
364
364
|
</script>
|
|
365
365
|
{{/if}}
|
|
366
366
|
|
|
367
|
-
<script>
|
|
367
|
+
<script nonce="{{cspNonce}}">
|
|
368
368
|
document.addEventListener('DOMContentLoaded', () => {
|
|
369
369
|
const appId = "{{app.id}}";
|
|
370
370
|
const stepsElm = document.getElementById('verify-steps');
|
package/views/config/service.hbs
CHANGED
package/views/config/smtp.hbs
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
|
|
145
145
|
<input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
|
|
146
146
|
|
|
147
|
-
<script>
|
|
147
|
+
<script nonce="{{cspNonce}}">
|
|
148
148
|
document.addEventListener('DOMContentLoaded', () => {
|
|
149
149
|
|
|
150
150
|
let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);
|
|
@@ -266,10 +266,10 @@ class="mb-1"}}
|
|
|
266
266
|
|
|
267
267
|
</form>
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
{{> ace_assets}}
|
|
270
270
|
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
271
271
|
|
|
272
|
-
<script>
|
|
272
|
+
<script nonce="{{cspNonce}}">
|
|
273
273
|
document.addEventListener('DOMContentLoaded', () => {
|
|
274
274
|
|
|
275
275
|
const sendTestPayload = async () => {
|
package/views/error.hbs
CHANGED
|
@@ -14,9 +14,11 @@ pages, blocked access, failed form submissions without a friendlier page). --}}
|
|
|
14
14
|
</div>
|
|
15
15
|
{{/if}}
|
|
16
16
|
<div class="ee-form-actions">
|
|
17
|
-
|
|
17
|
+
{{!-- A button rather than a javascript: link: the Content-Security-Policy on the admin
|
|
18
|
+
surface allows no javascript: URLs; static/js/public.js wires data-ee-back --}}
|
|
19
|
+
<button type="button" data-ee-back class="ee-btn ee-btn-neutral ee-btn-soft ee-btn-sm">
|
|
18
20
|
<span class="ee-icon ee-icon-arrow-left"></span> {{_ "Go back" templateLocale}}
|
|
19
|
-
</
|
|
21
|
+
</button>
|
|
20
22
|
{{!-- The dashboard is an admin destination. A mailbox owner on the hosted form or a
|
|
21
23
|
list recipient on an unsubscribe link has no business there, so the button only
|
|
22
24
|
shows for a requester who holds an admin session, or on an instance that has no
|
|
@@ -163,7 +163,7 @@ submitLabel="Download Snapshot" submitVariant="info"}}
|
|
|
163
163
|
Generate a memory snapshot for debugging? This may briefly affect thread performance.
|
|
164
164
|
{{/ui/confirm-modal}}
|
|
165
165
|
|
|
166
|
-
<script>
|
|
166
|
+
<script nonce="{{cspNonce}}">
|
|
167
167
|
document.addEventListener('DOMContentLoaded', () => {
|
|
168
168
|
for (let elm of document.querySelectorAll('.kill-thread-btn')) {
|
|
169
169
|
elm.addEventListener('click', e => {
|
package/views/layout/app.hbs
CHANGED
|
@@ -143,13 +143,7 @@
|
|
|
143
143
|
<span class="bg-{{eeColor level}}/10 text-{{eeColor level}} flex size-8 shrink-0 items-center justify-center rounded-field">
|
|
144
144
|
<span class="{{icon}} size-4 shrink-0"></span>
|
|
145
145
|
</span>
|
|
146
|
-
<span class="text-sm whitespace-normal">
|
|
147
|
-
{{#if verbatim}}
|
|
148
|
-
{{{message}}}
|
|
149
|
-
{{else}}
|
|
150
|
-
{{message}}
|
|
151
|
-
{{/if}}
|
|
152
|
-
</span>
|
|
146
|
+
<span class="text-sm whitespace-normal">{{message}}</span>
|
|
153
147
|
</a>
|
|
154
148
|
</li>
|
|
155
149
|
{{/each}}
|
|
@@ -343,8 +337,6 @@
|
|
|
343
337
|
<script src="/static/js/flyonui.js"></script>
|
|
344
338
|
<script src="/static/js/ui.js"></script>
|
|
345
339
|
|
|
346
|
-
<script src="/static/vendor/handlebars/handlebars.min-v4.7.9.js"></script>
|
|
347
|
-
|
|
348
340
|
<script src="/static/js/highlight.min.js"></script>
|
|
349
341
|
|
|
350
342
|
<script src="/static/js/app.js"></script>
|
|
@@ -360,7 +352,7 @@
|
|
|
360
352
|
Provisioning a trial license, please wait <span class="loading loading-spinner loading-sm align-middle"></span>
|
|
361
353
|
</div>
|
|
362
354
|
{{/ui/modal}}
|
|
363
|
-
<script>
|
|
355
|
+
<script nonce="{{cspNonce}}">
|
|
364
356
|
document.addEventListener('DOMContentLoaded', () => {
|
|
365
357
|
let trialBtn = document.getElementById('start-trial-btn');
|
|
366
358
|
if (!trialBtn) {
|
|
@@ -400,7 +392,7 @@
|
|
|
400
392
|
|
|
401
393
|
{{#if updateBrowserInfo}}
|
|
402
394
|
<input type="hidden" id="browser-info-crumb" value="{{crumb}}" />
|
|
403
|
-
<script>
|
|
395
|
+
<script nonce="{{cspNonce}}">
|
|
404
396
|
document.addEventListener('DOMContentLoaded', () => {
|
|
405
397
|
let sendBrowserInfo = async () => {
|
|
406
398
|
let timezone = false;
|
package/views/mcp/authorize.hbs
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{{!-- ACE editor assets: use this partial rather than a bare ace.js include. ACE runs in
|
|
2
|
+
strict-CSP mode (uiAceEnsureAssets in static/js/ui.js, which every editor goes through),
|
|
3
|
+
so it injects none of its own stylesheets; these are the sheets it would have injected -
|
|
4
|
+
the core one and the four themes uiAceThemes switches between, copied from ace-builds by
|
|
5
|
+
copy-static-files.sh. Linking them here rather than leaving uiAceEnsureAssets to add them
|
|
6
|
+
keeps the editor from painting before its stylesheet arrives. Pages that need an extension
|
|
7
|
+
(ext-language_tools) add it after this partial. --}}
|
|
8
|
+
<link rel="stylesheet" href="/static/js/ace/css/ace.css">
|
|
9
|
+
<link rel="stylesheet" href="/static/js/ace/css/theme/xcode.css">
|
|
10
|
+
<link rel="stylesheet" href="/static/js/ace/css/theme/kuroir.css">
|
|
11
|
+
<link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night.css">
|
|
12
|
+
<link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night_eighties.css">
|
|
13
|
+
<script src="/static/js/ace/ace.js"></script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{{!-- Rendered server-side on first paint AND
|
|
2
|
-
an IP rescan (
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
{{!-- Rendered server-side on first paint AND again by POST /admin/config/network/reload
|
|
2
|
+
after an IP rescan (compiledFragments.addressList in lib/ui-routes/route-helpers.js,
|
|
3
|
+
which renders without the page's view context - so no inline scripts here, and
|
|
4
|
+
nothing that needs cspNonce or the locale). --}}
|
|
5
5
|
{{#each addresses}}
|
|
6
6
|
<tr class="hover:bg-base-200/60">
|
|
7
7
|
<td>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
Render context: examplePayloadsJson, scriptEnvJson and (webhooks pages only)
|
|
22
22
|
notificationTypesJson, which switches on the event-name autocompleter.
|
|
23
23
|
--}}
|
|
24
|
-
|
|
24
|
+
{{> ace_assets}}
|
|
25
25
|
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
26
26
|
|
|
27
27
|
{{#if notificationTypesJson}}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
{{/ui/modal}}
|
|
52
52
|
|
|
53
|
-
<script>
|
|
53
|
+
<script nonce="{{cspNonce}}">
|
|
54
54
|
document.addEventListener('DOMContentLoaded', () => {
|
|
55
55
|
|
|
56
56
|
let scriptEnv = JSON.parse(document.getElementById('scriptEnvJson').value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script nonce="{{cspNonce}}">
|
|
2
2
|
// Apply the theme before first paint to avoid a flash. Public-page twin of
|
|
3
3
|
// theme_init.hbs with one extra source, a ?theme= query argument, so the
|
|
4
4
|
// application that linked or redirected here can make these pages match its
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
|
|
60
60
|
{{!-- Shared by templates/new and templates/edit: both render this exact form
|
|
61
61
|
(ids included), so the ACE editor bootstrap lives here instead of per page. --}}
|
|
62
|
-
|
|
62
|
+
{{> ace_assets}}
|
|
63
63
|
|
|
64
|
-
<script>
|
|
64
|
+
<script nonce="{{cspNonce}}">
|
|
65
65
|
document.addEventListener('DOMContentLoaded', () => {
|
|
66
66
|
|
|
67
67
|
const editors = new Map();
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{{!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
Delivery-test results (SPF/DKIM/DMARC). Rendered on the server by
|
|
3
|
+
POST /admin/smtp/check-test (compiledFragments.testSend in
|
|
4
|
+
lib/ui-routes/route-helpers.js) and returned as the `html` field the
|
|
5
|
+
account page drops into the results panel. Relies on the statusColor and
|
|
6
|
+
statusIcon helpers from lib/handlebars-helpers.js. Rendered without the
|
|
7
|
+
page's view context, so no inline scripts here. Native details/summary
|
|
8
|
+
panels - no JS.
|
|
6
9
|
--}}
|
|
7
10
|
<div class="space-y-2 mb-4">
|
|
8
11
|
<details class="group card border border-base-content/10">
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
summaryClass - extra/override padding classes on the summary
|
|
13
13
|
(default "px-6 py-4")
|
|
14
14
|
bodyClass - extra classes on the body (optional)
|
|
15
|
-
|
|
16
|
-
resolve
|
|
15
|
+
Usable from the fragments compiled outside vision too (test_send.hbs,
|
|
16
|
+
address_list.hbs): partials resolve on the shared handlebars instance.
|
|
17
17
|
--}}
|
|
18
18
|
<details {{#if id}}id="{{id}}" {{/if}}class="group {{#if class}}{{class}}{{else}}card bg-base-100 shadow-md{{/if}}"
|
|
19
19
|
{{#if open}}open {{/if}}>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
redirectMap is serialized by jsonForScript() in lib/api-reference/index.js, which escapes
|
|
14
14
|
`<` so the literal cannot terminate this script element.
|
|
15
15
|
--}}
|
|
16
|
-
<script>
|
|
16
|
+
<script nonce="{{cspNonce}}">
|
|
17
17
|
(() => {
|
|
18
18
|
const map = {{{redirectMap}}};
|
|
19
19
|
const fallback = '/admin/reference';
|
|
@@ -130,8 +130,8 @@ fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
|
|
|
130
130
|
</div>
|
|
131
131
|
{{/ui/modal}}
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
<script>
|
|
133
|
+
{{> ace_assets}}
|
|
134
|
+
<script nonce="{{cspNonce}}">
|
|
135
135
|
document.addEventListener('DOMContentLoaded', () => {
|
|
136
136
|
|
|
137
137
|
function showAlert(title, content) {
|
package/views/tokens/new.hbs
CHANGED
package/views/unsubscribe.hbs
CHANGED
|
@@ -151,9 +151,9 @@ fieldName="webhook" fieldValue=webhook.id submitLabel="Delete route"}}
|
|
|
151
151
|
<p>Are you sure you want to delete <strong>{{webhook.name}}</strong>? This action cannot be undone.</p>
|
|
152
152
|
{{/ui/confirm-modal}}
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
{{> ace_assets}}
|
|
155
155
|
|
|
156
|
-
<script>
|
|
156
|
+
<script nonce="{{cspNonce}}">
|
|
157
157
|
document.addEventListener('DOMContentLoaded', () => {
|
|
158
158
|
|
|
159
159
|
{{!-- useWorker is false, so the JSHint options machinery the editable
|