You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is code in queue_outbound_respond and queue_respond that assumes msg is a string, when passed a DSN object it ends up using returning "xxx [object Object] (uuid)" type strings.
When msg is an array I think you're going to have problems, too.
The errant bit of code code looks like this: ${msg} (${this.transaction.uuid})
Inside an interpolated string.
It's helpfully adding the uuid to the message string. Except if the msg is not a string but a DSN object.
This kind of error is much harder to make when using TypeScript.
Expected behavior
I expect the custom DSN objects using the haraka-dsn plugin should work the same for each hook.
Observed behavior
The message gets "[object Object]" in place of all that info in the DSN.
Steps To Reproduce
Create a plugin that uses hook_queue or hook_queue_outbound, call next(DENY, new DSN(...)); and observe the returned SMTP error message.
System Info:
This node 14 I think on Linux. The Haraka version is the head of the git repo.
Additional context
I think it would be enough to just check if typeof msg === 'string' or whatever before appending the uuid.
The text was updated successfully, but these errors were encountered:
Describe the bug
There is code in queue_outbound_respond and queue_respond that assumes msg is a string, when passed a DSN object it ends up using returning "xxx [object Object] (uuid)" type strings.
When msg is an array I think you're going to have problems, too.
The errant bit of code code looks like this:
${msg} (${this.transaction.uuid})
Inside an interpolated string.
It's helpfully adding the uuid to the message string. Except if the msg is not a string but a DSN object.
This kind of error is much harder to make when using TypeScript.
Expected behavior
I expect the custom DSN objects using the haraka-dsn plugin should work the same for each hook.
Observed behavior
The message gets "[object Object]" in place of all that info in the DSN.
Steps To Reproduce
Create a plugin that uses hook_queue or hook_queue_outbound, call next(DENY, new DSN(...)); and observe the returned SMTP error message.
System Info:
This node 14 I think on Linux. The Haraka version is the head of the git repo.
Additional context
I think it would be enough to just check if typeof msg === 'string' or whatever before appending the uuid.
The text was updated successfully, but these errors were encountered: