This commit is contained in:
Philipp Kunz 2025-05-22 09:39:31 +00:00
parent d584f3584c
commit 7c0f9b4e44

View File

@ -224,7 +224,7 @@ export class DataHandler implements IDataHandler {
.replace(/\n\.\r\n$/, '')
.replace(/\r\n\.\n$/, '')
.replace(/\n\.\n$/, '')
.replace(/\.$/, ''); // Handle a lone dot at the end
.replace(/^\.$/, ''); // Handle ONLY a lone dot as the entire content (not trailing dots)
// Remove dot-stuffing (RFC 5321, section 4.5.2)
result = result.replace(/\r\n\.\./g, '\r\n.');
@ -262,7 +262,7 @@ export class DataHandler implements IDataHandler {
.replace(/\n\.\r\n$/, '')
.replace(/\r\n\.\n$/, '')
.replace(/\n\.\n$/, '')
.replace(/\.$/, ''); // Handle a lone dot at the end
.replace(/^\.$/, ''); // Handle ONLY a lone dot as the entire content (not trailing dots)
// Remove dot-stuffing (RFC 5321, section 4.5.2)
session.emailData = session.emailData.replace(/\r\n\.\./g, '\r\n.');