Skip to content

Commit

Permalink
fix: 修复 Base64 合法性判断
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 17, 2025
1 parent c3daea5 commit 7385e17
Show file tree
Hide file tree
Showing 2 changed files with 2 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.16.17",
"version": "2.16.18",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/proxy-utils/preprocessors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Base64Encoded() {
};
const parse = function (raw) {
const decoded = Base64.decode(raw);
if (!/^\w+:\/\/\w+/m.test(decoded)) {
if (!/^\w+(:\/\/|\s*?=\s*?)\w+/m.test(decoded)) {
$.error(
`Base64 Pre-processor error: decoded line does not start with protocol`,
);
Expand Down

0 comments on commit 7385e17

Please sign in to comment.