From a5b7b0191fe98ca4ff7a8e5caf59a6a42cdc201e Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 24 Jan 2018 11:31:34 +0100 Subject: [PATCH] correct validation for 'channelName' --- storage/file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/file.js b/storage/file.js index 329d7f74f..33df00692 100644 --- a/storage/file.js +++ b/storage/file.js @@ -9,7 +9,7 @@ const Pull = require('pull-stream'); const isValidChannelId = function (id) { return typeof(id) === 'string' && - [32, 48].indexOf(id.length) > -1 && + id.length >= 32 && id.length < 50 && /^[a-zA-Z0-9=+-]*$/.test(id); }; @@ -470,4 +470,4 @@ module.exports.create = function ( setInterval(function () { flushUnusedChannels(env, function () { }); }, 5000); -}; \ No newline at end of file +};