From c2499f6779ba5300594556d24d9fb89b0eabd4f1 Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 2 Dec 2023 16:14:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Base64=20=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/preprocessors/index.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/package.json b/backend/package.json index b4392238c..e1ea87dc0 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.108", + "version": "2.14.109", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/preprocessors/index.js b/backend/src/core/proxy-utils/preprocessors/index.js index c023cb2ef..f495d5999 100644 --- a/backend/src/core/proxy-utils/preprocessors/index.js +++ b/backend/src/core/proxy-utils/preprocessors/index.js @@ -25,7 +25,10 @@ function Base64Encoded() { ]; const test = function (raw) { - return keys.some((k) => raw.indexOf(k) !== -1); + return ( + !/^\w+:\/\/\w+/im.test(raw) && + keys.some((k) => raw.indexOf(k) !== -1) + ); }; const parse = function (raw) { raw = Base64.decode(raw);