emailengine-app 2.72.2 → 2.72.4
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/CHANGELOG.md +52 -0
- package/Gruntfile.js +4 -1
- package/data/google-crawlers.json +1 -1
- package/lib/account.js +4 -3
- package/lib/autodetect-imap-settings.js +60 -11
- package/lib/consts.js +7 -0
- package/lib/email-client/gmail-client.js +4 -1
- package/lib/email-client/imap/mailbox.js +137 -30
- package/lib/email-client/imap/subconnection.js +105 -36
- package/lib/email-client/imap-client.js +331 -165
- package/lib/email-client/outlook/graph-api.js +3 -1
- package/lib/email-client/reconnect-backoff.js +38 -0
- package/lib/export.js +3 -2
- package/lib/imap-proxy-auth.js +2 -1
- package/lib/schemas.js +14 -0
- package/lib/settings.js +42 -11
- package/lib/smtp-auth.js +2 -1
- package/lib/sub-script.js +14 -3
- package/lib/tokens.js +2 -1
- package/lib/tools.js +122 -12
- package/lib/ui-routes/account-routes.js +340 -121
- package/lib/ui-routes/admin-config-routes.js +11 -1
- package/lib/ui-routes/unsubscribe-routes.js +69 -49
- package/package.json +23 -20
- package/sbom.json +1 -1
- package/static/js/ee-client.js +198 -140
- package/static/licenses.html +63 -73
- package/translations/messages.pot +106 -96
- package/views/accounts/register/imap-server.hbs +87 -17
- package/views/partials/oauth_form.hbs +4 -4
- package/views/unsubscribe.hbs +8 -17
- package/workers/api.js +124 -53
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Content-Type: text/plain; charset=ascii\n"
|
|
4
|
-
"POT-Creation-Date: 2026-
|
|
4
|
+
"POT-Creation-Date: 2026-07-10 09:25+0000\n"
|
|
5
5
|
|
|
6
6
|
#: views/error.hbs:4
|
|
7
|
-
#: workers/api.js:
|
|
7
|
+
#: workers/api.js:3028
|
|
8
8
|
msgid "Something went wrong"
|
|
9
9
|
msgstr ""
|
|
10
10
|
|
|
@@ -56,8 +56,8 @@ msgid "Try Again"
|
|
|
56
56
|
msgstr ""
|
|
57
57
|
|
|
58
58
|
#: views/unsubscribe.hbs:3
|
|
59
|
-
#: views/unsubscribe.hbs:
|
|
60
|
-
#: views/unsubscribe.hbs:
|
|
59
|
+
#: views/unsubscribe.hbs:60
|
|
60
|
+
#: views/unsubscribe.hbs:76
|
|
61
61
|
msgid "Unsubscribe"
|
|
62
62
|
msgstr ""
|
|
63
63
|
|
|
@@ -77,33 +77,28 @@ msgstr ""
|
|
|
77
77
|
msgid "Are you sure you want to re-subscribe your email address <em>%s</em>?"
|
|
78
78
|
msgstr ""
|
|
79
79
|
|
|
80
|
-
#: views/unsubscribe.hbs:
|
|
81
|
-
#: views/accounts/register/imap-server.hbs:
|
|
80
|
+
#: views/unsubscribe.hbs:30
|
|
81
|
+
#: views/accounts/register/imap-server.hbs:250
|
|
82
82
|
msgid "Close"
|
|
83
83
|
msgstr ""
|
|
84
84
|
|
|
85
|
-
#: views/unsubscribe.hbs:
|
|
85
|
+
#: views/unsubscribe.hbs:32
|
|
86
86
|
msgid "Subscribe"
|
|
87
87
|
msgstr ""
|
|
88
88
|
|
|
89
|
-
#: views/unsubscribe.hbs:
|
|
89
|
+
#: views/unsubscribe.hbs:54
|
|
90
90
|
msgid "Subscription resumed"
|
|
91
91
|
msgstr ""
|
|
92
92
|
|
|
93
|
-
#: views/unsubscribe.hbs:
|
|
93
|
+
#: views/unsubscribe.hbs:56
|
|
94
94
|
msgid "Your email address <em>%s</em> was re-subscribed."
|
|
95
95
|
msgstr ""
|
|
96
96
|
|
|
97
|
-
#: views/unsubscribe.hbs:
|
|
97
|
+
#: views/unsubscribe.hbs:71
|
|
98
98
|
#: views/accounts/register/imap.hbs:21
|
|
99
99
|
msgid "Email address"
|
|
100
100
|
msgstr ""
|
|
101
101
|
|
|
102
|
-
#: views/unsubscribe.hbs:81
|
|
103
|
-
#: views/accounts/register/imap.hbs:27
|
|
104
|
-
msgid "Enter your email address"
|
|
105
|
-
msgstr ""
|
|
106
|
-
|
|
107
102
|
#: views/accounts/register/imap.hbs:11
|
|
108
103
|
msgid "Your name"
|
|
109
104
|
msgstr ""
|
|
@@ -112,9 +107,13 @@ msgstr ""
|
|
|
112
107
|
msgid "Enter your full name"
|
|
113
108
|
msgstr ""
|
|
114
109
|
|
|
110
|
+
#: views/accounts/register/imap.hbs:27
|
|
111
|
+
msgid "Enter your email address"
|
|
112
|
+
msgstr ""
|
|
113
|
+
|
|
115
114
|
#: views/accounts/register/imap.hbs:31
|
|
116
|
-
#: views/accounts/register/imap-server.hbs:
|
|
117
|
-
#: views/accounts/register/imap-server.hbs:
|
|
115
|
+
#: views/accounts/register/imap-server.hbs:35
|
|
116
|
+
#: views/accounts/register/imap-server.hbs:127
|
|
118
117
|
msgid "Password"
|
|
119
118
|
msgstr ""
|
|
120
119
|
|
|
@@ -126,130 +125,130 @@ msgstr ""
|
|
|
126
125
|
msgid "Continue"
|
|
127
126
|
msgstr ""
|
|
128
127
|
|
|
129
|
-
#: views/accounts/register/
|
|
128
|
+
#: views/accounts/register/index.hbs:2
|
|
129
|
+
msgid "Choose your email account provider"
|
|
130
|
+
msgstr ""
|
|
131
|
+
|
|
132
|
+
#: views/accounts/register/index.hbs:15
|
|
133
|
+
msgid "Standard IMAP"
|
|
134
|
+
msgstr ""
|
|
135
|
+
|
|
136
|
+
#: views/accounts/register/imap-server.hbs:18
|
|
130
137
|
msgid "IMAP"
|
|
131
138
|
msgstr ""
|
|
132
139
|
|
|
133
|
-
#: views/accounts/register/imap-server.hbs:
|
|
134
|
-
#: views/accounts/register/imap-server.hbs:
|
|
140
|
+
#: views/accounts/register/imap-server.hbs:21
|
|
141
|
+
#: views/accounts/register/imap-server.hbs:113
|
|
135
142
|
msgid "Username"
|
|
136
143
|
msgstr ""
|
|
137
144
|
|
|
138
|
-
#: views/accounts/register/imap-server.hbs:
|
|
139
|
-
#: views/accounts/register/imap-server.hbs:
|
|
145
|
+
#: views/accounts/register/imap-server.hbs:44
|
|
146
|
+
#: views/accounts/register/imap-server.hbs:135
|
|
140
147
|
msgid "Important"
|
|
141
148
|
msgstr ""
|
|
142
149
|
|
|
143
|
-
#: views/accounts/register/imap-server.hbs:
|
|
144
|
-
#: views/accounts/register/imap-server.hbs:
|
|
145
|
-
#: views/accounts/register/imap-server.hbs:
|
|
146
|
-
#: views/accounts/register/imap-server.hbs:
|
|
150
|
+
#: views/accounts/register/imap-server.hbs:52
|
|
151
|
+
#: views/accounts/register/imap-server.hbs:59
|
|
152
|
+
#: views/accounts/register/imap-server.hbs:143
|
|
153
|
+
#: views/accounts/register/imap-server.hbs:150
|
|
147
154
|
msgid "Application Password"
|
|
148
155
|
msgstr ""
|
|
149
156
|
|
|
150
|
-
#: views/accounts/register/imap-server.hbs:
|
|
151
|
-
#: views/accounts/register/imap-server.hbs:
|
|
157
|
+
#: views/accounts/register/imap-server.hbs:53
|
|
158
|
+
#: views/accounts/register/imap-server.hbs:144
|
|
152
159
|
msgid "%s accounts require an application password for %s."
|
|
153
160
|
msgstr ""
|
|
154
161
|
|
|
155
|
-
#: views/accounts/register/imap-server.hbs:
|
|
156
|
-
#: views/accounts/register/imap-server.hbs:
|
|
162
|
+
#: views/accounts/register/imap-server.hbs:54
|
|
163
|
+
#: views/accounts/register/imap-server.hbs:144
|
|
157
164
|
msgid "Instructions"
|
|
158
165
|
msgstr ""
|
|
159
166
|
|
|
160
|
-
#: views/accounts/register/imap-server.hbs:
|
|
161
|
-
#: views/accounts/register/imap-server.hbs:
|
|
167
|
+
#: views/accounts/register/imap-server.hbs:74
|
|
168
|
+
#: views/accounts/register/imap-server.hbs:165
|
|
162
169
|
msgid "Hostname"
|
|
163
170
|
msgstr ""
|
|
164
171
|
|
|
165
|
-
#: views/accounts/register/imap-server.hbs:
|
|
166
|
-
#: views/accounts/register/imap-server.hbs:
|
|
172
|
+
#: views/accounts/register/imap-server.hbs:84
|
|
173
|
+
#: views/accounts/register/imap-server.hbs:175
|
|
167
174
|
msgid "Port"
|
|
168
175
|
msgstr ""
|
|
169
176
|
|
|
170
|
-
#: views/accounts/register/imap-server.hbs:
|
|
177
|
+
#: views/accounts/register/imap-server.hbs:98
|
|
171
178
|
msgid "TLS for IMAP"
|
|
172
179
|
msgstr ""
|
|
173
180
|
|
|
174
|
-
#: views/accounts/register/imap-server.hbs:
|
|
181
|
+
#: views/accounts/register/imap-server.hbs:99
|
|
175
182
|
msgid ""
|
|
176
183
|
"TLS (also known as SSL) is usually only needed when using port 993. For "
|
|
177
184
|
"other ports EmailEngine falls back to using STARTTLS based encryption."
|
|
178
185
|
msgstr ""
|
|
179
186
|
|
|
180
|
-
#: views/accounts/register/imap-server.hbs:
|
|
181
|
-
#: views/accounts/register/imap-server.hbs:
|
|
187
|
+
#: views/accounts/register/imap-server.hbs:101
|
|
188
|
+
#: views/accounts/register/imap-server.hbs:192
|
|
182
189
|
msgid "Use TLS"
|
|
183
190
|
msgstr ""
|
|
184
191
|
|
|
185
|
-
#: views/accounts/register/imap-server.hbs:
|
|
192
|
+
#: views/accounts/register/imap-server.hbs:110
|
|
186
193
|
msgid "SMTP"
|
|
187
194
|
msgstr ""
|
|
188
195
|
|
|
189
|
-
#: views/accounts/register/imap-server.hbs:
|
|
196
|
+
#: views/accounts/register/imap-server.hbs:189
|
|
190
197
|
msgid "TLS for SMTP"
|
|
191
198
|
msgstr ""
|
|
192
199
|
|
|
193
|
-
#: views/accounts/register/imap-server.hbs:
|
|
200
|
+
#: views/accounts/register/imap-server.hbs:190
|
|
194
201
|
msgid ""
|
|
195
202
|
"TLS (also known as SSL) is usually only needed when using port 465. For "
|
|
196
203
|
"other ports EmailEngine falls back to using STARTTLS based encryption."
|
|
197
204
|
msgstr ""
|
|
198
205
|
|
|
199
|
-
#: views/accounts/register/imap-server.hbs:
|
|
206
|
+
#: views/accounts/register/imap-server.hbs:208
|
|
200
207
|
msgid "Verify connection"
|
|
201
208
|
msgstr ""
|
|
202
209
|
|
|
203
|
-
#: views/accounts/register/imap-server.hbs:
|
|
210
|
+
#: views/accounts/register/imap-server.hbs:217
|
|
204
211
|
msgid "Save and continue"
|
|
205
212
|
msgstr ""
|
|
206
213
|
|
|
207
|
-
#: views/accounts/register/imap-server.hbs:
|
|
214
|
+
#: views/accounts/register/imap-server.hbs:225
|
|
208
215
|
msgid "Skip verification"
|
|
209
216
|
msgstr ""
|
|
210
217
|
|
|
211
|
-
#: views/accounts/register/imap-server.hbs:
|
|
218
|
+
#: views/accounts/register/imap-server.hbs:240
|
|
212
219
|
msgid "Connection test failed"
|
|
213
220
|
msgstr ""
|
|
214
221
|
|
|
215
|
-
#: views/accounts/register/imap-server.hbs:
|
|
222
|
+
#: views/accounts/register/imap-server.hbs:246
|
|
216
223
|
msgid "We couldn't connect with these settings. Check the errors below."
|
|
217
224
|
msgstr ""
|
|
218
225
|
|
|
219
|
-
#: views/accounts/register/imap-server.hbs:
|
|
226
|
+
#: views/accounts/register/imap-server.hbs:387
|
|
220
227
|
msgid "Error"
|
|
221
228
|
msgstr ""
|
|
222
229
|
|
|
223
|
-
#: views/accounts/register/imap-server.hbs:
|
|
230
|
+
#: views/accounts/register/imap-server.hbs:389
|
|
224
231
|
msgid "Invalid settings"
|
|
225
232
|
msgstr ""
|
|
226
233
|
|
|
227
|
-
#: views/accounts/register/imap-server.hbs:
|
|
234
|
+
#: views/accounts/register/imap-server.hbs:395
|
|
228
235
|
msgid "Couldn't connect to IMAP server"
|
|
229
236
|
msgstr ""
|
|
230
237
|
|
|
231
|
-
#: views/accounts/register/imap-server.hbs:
|
|
232
|
-
#: views/accounts/register/imap-server.hbs:
|
|
238
|
+
#: views/accounts/register/imap-server.hbs:397
|
|
239
|
+
#: views/accounts/register/imap-server.hbs:406
|
|
233
240
|
msgid "Server response:"
|
|
234
241
|
msgstr ""
|
|
235
242
|
|
|
236
|
-
#: views/accounts/register/imap-server.hbs:
|
|
243
|
+
#: views/accounts/register/imap-server.hbs:404
|
|
237
244
|
msgid "Couldn't connect to SMTP server"
|
|
238
245
|
msgstr ""
|
|
239
246
|
|
|
240
|
-
#: views/accounts/register/imap-server.hbs:
|
|
247
|
+
#: views/accounts/register/imap-server.hbs:464
|
|
241
248
|
msgid "Request failed."
|
|
242
249
|
msgstr ""
|
|
243
250
|
|
|
244
|
-
#:
|
|
245
|
-
msgid "Choose your email account provider"
|
|
246
|
-
msgstr ""
|
|
247
|
-
|
|
248
|
-
#: views/accounts/register/index.hbs:15
|
|
249
|
-
msgid "Standard IMAP"
|
|
250
|
-
msgstr ""
|
|
251
|
-
|
|
252
|
-
#: lib/autodetect-imap-settings.js:80
|
|
251
|
+
#: lib/autodetect-imap-settings.js:90
|
|
253
252
|
msgid ""
|
|
254
253
|
"Microsoft has disabled password-based sign-ins (including app passwords) "
|
|
255
254
|
"for Outlook.com, Hotmail.com, and Microsoft 365 email accounts. To "
|
|
@@ -257,86 +256,97 @@ msgid ""
|
|
|
257
256
|
"connect your account."
|
|
258
257
|
msgstr ""
|
|
259
258
|
|
|
260
|
-
#: lib/tools.js:
|
|
259
|
+
#: lib/tools.js:995
|
|
261
260
|
#: lib/ui-routes/unsubscribe-routes.js:28
|
|
261
|
+
#: lib/ui-routes/unsubscribe-routes.js:92
|
|
262
262
|
msgid "Invalid input"
|
|
263
263
|
msgstr ""
|
|
264
264
|
|
|
265
|
-
#: lib/tools.js:
|
|
265
|
+
#: lib/tools.js:1832
|
|
266
266
|
msgid "Signature validation failed"
|
|
267
267
|
msgstr ""
|
|
268
268
|
|
|
269
|
-
#: lib/tools.js:
|
|
270
|
-
#: lib/tools.js:
|
|
269
|
+
#: lib/tools.js:1855
|
|
270
|
+
#: lib/tools.js:1861
|
|
271
|
+
#: lib/tools.js:1866
|
|
272
|
+
#: lib/ui-routes/account-routes.js:1013
|
|
271
273
|
msgid "Invalid or expired account setup URL"
|
|
272
274
|
msgstr ""
|
|
273
275
|
|
|
274
|
-
#: lib/ui-routes/account-routes.js:
|
|
275
|
-
#: lib/ui-routes/account-routes.js:
|
|
276
|
-
#: lib/ui-routes/account-routes.js:
|
|
277
|
-
#: lib/ui-routes/account-routes.js:
|
|
278
|
-
#: lib/ui-routes/account-routes.js:
|
|
279
|
-
#: lib/ui-routes/account-routes.js:
|
|
280
|
-
#: workers/api.js:
|
|
281
|
-
#: workers/api.js:
|
|
276
|
+
#: lib/ui-routes/account-routes.js:451
|
|
277
|
+
#: lib/ui-routes/account-routes.js:492
|
|
278
|
+
#: lib/ui-routes/account-routes.js:732
|
|
279
|
+
#: lib/ui-routes/account-routes.js:785
|
|
280
|
+
#: lib/ui-routes/account-routes.js:1043
|
|
281
|
+
#: lib/ui-routes/account-routes.js:1135
|
|
282
|
+
#: workers/api.js:2203
|
|
283
|
+
#: workers/api.js:2557
|
|
282
284
|
msgid "Email Account Setup"
|
|
283
285
|
msgstr ""
|
|
284
286
|
|
|
285
|
-
#: lib/ui-routes/account-routes.js:
|
|
286
|
-
#: lib/ui-routes/account-routes.js:
|
|
287
|
-
#: lib/ui-routes/unsubscribe-routes.js:
|
|
287
|
+
#: lib/ui-routes/account-routes.js:517
|
|
288
|
+
#: lib/ui-routes/account-routes.js:549
|
|
289
|
+
#: lib/ui-routes/unsubscribe-routes.js:68
|
|
288
290
|
msgid "Invalid request. Check your input and try again."
|
|
289
291
|
msgstr ""
|
|
290
292
|
|
|
291
|
-
#: lib/ui-routes/account-routes.js:
|
|
292
|
-
|
|
293
|
+
#: lib/ui-routes/account-routes.js:682
|
|
294
|
+
msgid "Too many attempts for this setup link. Request a new setup link to continue."
|
|
295
|
+
msgstr ""
|
|
296
|
+
|
|
297
|
+
#: lib/ui-routes/account-routes.js:772
|
|
298
|
+
#: lib/ui-routes/account-routes.js:1072
|
|
293
299
|
msgid "Couldn't set up account. Try again."
|
|
294
300
|
msgstr ""
|
|
295
301
|
|
|
296
|
-
#: lib/ui-routes/account-routes.js:
|
|
297
|
-
#: lib/ui-routes/account-routes.js:
|
|
302
|
+
#: lib/ui-routes/account-routes.js:855
|
|
303
|
+
#: lib/ui-routes/account-routes.js:866
|
|
298
304
|
#: lib/ui-routes/admin-entities-routes.js:2020
|
|
299
305
|
msgid "Server hostname was not found"
|
|
300
306
|
msgstr ""
|
|
301
307
|
|
|
302
|
-
#: lib/ui-routes/account-routes.js:
|
|
303
|
-
#: lib/ui-routes/account-routes.js:
|
|
308
|
+
#: lib/ui-routes/account-routes.js:858
|
|
309
|
+
#: lib/ui-routes/account-routes.js:869
|
|
304
310
|
#: lib/ui-routes/admin-entities-routes.js:2023
|
|
305
311
|
msgid "Invalid username or password"
|
|
306
312
|
msgstr ""
|
|
307
313
|
|
|
308
|
-
#: lib/ui-routes/account-routes.js:
|
|
314
|
+
#: lib/ui-routes/account-routes.js:872
|
|
309
315
|
#: lib/ui-routes/admin-entities-routes.js:2026
|
|
310
316
|
msgid "Authentication credentials were not provided"
|
|
311
317
|
msgstr ""
|
|
312
318
|
|
|
313
|
-
#: lib/ui-routes/account-routes.js:
|
|
319
|
+
#: lib/ui-routes/account-routes.js:875
|
|
314
320
|
#: lib/ui-routes/admin-entities-routes.js:2029
|
|
315
321
|
msgid "OAuth2 authentication failed"
|
|
316
322
|
msgstr ""
|
|
317
323
|
|
|
318
|
-
#: lib/ui-routes/account-routes.js:
|
|
319
|
-
#: lib/ui-routes/account-routes.js:
|
|
324
|
+
#: lib/ui-routes/account-routes.js:878
|
|
325
|
+
#: lib/ui-routes/account-routes.js:882
|
|
320
326
|
#: lib/ui-routes/admin-entities-routes.js:2032
|
|
321
327
|
#: lib/ui-routes/admin-entities-routes.js:2036
|
|
322
328
|
msgid "TLS protocol error"
|
|
323
329
|
msgstr ""
|
|
324
330
|
|
|
325
|
-
#: lib/ui-routes/account-routes.js:
|
|
331
|
+
#: lib/ui-routes/account-routes.js:886
|
|
326
332
|
#: lib/ui-routes/admin-entities-routes.js:2040
|
|
327
333
|
msgid "Connection timed out"
|
|
328
334
|
msgstr ""
|
|
329
335
|
|
|
330
|
-
#: lib/ui-routes/account-routes.js:
|
|
336
|
+
#: lib/ui-routes/account-routes.js:889
|
|
331
337
|
#: lib/ui-routes/admin-entities-routes.js:2043
|
|
332
338
|
msgid "Could not connect to server"
|
|
333
339
|
msgstr ""
|
|
334
340
|
|
|
335
|
-
#: lib/ui-routes/account-routes.js:
|
|
341
|
+
#: lib/ui-routes/account-routes.js:892
|
|
336
342
|
#: lib/ui-routes/admin-entities-routes.js:2046
|
|
337
343
|
msgid "Unexpected server response"
|
|
338
344
|
msgstr ""
|
|
339
345
|
|
|
346
|
+
#: lib/ui-routes/account-routes.js:1001
|
|
347
|
+
msgid "Temporary error, please try again"
|
|
348
|
+
msgstr ""
|
|
349
|
+
|
|
340
350
|
#: lib/ui-routes/admin-config-routes.js:145
|
|
341
351
|
msgid "Invalid API key for OpenAI"
|
|
342
352
|
msgstr ""
|
|
@@ -380,18 +390,18 @@ msgid ""
|
|
|
380
390
|
msgstr ""
|
|
381
391
|
|
|
382
392
|
#: lib/ui-routes/unsubscribe-routes.js:38
|
|
383
|
-
#: lib/ui-routes/unsubscribe-routes.js:156
|
|
384
393
|
#: lib/ui-routes/unsubscribe-routes.js:173
|
|
385
|
-
#: lib/ui-routes/unsubscribe-routes.js:
|
|
394
|
+
#: lib/ui-routes/unsubscribe-routes.js:198
|
|
395
|
+
#: lib/ui-routes/unsubscribe-routes.js:233
|
|
386
396
|
msgid "Subscription Management"
|
|
387
397
|
msgstr ""
|
|
388
398
|
|
|
389
|
-
#: lib/ui-routes/unsubscribe-routes.js:
|
|
390
|
-
#: lib/ui-routes/unsubscribe-routes.js:
|
|
399
|
+
#: lib/ui-routes/unsubscribe-routes.js:192
|
|
400
|
+
#: lib/ui-routes/unsubscribe-routes.js:226
|
|
391
401
|
msgid "Couldn't process request. Try again."
|
|
392
402
|
msgstr ""
|
|
393
403
|
|
|
394
|
-
#: workers/api.js:
|
|
395
|
-
#: workers/api.js:
|
|
404
|
+
#: workers/api.js:3027
|
|
405
|
+
#: workers/api.js:3142
|
|
396
406
|
msgid "Requested page not found"
|
|
397
407
|
msgstr ""
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
<input type="hidden" name="email" value="{{values.email}}">
|
|
6
6
|
<input type="hidden" name="name" value="{{values.name}}">
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
{{!-- The appPassword_* hint values are server-derived only (initial render and the failAction
|
|
9
|
+
re-render both compute them from the static provider table), never read back from the
|
|
10
|
+
submission - the payload schemas stripUnknown any posted copy. Do not reintroduce hidden
|
|
11
|
+
inputs for them: echoing a client-controlled hint into the page was an XSS vector. --}}
|
|
13
12
|
|
|
14
13
|
<input type="hidden" id="tz" name="tz" value="{{values.tz}}">
|
|
15
14
|
|
|
@@ -270,10 +269,79 @@
|
|
|
270
269
|
let submitDownElm = document.getElementById('submit-settings-btn-down')
|
|
271
270
|
let errorsListElm = document.getElementById('test-errors-list')
|
|
272
271
|
|
|
273
|
-
let
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
272
|
+
let submitButtons = [submitElm, submitDownElm, document.getElementById('submit-wo-testing')];
|
|
273
|
+
let setSubmitButtonsDisabled = (disabled) => {
|
|
274
|
+
for (let elm of submitButtons) {
|
|
275
|
+
// NB: 'submit-wo-testing' is an <a> anchor, so `.disabled` on it is a no-op expando (anchors
|
|
276
|
+
// have no disabled semantics) - this only greys out the two real <button>s. That is fine: the
|
|
277
|
+
// actual duplicate-submit guard is the formSubmitting latch in submitForm(), which every path
|
|
278
|
+
// (including the anchor's click handler) routes through. This is cosmetic-only, not the guard.
|
|
279
|
+
elm.disabled = disabled;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
let formSubmitting = false;
|
|
284
|
+
let submitRecoveryTimer = null;
|
|
285
|
+
let resetSubmitGuard = () => {
|
|
286
|
+
formSubmitting = false;
|
|
287
|
+
if (submitRecoveryTimer) {
|
|
288
|
+
clearTimeout(submitRecoveryTimer);
|
|
289
|
+
submitRecoveryTimer = null;
|
|
290
|
+
}
|
|
291
|
+
setSubmitButtonsDisabled(false);
|
|
292
|
+
};
|
|
293
|
+
let submitForm = () => {
|
|
294
|
+
// The server claims a single-use nonce, so a second POST from a double-click loses the race and
|
|
295
|
+
// renders a 403 even though the first request created the account. Submit at most once and
|
|
296
|
+
// disable the submit controls so a duplicate submission cannot fire.
|
|
297
|
+
if (formSubmitting) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
// myForm.submit() below bypasses HTML5 constraint validation (unlike a real submit button), so
|
|
301
|
+
// run it explicitly - otherwise a cleared required field round-trips to the server, 400s, and the
|
|
302
|
+
// re-render wipes the password fields. Bail (without latching the guard) so the user can fix it.
|
|
303
|
+
if (!myForm.reportValidity()) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
formSubmitting = true;
|
|
307
|
+
setSubmitButtonsDisabled(true);
|
|
308
|
+
// Recovery timer for an aborted submit: a successful submit navigates away (this page and the
|
|
309
|
+
// timer are discarded) and a validation error reloads the page fresh, so this only fires when the
|
|
310
|
+
// navigation never happened - the user cancelled it (Esc / Stop) while the page stayed alive. There
|
|
311
|
+
// is no DOM event for an aborted navigation, so without this the one-shot guard would leave the form
|
|
312
|
+
// permanently unsubmittable. Re-enabling is safe: the server's single-use nonce is the real
|
|
313
|
+
// double-submit guard, so at worst a later duplicate POST is rejected server-side. The delay is a
|
|
314
|
+
// generous upper bound on a create round trip so it never re-arms a genuinely in-flight submit.
|
|
315
|
+
submitRecoveryTimer = setTimeout(resetSubmitGuard, 20 * 1000);
|
|
316
|
+
myForm.submit();
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// Reset the one-shot guard when the page is restored from the back-forward cache (Back after a
|
|
320
|
+
// submit): bfcache keeps JS state, so without this the flag stays set and the buttons stay disabled,
|
|
321
|
+
// permanently deadening the form. Mirrors the global bfcache reset in static/js/app.js.
|
|
322
|
+
window.addEventListener('pageshow', e => {
|
|
323
|
+
if (!e.persisted) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
resetSubmitGuard();
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
let appendLinkified = (parentElm, text) => {
|
|
330
|
+
// Split on URLs and append text nodes + anchors via DOM APIs so server-provided text is
|
|
331
|
+
// never parsed as HTML (avoids an innerHTML injection sink).
|
|
332
|
+
let parts = String(text == null ? '' : text).split(/(https?:\/\/[^\s]+)/g);
|
|
333
|
+
for (let part of parts) {
|
|
334
|
+
if (/^https?:\/\//.test(part)) {
|
|
335
|
+
let a = document.createElement('a');
|
|
336
|
+
a.href = part;
|
|
337
|
+
a.target = '_blank';
|
|
338
|
+
a.rel = 'noopener noreferrer';
|
|
339
|
+
a.textContent = part;
|
|
340
|
+
parentElm.appendChild(a);
|
|
341
|
+
} else if (part) {
|
|
342
|
+
parentElm.appendChild(document.createTextNode(part));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
277
345
|
}
|
|
278
346
|
|
|
279
347
|
let addErrorRow = (type, text, extraLabel, extraText) => {
|
|
@@ -300,9 +368,7 @@
|
|
|
300
368
|
extraLabelElm.textContent = extraLabel;
|
|
301
369
|
|
|
302
370
|
extraTextElm = document.createElement('small');
|
|
303
|
-
extraTextElm
|
|
304
|
-
|
|
305
|
-
extraTextElm.innerHTML = urlify(extraTextElm.innerHTML);
|
|
371
|
+
appendLinkified(extraTextElm, extraText);
|
|
306
372
|
|
|
307
373
|
valueContainerElm.appendChild(extraLabelElm);
|
|
308
374
|
valueContainerElm.appendChild(extraTextElm);
|
|
@@ -315,11 +381,14 @@
|
|
|
315
381
|
errorsListElm.innerHTML = '';
|
|
316
382
|
|
|
317
383
|
if (data.error && !data.fields) {
|
|
318
|
-
|
|
384
|
+
// A Hapi/Boom error body carries the human-readable text in data.message and only the
|
|
385
|
+
// status name in data.error ('Forbidden', 'Too Many Requests'); the client-side catch
|
|
386
|
+
// path passes { error: Error } instead, hence the fallbacks.
|
|
387
|
+
addErrorRow(`{{_ "Error" templateLocale }}`, data.message || data.error.message || data.error)
|
|
319
388
|
} else if (data.fields) {
|
|
320
389
|
addErrorRow(`{{_ "Invalid settings" templateLocale }}`, data.message);
|
|
321
390
|
for (let field of data.fields) {
|
|
322
|
-
addErrorRow('-', field.message
|
|
391
|
+
addErrorRow('-', field.message);
|
|
323
392
|
}
|
|
324
393
|
} else {
|
|
325
394
|
if (!data.imap || !data.imap.success) {
|
|
@@ -417,7 +486,7 @@
|
|
|
417
486
|
|
|
418
487
|
if (continueIfSuccessful) {
|
|
419
488
|
// resubmit after paint
|
|
420
|
-
setTimeout(() =>
|
|
489
|
+
setTimeout(() => submitForm(), 10);
|
|
421
490
|
}
|
|
422
491
|
|
|
423
492
|
} else {
|
|
@@ -436,7 +505,7 @@
|
|
|
436
505
|
document.getElementById('submit-wo-testing').addEventListener('click', e => {
|
|
437
506
|
e.preventDefault();
|
|
438
507
|
formTested = true;
|
|
439
|
-
|
|
508
|
+
submitForm();
|
|
440
509
|
});
|
|
441
510
|
|
|
442
511
|
btnElm.addEventListener('click', () => {
|
|
@@ -445,10 +514,11 @@
|
|
|
445
514
|
|
|
446
515
|
myForm.addEventListener('submit', e => {
|
|
447
516
|
submitElm.blur();
|
|
517
|
+
e.preventDefault();
|
|
448
518
|
if (formTested) {
|
|
519
|
+
submitForm();
|
|
449
520
|
return;
|
|
450
521
|
}
|
|
451
|
-
e.preventDefault();
|
|
452
522
|
runTest(true);
|
|
453
523
|
});
|
|
454
524
|
|
|
@@ -764,10 +764,10 @@
|
|
|
764
764
|
</p>
|
|
765
765
|
|
|
766
766
|
<p>
|
|
767
|
-
<strong>Note:</strong> This is optional but recommended.
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
don't require this.
|
|
767
|
+
<strong>Note:</strong> This is optional but recommended. With a Pub/Sub service account, EmailEngine
|
|
768
|
+
receives changes in near real time. Without one, it falls back to polling each account about every 10
|
|
769
|
+
minutes, so webhooks for new, updated, or deleted emails (and bounce detection) still fire, just with up
|
|
770
|
+
to a 10-minute delay. Send-only accounts don't require this.
|
|
771
771
|
</p>
|
|
772
772
|
|
|
773
773
|
<label for="pubSubApp">Select service account to manage webhooks (optional). The service account must be for the
|
package/views/unsubscribe.hbs
CHANGED
|
@@ -18,17 +18,15 @@
|
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="modal-body">
|
|
21
|
-
{{_ "Are you sure you want to re-subscribe your email address <em>%s</em>?" templateLocale
|
|
22
|
-
}}
|
|
21
|
+
{{_ "Are you sure you want to re-subscribe your email address <em>%s</em>?" templateLocale
|
|
22
|
+
(escapeHtml values.email) }}
|
|
23
23
|
</div>
|
|
24
24
|
<div class="modal-footer">
|
|
25
25
|
<form method="post" action="/unsubscribe/address">
|
|
26
26
|
<input type="hidden" name="crumb" value="{{crumb}}">
|
|
27
27
|
<input type="hidden" name="action" value="subscribe">
|
|
28
|
-
<input type="hidden" name="
|
|
29
|
-
<input type="hidden" name="
|
|
30
|
-
<input type="hidden" name="messageId" value="{{values.messageId}}">
|
|
31
|
-
<input type="hidden" name="email" value="{{values.email}}">
|
|
28
|
+
<input type="hidden" name="data" value="{{values.data}}">
|
|
29
|
+
<input type="hidden" name="sig" value="{{values.sig}}">
|
|
32
30
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{_ "Close" templateLocale
|
|
33
31
|
}}</button>
|
|
34
32
|
<button type="submit" class="btn btn-primary">{{_ "Subscribe" templateLocale }}</button>
|
|
@@ -55,7 +53,7 @@
|
|
|
55
53
|
|
|
56
54
|
<h1 class="h4 text-gray-900 mb-4">{{_ "Subscription resumed" templateLocale }}</h1>
|
|
57
55
|
|
|
58
|
-
<p>{{_ "Your email address <em>%s</em> was re-subscribed." templateLocale values.email}}</p>
|
|
56
|
+
<p>{{_ "Your email address <em>%s</em> was re-subscribed." templateLocale (escapeHtml values.email)}}</p>
|
|
59
57
|
|
|
60
58
|
{{else}}
|
|
61
59
|
|
|
@@ -66,19 +64,12 @@
|
|
|
66
64
|
<form method="post" action="/unsubscribe/address">
|
|
67
65
|
<input type="hidden" id="crumb" name="crumb" value="{{crumb}}" />
|
|
68
66
|
<input type="hidden" name="action" value="unsubscribe">
|
|
69
|
-
<input type="hidden" name="
|
|
70
|
-
<input type="hidden" name="
|
|
71
|
-
<input type="hidden" name="messageId" value="{{values.messageId}}">
|
|
72
|
-
<input type="hidden" name="reason" value="form">
|
|
67
|
+
<input type="hidden" name="data" value="{{values.data}}">
|
|
68
|
+
<input type="hidden" name="sig" value="{{values.sig}}">
|
|
73
69
|
|
|
74
70
|
<div class="form-group">
|
|
75
71
|
<label for="email">{{_ "Email address" templateLocale }}</label>
|
|
76
|
-
<input type="email" class="form-control
|
|
77
|
-
value="{{values.email}}" required />
|
|
78
|
-
{{#if errors.email}}
|
|
79
|
-
<span class="invalid-feedback">{{errors.email}}</span>
|
|
80
|
-
{{/if}}
|
|
81
|
-
<small class="form-text text-muted">{{_ "Enter your email address" templateLocale }}</small>
|
|
72
|
+
<input type="email" class="form-control" id="email" value="{{values.email}}" readonly />
|
|
82
73
|
</div>
|
|
83
74
|
|
|
84
75
|
<div class="mt-3">
|