diff --git a/README.md b/README.md
index 674a65d..073104c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+[](https://github.com/trs/ftp-srv)
[](https://badge.fury.io/js/ftp-srv) [](https://travis-ci.org/trs/ftp-srv) [](https://github.com/semantic-release/semantic-release) [](http://commitizen.github.io/cz-cli/)
diff --git a/logo-generate.js b/logo-generate.js
new file mode 100644
index 0000000..50bf589
--- /dev/null
+++ b/logo-generate.js
@@ -0,0 +1,12 @@
+const fs = require('fs');
+const htmlConvert = require('html-convert');
+
+const convert = htmlConvert();
+let ws = fs.createWriteStream('logo.png');
+let rs = convert('./logo.html', {
+ width: 350,
+ height: 90
+});
+
+rs.pipe(ws);
+ws.on('finish', () => process.exit());
diff --git a/logo.html b/logo.html
index 9926dc5..445fcd8 100644
--- a/logo.html
+++ b/logo.html
@@ -2,42 +2,45 @@
-
+
- markunread_mailboxftp-srv
+
+
+ ftp-srv
+
diff --git a/package.json b/package.json
index 2857e07..609fd09 100644
--- a/package.json
+++ b/package.json
@@ -64,6 +64,7 @@
"eslint-config-google": "0.7.1",
"eslint-plugin-node": "3.0.5",
"ftp": "^0.3.10",
+ "html-convert": "^2.1.7",
"husky": "0.13.1",
"istanbul": "0.4.5",
"mocha": "3.2.0",
diff --git a/src/commands/registration/pbsz.js b/src/commands/registration/pbsz.js
index 308bca7..6e02687 100644
--- a/src/commands/registration/pbsz.js
+++ b/src/commands/registration/pbsz.js
@@ -1,7 +1,7 @@
module.exports = {
directive: 'PBSZ',
handler: function ({command} = {}) {
- if (!this.server._tls || !this.secure) return this.reply(202, 'Not suppored');
+ if (!this.secure) return this.reply(202, 'Not suppored');
this.bufferSize = parseInt(command.arg, 10);
return this.reply(200, this.bufferSize === 0 ? 'OK' : 'Buffer too large: PBSZ=0');
},
diff --git a/src/commands/registration/prot.js b/src/commands/registration/prot.js
index 98f24a3..78a94e4 100644
--- a/src/commands/registration/prot.js
+++ b/src/commands/registration/prot.js
@@ -3,7 +3,7 @@ const _ = require('lodash');
module.exports = {
directive: 'PROT',
handler: function ({command} = {}) {
- if (!this.server._tls || !this.secure) return this.reply(202, 'Not suppored');
+ if (!this.secure) return this.reply(202, 'Not suppored');
if (!this.bufferSize && typeof this.bufferSize !== 'number') return this.reply(503);
switch (_.toUpper(command.arg)) {
diff --git a/test/commands/registration/pbsz.spec.js b/test/commands/registration/pbsz.spec.js
index 72b896e..1bd1d7b 100644
--- a/test/commands/registration/pbsz.spec.js
+++ b/test/commands/registration/pbsz.spec.js
@@ -7,8 +7,7 @@ describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => when.resolve(),
- server: {},
- secure: true
+ server: {}
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
@@ -31,6 +30,7 @@ describe(CMD, function () {
});
it('// successful', done => {
+ mockClient.secure = true;
mockClient.server._tls = {};
cmdFn({command: {arg: '0'}})
@@ -43,6 +43,7 @@ describe(CMD, function () {
});
it('// successful', done => {
+ mockClient.secure = true;
mockClient.server._tls = {};
cmdFn({command: {arg: '10'}})
diff --git a/test/commands/registration/prot.spec.js b/test/commands/registration/prot.spec.js
index 4d59878..97b9376 100644
--- a/test/commands/registration/prot.spec.js
+++ b/test/commands/registration/prot.spec.js
@@ -7,8 +7,7 @@ describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => when.resolve(),
- server: {},
- secure: true
+ server: {}
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
@@ -32,6 +31,7 @@ describe(CMD, function () {
it('// unsuccessful - no bufferSize', done => {
mockClient.server._tls = {};
+ mockClient.secure = true;
cmdFn({command: {arg: 'P'}})
.then(() => {
@@ -43,6 +43,7 @@ describe(CMD, function () {
it('// successful', done => {
mockClient.bufferSize = 0;
+ mockClient.secure = true;
cmdFn({command: {arg: 'p'}})
.then(() => {
@@ -53,6 +54,7 @@ describe(CMD, function () {
});
it('// unsuccessful - unsupported', done => {
+ mockClient.secure = true;
cmdFn({command: {arg: 'C'}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(536);
@@ -62,6 +64,7 @@ describe(CMD, function () {
});
it('// unsuccessful - unknown', done => {
+ mockClient.secure = true;
cmdFn({command: {arg: 'QQ'}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(504);