roster-server 2.3.4 → 2.3.6
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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: oyzcq7vmk6
|
|
3
|
+
type: work-log
|
|
4
|
+
title: Committed and pushed greenlock notify fix
|
|
5
|
+
created: '2026-03-16 15:55:18'
|
|
6
|
+
---
|
|
7
|
+
Created commit bfdb456 on master and pushed to origin/master. Changes: improved notify() detail-to-message normalization in index.js to handle Error objects, undefined/non-serializable inputs, and fallback to `[event] (no details)`; bumped package version to 2.3.4; added docs/generated/greenlock-notify-empty-details.md.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: blpic0aj8a
|
|
3
|
+
type: bugfix
|
|
4
|
+
title: 'Bugfix: Include domain in Greenlock notify logs'
|
|
5
|
+
created: '2026-03-16 16:25:57'
|
|
6
|
+
---
|
|
7
|
+
# Bug: Greenlock notify errors lacked domain context
|
|
8
|
+
|
|
9
|
+
**Symptom**: Timeout/certificate errors in `notify` logs did not clearly indicate which domain triggered the failure.
|
|
10
|
+
**Root cause**: `notify` logged only the normalized message and omitted available domain fields from Greenlock/ACME details.
|
|
11
|
+
**Solution**: Added domain extraction in `notify` from `subject`, `servername`, `domain`, `hostname`, `host`, `altnames`, `domains`, and `identifier.value`; prepends `[domain:<value>]` to log messages.
|
|
12
|
+
**Location**: index.js Greenlock `notify` callback.
|
package/index.js
CHANGED
|
@@ -736,6 +736,33 @@ class Roster {
|
|
|
736
736
|
cluster: this.cluster,
|
|
737
737
|
staging: this.staging,
|
|
738
738
|
notify: (event, details) => {
|
|
739
|
+
const eventDomain = (() => {
|
|
740
|
+
if (!details || typeof details !== 'object') return null;
|
|
741
|
+
|
|
742
|
+
const directKeys = ['subject', 'servername', 'domain', 'hostname', 'host'];
|
|
743
|
+
for (const key of directKeys) {
|
|
744
|
+
if (typeof details[key] === 'string' && details[key].trim()) {
|
|
745
|
+
return details[key].trim().toLowerCase();
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if (Array.isArray(details.altnames) && details.altnames.length > 0) {
|
|
750
|
+
const alt = details.altnames.find(name => typeof name === 'string' && name.trim());
|
|
751
|
+
if (alt) return alt.trim().toLowerCase();
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
if (Array.isArray(details.domains) && details.domains.length > 0) {
|
|
755
|
+
const domain = details.domains.find(name => typeof name === 'string' && name.trim());
|
|
756
|
+
if (domain) return domain.trim().toLowerCase();
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
if (details.identifier && typeof details.identifier.value === 'string' && details.identifier.value.trim()) {
|
|
760
|
+
return details.identifier.value.trim().toLowerCase();
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
return null;
|
|
764
|
+
})();
|
|
765
|
+
|
|
739
766
|
let msg;
|
|
740
767
|
if (typeof details === 'string') {
|
|
741
768
|
msg = details;
|
|
@@ -751,6 +778,9 @@ class Roster {
|
|
|
751
778
|
}
|
|
752
779
|
}
|
|
753
780
|
if (!msg || msg === 'undefined') msg = `[${event}] (no details)`;
|
|
781
|
+
if (eventDomain && !msg.includes(`[domain:${eventDomain}]`)) {
|
|
782
|
+
msg = `[domain:${eventDomain}] ${msg}`;
|
|
783
|
+
}
|
|
754
784
|
// Suppress known benign warnings from ACME when using acme-dns-01-cli
|
|
755
785
|
if (event === 'warning' && typeof msg === 'string') {
|
|
756
786
|
if (/acme-dns-01-cli.*(incorrect function signatures|deprecated use of callbacks)/i.test(msg)) return;
|