haraka / email-message Goto Github PK
View Code? Open in Web Editor NEWHaraka email message
Home Page: https://www.npmjs.com/package/haraka-email-message
License: MIT License
Haraka email message
Home Page: https://www.npmjs.com/package/haraka-email-message
License: MIT License
Haraka | Haraka.js — Version: 2.8.24 |
---|---|
Node | v8.15.1 |
OS | Linux mail.myserver.com 4.14.94-73.73.amzn1.x86_64 haraka/Haraka#1 SMP Tue Jan 22 20:25:24 UTC 2019 x86_64 GNU/Linux |
openssl | OpenSSL 1.1.0j 20 Nov 2018 |
Headers that have non-ASCII content must also encode whitespace to comply with RFC 2047. From Section 2 of the RFC (https://tools.ietf.org/html/rfc2047):
IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's
by an RFC 822 parser. As a consequence, unencoded white space
characters (such as SPACE and HTAB) are FORBIDDEN within an
'encoded-word'. For example, the character sequence=?iso-8859-1?q?this is some text?=
would be parsed as four 'atom's, rather than as a single 'atom' (by
an RFC 822 parser) or 'encoded-word' (by a parser which understands
'encoded-words'). The correct way to encode the string "this is some
text" is to encode the SPACE characters as well, e.g.=?iso-8859-1?q?this=20is=20some=20text?=
Whitespace characters are not encoded.
The test in tests/mailheader.js
, on line 73, demonstrates the bug itself:
this.h.add('Bar', 'bøø 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890');
test.equal(this.h.lines()[0], 'Bar: =?UTF-8?q?b=C3=B8=C3=B8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?=\n');
For correct RFC syntax checking, the test.equal
should be:
test.equal(this.h.lines()[0], 'Bar: =?UTF-8?q?b=C3=B8=C3=B8=201234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?=\n');
(Note the encoded space before the long string of numbers.)
[files]
in package.json instead of .npmignore.node --test
in v18+A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.