From 61e0c582a0475ec5a3bc756305f504ad5bc9b860 Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 31 Mar 2019 20:01:02 +0800 Subject: [PATCH] Fix decodeRoute --- libs/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/utils.js b/libs/utils.js index 2aab843f..26c8b8e2 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -485,8 +485,9 @@ utils.prototype.decodeRoute = function (route) { // 解压缩 try { var v = LZString.decompressFromBase64(route); - if (/^[a-zA-Z0-9+\/=:()]*$/.test(v)) { - route = v; + if (v != null && /^[-_a-zA-Z0-9+\/=:()]*$/.test(v)) { + if (v != "" || route.length < 8) + route = v; } } catch (e) { }