emailengine-app 2.79.8 → 2.80.0

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.
Files changed (182) hide show
  1. package/.github/dependabot.yml +22 -0
  2. package/.github/workflows/test.yml +39 -0
  3. package/.release-please-manifest.json +1 -1
  4. package/CHANGELOG.md +69 -0
  5. package/DOCKER_DEPLOYMENT.md +6 -7
  6. package/Dockerfile +35 -11
  7. package/config/default.toml +7 -2
  8. package/copy-static-files.sh +23 -5
  9. package/data/google-crawlers.json +1 -1
  10. package/encrypt.js +43 -0
  11. package/lib/account/account-state.js +62 -0
  12. package/lib/account.js +60 -3
  13. package/lib/api-routes/account-routes.js +20 -0
  14. package/lib/api-routes/bull-board-routes.js +3 -2
  15. package/lib/api-routes/index.js +1 -1
  16. package/lib/api-routes/route-helpers.js +8 -0
  17. package/lib/api-routes/settings-routes.js +17 -2
  18. package/lib/auth-token.js +73 -2
  19. package/lib/autodetect-imap-settings.js +379 -69
  20. package/lib/cert-handler.js +62 -0
  21. package/lib/consts.js +58 -7
  22. package/lib/db.js +12 -0
  23. package/lib/egress-fetch.js +145 -0
  24. package/lib/email-client/base-client.js +234 -66
  25. package/lib/email-client/credential-errors.js +118 -0
  26. package/lib/email-client/gmail/gmail-api.js +2 -1
  27. package/lib/email-client/gmail-client.js +70 -64
  28. package/lib/email-client/imap/connection-errors.js +52 -0
  29. package/lib/email-client/imap/listing-diff.js +47 -6
  30. package/lib/email-client/imap/mailbox.js +457 -379
  31. package/lib/email-client/imap/subconnection.js +15 -11
  32. package/lib/email-client/imap/sync-operations.js +46 -59
  33. package/lib/email-client/imap-client.js +136 -95
  34. package/lib/email-client/message-builder.js +11 -11
  35. package/lib/email-client/outlook/graph-api.js +2 -1
  36. package/lib/email-client/outlook-client.js +219 -106
  37. package/lib/export.js +35 -2
  38. package/lib/handlebars-helpers.js +129 -0
  39. package/lib/imap-proxy-auth.js +96 -21
  40. package/lib/imapproxy/imap-core/README.md +1 -0
  41. package/lib/imapproxy/imap-core/lib/tls-options.js +5 -46
  42. package/lib/imapproxy/imap-server.js +56 -66
  43. package/lib/lua/h-del-if-equals.lua +39 -0
  44. package/lib/lua/h-set-if-equals.lua +39 -0
  45. package/lib/openapi/index.js +3 -0
  46. package/lib/outbox.js +28 -3
  47. package/lib/rate-limit.js +23 -4
  48. package/lib/routes-ui.js +4 -34
  49. package/lib/schemas.js +42 -3
  50. package/lib/security-headers.js +411 -0
  51. package/lib/sentry.js +36 -4
  52. package/lib/smtp-auth.js +86 -7
  53. package/lib/tls/context.js +376 -0
  54. package/lib/tls/der.js +223 -0
  55. package/lib/tls/provision.js +555 -0
  56. package/lib/tls/self-signed.js +282 -0
  57. package/lib/tls/status.js +431 -0
  58. package/lib/tls/store.js +666 -0
  59. package/lib/tools.js +337 -147
  60. package/lib/ui-routes/account-routes.js +47 -33
  61. package/lib/ui-routes/admin-config-routes.js +22 -1
  62. package/lib/ui-routes/auth-routes.js +16 -1
  63. package/lib/ui-routes/export-routes.js +4 -0
  64. package/lib/ui-routes/internals-routes.js +3 -5
  65. package/lib/ui-routes/mcp-consent-routes.js +7 -0
  66. package/lib/ui-routes/network-config-routes.js +58 -48
  67. package/lib/ui-routes/route-helpers.js +24 -8
  68. package/lib/ui-routes/smtp-test-routes.js +7 -0
  69. package/lib/ui-routes/tls-config-routes.js +581 -0
  70. package/lib/utils/mailbox-path.js +51 -0
  71. package/lib/utils/severity.js +31 -0
  72. package/lib/webhook-egress.js +5 -0
  73. package/package.json +21 -24
  74. package/sbom.json +1 -1
  75. package/server.js +53 -36
  76. package/static/css/flyonui.css +1 -1
  77. package/static/css/src/app.tailwind.css +11 -0
  78. package/static/js/ace/css/ace.css +1462 -0
  79. package/static/js/ace/css/kuroir-1.png +0 -0
  80. package/static/js/ace/css/kuroir-2.png +0 -0
  81. package/static/js/ace/css/main-1.png +0 -0
  82. package/static/js/ace/css/main-10.svg +4 -0
  83. package/static/js/ace/css/main-11.svg +5 -0
  84. package/static/js/ace/css/main-12.svg +4 -0
  85. package/static/js/ace/css/main-13.png +0 -0
  86. package/static/js/ace/css/main-14.png +0 -0
  87. package/static/js/ace/css/main-15.png +0 -0
  88. package/static/js/ace/css/main-16.png +0 -0
  89. package/static/js/ace/css/main-17.png +0 -0
  90. package/static/js/ace/css/main-18.png +0 -0
  91. package/static/js/ace/css/main-19.png +0 -0
  92. package/static/js/ace/css/main-2.png +0 -0
  93. package/static/js/ace/css/main-20.png +0 -0
  94. package/static/js/ace/css/main-21.png +0 -0
  95. package/static/js/ace/css/main-22.png +0 -0
  96. package/static/js/ace/css/main-23.png +0 -0
  97. package/static/js/ace/css/main-24.png +0 -0
  98. package/static/js/ace/css/main-25.svg +1 -0
  99. package/static/js/ace/css/main-26.png +0 -0
  100. package/static/js/ace/css/main-3.png +0 -0
  101. package/static/js/ace/css/main-4.png +0 -0
  102. package/static/js/ace/css/main-5.svg +7 -0
  103. package/static/js/ace/css/main-6.svg +9 -0
  104. package/static/js/ace/css/main-7.svg +7 -0
  105. package/static/js/ace/css/main-8.svg +9 -0
  106. package/static/js/ace/css/main-9.svg +6 -0
  107. package/static/js/ace/css/theme/kuroir.css +78 -0
  108. package/static/js/ace/css/theme/tomorrow_night.css +128 -0
  109. package/static/js/ace/css/theme/tomorrow_night_eighties.css +128 -0
  110. package/static/js/ace/css/theme/xcode.css +106 -0
  111. package/static/js/ace/css/tomorrow_night-1.png +0 -0
  112. package/static/js/ace/css/tomorrow_night-2.png +0 -0
  113. package/static/js/ace/css/tomorrow_night_eighties-1.png +0 -0
  114. package/static/js/ace/css/tomorrow_night_eighties-2.png +0 -0
  115. package/static/js/ace/css/xcode-1.png +0 -0
  116. package/static/js/ace/css/xcode-2.png +0 -0
  117. package/static/js/app.js +34 -0
  118. package/static/js/ee-client.js +256 -102
  119. package/static/js/public.js +13 -2
  120. package/static/js/ui.js +40 -25
  121. package/static/licenses.html +393 -1282
  122. package/static/vendor/simplewebauthn/browser.min.js +2 -2
  123. package/translations/messages.pot +203 -157
  124. package/views/account/login-redirect.hbs +22 -0
  125. package/views/accounts/account.hbs +15 -37
  126. package/views/accounts/browse.hbs +3 -1
  127. package/views/accounts/edit.hbs +1 -1
  128. package/views/accounts/register/imap-server.hbs +1 -1
  129. package/views/config/ai.hbs +1 -1
  130. package/views/config/branding.hbs +2 -2
  131. package/views/config/document-store/chat.hbs +1 -1
  132. package/views/config/document-store/index.hbs +1 -1
  133. package/views/config/imap-proxy.hbs +1 -4
  134. package/views/config/license.hbs +1 -1
  135. package/views/config/mcp.hbs +1 -1
  136. package/views/config/network.hbs +14 -16
  137. package/views/config/oauth/app.hbs +2 -2
  138. package/views/config/service.hbs +1 -1
  139. package/views/config/smtp.hbs +1 -4
  140. package/views/config/tls-upload.hbs +81 -0
  141. package/views/config/tls.hbs +492 -0
  142. package/views/config/webhooks.hbs +2 -2
  143. package/views/error.hbs +4 -2
  144. package/views/internals/index.hbs +1 -1
  145. package/views/layout/app.hbs +3 -11
  146. package/views/mcp/authorize.hbs +1 -1
  147. package/views/partials/ace_assets.hbs +13 -0
  148. package/views/partials/add_account_modal.hbs +1 -1
  149. package/views/partials/address_list.hbs +4 -4
  150. package/views/partials/filter_editor_js.hbs +2 -2
  151. package/views/partials/gateway_js.hbs +1 -1
  152. package/views/partials/oauth_form.hbs +1 -1
  153. package/views/partials/public_theme_init.hbs +1 -1
  154. package/views/partials/side_menu.hbs +1 -0
  155. package/views/partials/template_form.hbs +2 -2
  156. package/views/partials/test_send.hbs +7 -4
  157. package/views/partials/theme_init.hbs +1 -1
  158. package/views/partials/tls_security_card.hbs +25 -53
  159. package/views/partials/ui/alert-banner.hbs +3 -2
  160. package/views/partials/ui/badge.hbs +6 -2
  161. package/views/partials/ui/btn.hbs +5 -2
  162. package/views/partials/ui/details.hbs +2 -2
  163. package/views/partials/webhooks_editor_functions.hbs +1 -1
  164. package/views/reference/redirect.hbs +1 -1
  165. package/views/templates/template.hbs +2 -2
  166. package/views/tokens/new.hbs +1 -1
  167. package/views/unsubscribe.hbs +1 -1
  168. package/views/webhooks/webhook.hbs +2 -2
  169. package/workers/api.js +131 -242
  170. package/workers/export.js +1 -5
  171. package/workers/imap-proxy.js +4 -1
  172. package/workers/imap.js +1 -3
  173. package/workers/smtp.js +59 -83
  174. package/workers/submit.js +6 -12
  175. package/workers/webhooks.js +6 -17
  176. package/static/front/EmailEngine_logo_horiz.png +0 -0
  177. package/static/front/EmailEngine_logo_vert.png +0 -0
  178. package/static/front/index.html +0 -57
  179. package/static/front/logo.png +0 -0
  180. package/static/vendor/handlebars/handlebars.min-v4.7.9.js +0 -29
  181. package/views/partials/tls_security_js.hbs +0 -64
  182. package/views/partials/tls_security_modal.hbs +0 -22
