Skip to content

Commit

Permalink
fix: 修复 Base64 内容的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Dec 2, 2023
1 parent bf9210f commit c2499f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 4 additions & 1 deletion backend/src/core/proxy-utils/preprocessors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c2499f6

Please sign in to comment.