test-smtp-server 0.9.1 → 0.9.2
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.
- package/README.md +1 -1
- package/build/lib/test-smtp-server.js +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ import { testSmtpServer } from "test-smtp-server";
|
|
|
60
60
|
|
|
61
61
|
### Security
|
|
62
62
|
|
|
63
|
-
The server is started as secure but that may not be
|
|
63
|
+
The server is started as secure but that may not be possible in the testing
|
|
64
64
|
environment. If the server does not have a valid certificate, the connection
|
|
65
65
|
will fail from the client side. Some clients
|
|
66
66
|
(e.g. nodemailer/SMTP-Transport options) allow connections to non-secure
|
|
@@ -64,7 +64,7 @@ class testSmtpServer {
|
|
|
64
64
|
this.server = new smtp_server_1.SMTPServer({
|
|
65
65
|
authOptional: true,
|
|
66
66
|
onConnect(session, callback) {
|
|
67
|
-
if (session.remoteAddress
|
|
67
|
+
if (!session.remoteAddress.match(/^127.0.0.1|::1$/)) {
|
|
68
68
|
return callback(new Error("Only connections from localhost allowed"));
|
|
69
69
|
}
|
|
70
70
|
return callback(); // Accept the connection
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-smtp-server",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "The test-smtp-server package allows internal testing of projects needing an SMTP server.",
|
|
5
5
|
"main": "./build/lib/test-smtp-server.js",
|
|
6
|
-
"xtype": "module",
|
|
7
6
|
"types": "./build/lib/test-smtp-server.d.ts",
|
|
8
7
|
"directories": {
|
|
9
8
|
"lib": "lib",
|