@@ -1,5 +1,5 @@
1
1
  <input type="hidden" id="wellKnownServices" value="{{wellKnownServices}}">
2
- <script>
2
+ <script nonce="{{cspNonce}}">
3
3
  document.addEventListener('DOMContentLoaded', () => {
4
4
  let wellKnownServices = JSON.parse(document.getElementById('wellKnownServices').value);
5
5
 
@@ -983,7 +983,7 @@ open=values.skipScopes}}
983
983
 
984
984
  {{/ui/details}}
985
985
 
986
- <script>
986
+ <script nonce="{{cspNonce}}">
987
987
 
988
988
  document.addEventListener('DOMContentLoaded', () => {
989
989
 
@@ -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
@@ -29,6 +29,7 @@
29
29
  {{> ui/menu-item href="/admin/config/ai" label="AI Processing" active=menuConfigAi}}
30
30
  {{> ui/menu-item href="/admin/config/mcp" label="MCP" badge="Beta" active=menuConfigMcp}}
31
31
  {{> ui/menu-item href="/admin/config/network" label="Network" active=menuConfigNetwork}}
32
+ {{> ui/menu-item href="/admin/config/tls" label="TLS Certificates" active=menuConfigTls}}
32
33
  {{> ui/menu-item href="/admin/config/smtp" label="SMTP Server" active=menuConfigSmtp}}
33
34
  {{> ui/menu-item href="/admin/config/imap-proxy" label="IMAP Proxy" active=menuConfigImapProxy}}
34
35
  {{> ui/menu-item href="/admin/config/branding" label="Branding" active=menuConfigBranding}}
@@ -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
- <script src="/static/js/ace/ace.js"></script>
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
- Client-side rendered delivery-test results (SPF/DKIM/DMARC). This template
3
- is injected into the page as text and compiled by the browser Handlebars
4
- runtime (see accounts/account.hbs), which registers the statusColor and
5
- statusIcon helpers it relies on. Native details/summary panels - no JS.
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">
@@ -1,4 +1,4 @@
1
- <script>
1
+ <script nonce="{{cspNonce}}">
2
2
  // Apply the stored theme before first paint to avoid a flash; when unset, the
3
3
  // stylesheet falls back to prefers-color-scheme. The "eeTheme" storage contract
4
4
  // is shared with the theme toggle in static/js/ui.js.
@@ -1,6 +1,13 @@
1
1
  {{!-- Security (TLS) card shared by the SMTP and IMAP proxy config pages.
2
- Renders inside the settings form; pair with tls_security_modal (after
3
- the form) and tls_security_js (inside the page script).
2
+ The checkbox decides whether this listener speaks TLS; which certificate
3
+ it serves is decided on /admin/config/tls and only summarized here.
4
+
5
+ It used to do both. Ticking it fired an ACME order in the foreground,
6
+ before the setting had been saved, and unticked itself when the order
7
+ failed - so the page stopped matching the stored setting, and the reason
8
+ was never shown. The listener now always has a certificate to start with
9
+ (a self-signed one if nothing better exists), which is what lets this be
10
+ an ordinary checkbox again.
4
11
  Params:
5
12
  field - the TLS-enabled setting name, also the checkbox id/name
6
13
  (smtpServerTLSEnabled / imapProxyServerTLSEnabled) --}}
@@ -12,65 +19,30 @@
12
19
  <div>
13
20
  {{> ui/setting-ref name=field}}
14
21
 
15
- {{!-- hand-rolled checkbox: the label carries the #tls-label
16
- badge whose badge-{type} class and tooltip body are
17
- repainted by paintCertData() from ui.js. Certificates can
18
- only be provisioned for a real domain (serviceDomain is
19
- false when the Service URL is unset, an IP or localhost),
20
- so without one the checkbox is disabled - except when TLS
21
- is already on, so it can still be turned off. --}}
22
22
  <div class="flex items-center gap-2">
23
- <input type="checkbox"
24
- class="checkbox checkbox-sm trigger-example-render{{#if (lookup errors field)}} is-invalid{{/if}}"
25
- id="{{field}}" {{#if certificateData}}data-certificate="{{certificateData.fingerprint}}" {{/if}}
26
- {{#if serviceDomain}}data-domain="{{serviceDomain}}" {{/if}}name="{{field}}" {{#if (lookup values
27
- field)}}checked{{/if}}
28
- {{#unless serviceDomain}}{{#unless (lookup values field)}}disabled{{/unless}}{{/unless}} />
23
+ {{> ui/checkbox id=field name=field label="Enable TLS Encryption" class="trigger-example-render"
24
+ checked=(lookup values field) error=(lookup errors field)}}
29
25
 
30
- <label class="label-text p-0" for="{{field}}">Enable TLS Encryption
31
-
32
- {{#if certificateData.label}}
33
- {{#> ui/tooltip text=certificateData.label.title}}
34
- <span id="tls-label" class="badge badge-{{eeColor certificateData.label.type}}"
35
- data-labeltype="{{certificateData.label.type}}">{{certificateData.label.text}}</span>
36
- {{/ui/tooltip}}
37
- {{/if}}
38
-
39
- </label>
26
+ {{#if tlsSummary.label}}
27
+ {{#> ui/tooltip text=tlsSummary.label.title}}
28
+ {{> ui/badge label=tlsSummary.label.text variant=tlsSummary.label.type elId="tls-label"}}
29
+ {{/ui/tooltip}}
30
+ {{/if}}
40
31
  </div>
41
32
 
42
- {{#if (lookup errors field)}}
43
- <span class="helper-text text-error">{{lookup errors field}}</span>
44
- {{/if}}
45
-
46
33
  <span class="helper-text">
47
- {{#if serviceDomain}}
48
-
49
- Certificates will be provisioned for <em>{{serviceDomain}}</em>. Change the domain in <a
50
- href="/admin/config/service#settingsServiceUrl" class="link link-animated">Service URL
51
- settings</a>.
52
-
34
+ {{#if tlsSummary.hostname}}
35
+ Clients connect to <em>{{tlsSummary.hostname}}</em>, which is served with
36
+ {{#if tlsSummary.certificate}}a {{tlsSummary.certificate.sourceLabel}} certificate{{else}}no
37
+ certificate yet{{/if}}. Manage certificates on the <a href="/admin/config/tls"
38
+ class="link link-animated">TLS Certificates</a> page.
53
39
  {{else}}
54
-
55
- Set a domain name in <a href="/admin/config/service#settingsServiceUrl"
56
- class="link link-animated">Service URL settings</a> to enable automatic TLS certificates.
57
-
40
+ No hostname is configured, so this listener serves a self-signed certificate. Set a <a
41
+ href="/admin/config/service#settingsServiceUrl" class="link link-animated">Service URL</a> and
42
+ manage certificates on the <a href="/admin/config/tls" class="link link-animated">TLS
43
+ Certificates</a> page.
58
44
  {{/if}}
59
-
60
45
  </span>
61
46
  </div>
62
-
63
47
  </div>
64
-
65
- {{#if serviceDomain}}
66
- <div class="card-footer border-base-content/10 border-t px-6 py-4">
67
- <small class="text-base-content/60">
68
- <span class="icon-[tabler--info-circle] size-4 align-text-bottom"></span>
69
- EmailEngine must be publicly accessible at <em><a href="{{serviceUrl}}" target="_blank"
70
- rel="noopener noreferrer" class="link link-animated">{{serviceUrl}}</a></em> for automatic
71
- certificates. Otherwise, a self-signed certificate will be used.
72
- </small>
73
- </div>
74
- {{/if}}
75
-
76
48
  </div>
@@ -11,13 +11,14 @@
11
11
  variant - error|warning|info|success (default error); sets alert-<variant>
12
12
  title - bold heading text (optional)
13
13
  icon - override the leading icon (default icon-[tabler--alert-triangle])
14
+ class - extra classes, e.g. "mb-4" to override the default page-level spacing (optional)
14
15
  --}}
15
- <div class="alert alert-soft alert-{{#if variant}}{{variant}}{{else}}error{{/if}} mb-6 flex items-start gap-3"
16
+ <div class="alert alert-soft alert-{{#if variant}}{{variant}}{{else}}error{{/if}}{{#unless class}} mb-6{{/unless}} flex items-start gap-3{{#if class}} {{class}}{{/if}}"
16
17
  role="alert">
17
18
  <span class="{{#if icon}}{{icon}}{{else}}icon-[tabler--alert-triangle]{{/if}} size-5 shrink-0"></span>
18
19
  <div class="min-w-0">
19
20
  {{#if title}}<div class="font-semibold">{{title}}</div>{{/if}}
20
21
  {{!-- body content; own hash params neutralized so they do not fall through into nested ui/* calls --}}
21
- {{> @partial-block variant="" title="" icon=""}}
22
+ {{> @partial-block variant="" title="" icon="" class=""}}
22
23
  </div>
23
24
  </div>
@@ -9,9 +9,13 @@
9
9
  elId - element id (optional). NOT named `id`: Handlebars merges hash params
10
10
  into the caller's context, so a partial reading `id` also inherits one
11
11
  that merely happens to be in scope - a row's id inside {{#each}}
12
+ title - native tooltip text, for a badge whose one word needs a sentence
13
+ behind it (optional)
14
+ dataName/dataValue - one data-* attribute, e.g. dataName="cert-badge", for a
15
+ page script that repaints this badge later (optional)
12
16
  class - extra classes, e.g. "state-info" hooks (optional)
13
17
  --}}
14
- <span {{#if elId}}id="{{elId}}" {{/if}}class="badge badge-{{eeColor variant}}{{#if soft}} badge-soft{{/if}}{{#if class}} {{class}}{{/if}}">
18
+ <span {{#if elId}}id="{{elId}}" {{/if}}{{#if title}}title="{{title}}" {{/if}}{{#if dataName}}data-{{dataName}}="{{dataValue}}" {{/if}}class="badge badge-{{eeColor variant}}{{#if soft}} badge-soft{{/if}}{{#if class}} {{class}}{{/if}}">
15
19
  {{~#if icon}}<span class="{{icon}} size-3.5 shrink-0"></span>{{/if~}}
16
- {{~#if label includeZero=true}}{{label}}{{else if @partial-block}}{{> @partial-block label="" variant="" soft="" icon="" id="" class=""}}{{/if~}}
20
+ {{~#if label includeZero=true}}{{label}}{{else if @partial-block}}{{> @partial-block label="" variant="" soft="" icon="" id="" elId="" title="" dataName="" dataValue="" class=""}}{{/if~}}
17
21
  </span>
@@ -18,6 +18,9 @@
18
18
  id - element id (optional)
19
19
  class - extra classes (optional)
20
20
  overlay - value for data-overlay to open/close a ui/modal (optional)
21
+ dataName/dataValue - one data-* attribute, e.g. dataName="file-target", for a
22
+ delegated handler that reads it (optional). Pass literals only: the
23
+ attribute name is interpolated unescaped, so it must never come from data
21
24
  disabled - truthy to render the button disabled. Also adds pointer-events-none,
22
25
  because a disabled control dispatches no mouse events and a wrapping
23
26
  {{#> ui/tooltip}} would never see the hover that is meant to explain
@@ -32,7 +35,7 @@ btn{{#unless bare}} btn-{{#if variant}}{{variant}}{{else}}primary{{/if}}{{/unles
32
35
  {{#if icon}}<span class="{{icon}} size-4 shrink-0"></span>{{/if}}{{label}}
33
36
  {{~/inline}}
34
37
  {{#if href}}
35
- <a href="{{href}}" {{#if id}}id="{{id}}" {{/if}}{{#if external}}target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" {{/if}}class="{{> btnClasses}}">{{> btnContent}}</a>
38
+ <a href="{{href}}" {{#if id}}id="{{id}}" {{/if}}{{#if dataName}}data-{{dataName}}="{{dataValue}}" {{/if}}{{#if external}}target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" {{/if}}class="{{> btnClasses}}">{{> btnContent}}</a>
36
39
  {{else}}
37
- <button type="{{#if type}}{{type}}{{else}}button{{/if}}" {{#if id}}id="{{id}}" {{/if}}{{#if overlay}}data-overlay="{{overlay}}" {{/if}}{{#if disabled}}disabled {{/if}}class="{{> btnClasses}}">{{> btnContent}}</button>
40
+ <button type="{{#if type}}{{type}}{{else}}button{{/if}}" {{#if id}}id="{{id}}" {{/if}}{{#if overlay}}data-overlay="{{overlay}}" {{/if}}{{#if dataName}}data-{{dataName}}="{{dataValue}}" {{/if}}{{#if disabled}}disabled {{/if}}class="{{> btnClasses}}">{{> btnContent}}</button>
38
41
  {{/if}}
@@ -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
- Not usable from browser-compiled templates (test_send.hbs) - those cannot
16
- resolve server-side partials.
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}}>
@@ -3,7 +3,7 @@
3
3
  configured target URL). --}}
4
4
  {{> filter_editor_js hasMap=true}}
5
5
 
6
- <script>
6
+ <script nonce="{{cspNonce}}">
7
7
  document.addEventListener('DOMContentLoaded', () => {
8
8
 
9
9
  const sendTestPayload = async () => {
@@ -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
- <script src="/static/js/ace/ace.js"></script>
134
- <script>
133
+ {{> ace_assets}}
134
+ <script nonce="{{cspNonce}}">
135
135
  document.addEventListener('DOMContentLoaded', () => {
136
136
 
137
137
  function showAlert(title, content) {
@@ -294,7 +294,7 @@
294
294
  </div>
295
295
  {{/ui/modal}}
296
296
 
297
- <script>
297
+ <script nonce="{{cspNonce}}">
298
298
  document.addEventListener('DOMContentLoaded', () => {
299
299
 
300
300
  let showTokenValueElm = document.getElementById('showTokenValue');
@@ -37,7 +37,7 @@ focus ring on) the corner close button --}}
37
37
  </div>
38
38
  </dialog>
39
39
 
40
- <script>
40
+ <script nonce="{{cspNonce}}">
41
41
  document.addEventListener('DOMContentLoaded', () => {
42
42
 
43
43
  document.getElementById('resubscribe-link').addEventListener('click', e => {
@@ -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
- <script src="/static/js/ace/ace.js"></script>
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