Showing
1 changed file
with
1 additions
and
1 deletions
@@ -19,7 +19,7 @@ const _ = require('lodash'); | @@ -19,7 +19,7 @@ const _ = require('lodash'); | ||
19 | */ | 19 | */ |
20 | const safeRedirect = (uri) => { | 20 | const safeRedirect = (uri) => { |
21 | let formalUrl = url.parse(uri); // 匹配标准的URL | 21 | let formalUrl = url.parse(uri); // 匹配标准的URL |
22 | - let informalUrl = uri.match(/^\/\/(.+)/); // 尝试匹配 '//' 开头的不规范的URL | 22 | + let informalUrl = uri.match(/^\/\/(.*?)\//); // 尝试匹配 '//' 开头的不规范的URL |
23 | let matchFunc; | 23 | let matchFunc; |
24 | 24 | ||
25 | if (formalUrl.protocol) { | 25 | if (formalUrl.protocol) { |
-
Please register or login to post a comment