Skip to content

Commit

Permalink
Bumped deps
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Mar 8, 2024
1 parent c9c29f7 commit 0fe7f8d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/routes-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4944,7 +4944,7 @@ return payload;`)

let subexp = await settings.get('subexp');
let expiresDays;
if (subexp) {
if (subexp && !(request.app.licenseInfo && request.app.licenseInfo.details && request.app.licenseInfo.details.lt)) {
let delayMs = new Date(subexp) - Date.now();
expiresDays = Math.max(Math.ceil(delayMs / (24 * 3600 * 1000)), 0);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,10 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV3QUiYsp13nD9suD1/ZkEXnuMoSg
trial: rawLicenseData.t
};

if (rawLicenseData.l) {
licenseData.lt = true;
}

if (rawLicenseData.e) {
if (Date.now() > rawLicenseData.e) {
let err = new Error('License expired');
Expand Down
2 changes: 1 addition & 1 deletion sbom.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,15 @@ let licenseCheckHandler = async opts => {
checkKv = true;
}

if (licenseInfo.details.lt) {
await redis.hdel(`${REDIS_PREFIX}settings`, 'subexp');
}

if (
checkKv &&
licenseInfo.active &&
!(licenseInfo.details && licenseInfo.details.expires) &&
!licenseInfo.details.lt &&
(await redis.hUpdateBigger(`${REDIS_PREFIX}settings`, 'subcheck', now - subscriptionCheckTimeout, now))
) {
try {
Expand Down
2 changes: 1 addition & 1 deletion static/licenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,7 @@ <h1>EmailEngine v2.40.2</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/fast-redact">fast-redact</a></td>
<td>3.3.0</td>
<td>3.4.0</td>
<td>MIT</td>
<td>David Mark Clements</td>
<td>[email protected]</td>
Expand Down
32 changes: 16 additions & 16 deletions translations/messages.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=ascii\n"
"POT-Creation-Date: 2024-03-07 12:19+0000\n"
"POT-Creation-Date: 2024-03-08 09:05+0000\n"

#: views/config/license.hbs:48
msgid "%d day"
msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/unsubscribe.hbs:1
#: views/unsubscribe.hbs:79
msgid "Unsubscribe"
Expand Down Expand Up @@ -53,10 +57,6 @@ msgstr ""
msgid "Enter your email address"
msgstr ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/accounts/register/imap.hbs:11
msgid "Your name"
msgstr ""
Expand All @@ -80,6 +80,14 @@ msgstr ""
msgid "Continue"
msgstr ""

#: views/accounts/register/index.hbs:2
msgid "Choose your email account provider"
msgstr ""

#: views/accounts/register/index.hbs:15
msgid "Standard IMAP"
msgstr ""

#: views/accounts/register/imap-server.hbs:18
msgid "IMAP"
msgstr ""
Expand Down Expand Up @@ -181,14 +189,6 @@ msgstr ""
msgid "HTTP error!"
msgstr ""

#: views/accounts/register/index.hbs:2
msgid "Choose your email account provider"
msgstr ""

#: views/accounts/register/index.hbs:15
msgid "Standard IMAP"
msgstr ""

#: lib/routes-ui.js:580
msgid "Invalid API key for OpenAI"
msgstr ""
Expand Down Expand Up @@ -226,11 +226,11 @@ msgstr ""
msgid "Failed to process request"
msgstr ""

#: lib/tools.js:1395
#: lib/tools.js:1399
msgid "Signature validation failed"
msgstr ""

#: lib/tools.js:1404
#: lib/tools.js:1409
#: lib/tools.js:1408
#: lib/tools.js:1413
msgid "Invalid or expired account setup URL"
msgstr ""
7 changes: 5 additions & 2 deletions views/config/license.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,17 @@
<dt class="col-sm-3">Environment</dt>
<dd class="col-sm-9">{{licenseInfo.details.hostname}}</dd>


{{#if licenseDetails.expires}}
<dt class="col-sm-3">License expires</dt>
<dd class="col-sm-9">in {{licenseDetails.expiresDays}} days</dd>
{{/if}}

</dl>
{{#if licenseDetails.lt}}
<dt class="col-sm-3">License expires</dt>
<dd class="col-sm-9">This license does not expire</dd>
{{/if}}

</dl>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion workers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7854,7 +7854,7 @@ ${now}`,
});
}

if (subexp) {
if (subexp && !(request.app.licenseInfo && request.app.licenseInfo.details && request.app.licenseInfo.details.lt)) {
let delayMs = new Date(subexp) - Date.now();
let expiresDays = Math.max(Math.ceil(delayMs / (24 * 3600 * 1000)), 0);

Expand Down

0 comments on commit 0fe7f8d

Please sign in to comment.