From b3b6e903e7434f0327222629affea024554670eb Mon Sep 17 00:00:00 2001 From: Liu Xing Date: Fri, 22 Mar 2013 10:11:32 +0800 Subject: [PATCH] #132 Add https:// validate on user.js cnodejs/nodeclub#132 --- controllers/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/user.js b/controllers/user.js index 5dbb1fe877..9d93bde209 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -126,7 +126,7 @@ exports.setting = function (req, res, next) { if (url !== '') { try { - if (url.indexOf('http://') < 0) { + if ((url.indexOf('http://') < 0) && (url.indexOf('https://') < 0)) { url = 'http://' + url; } check(url, '不正确的个人网站。').isUrl();