This commit is contained in:
1 parent
339df89fcf
commit
651c36367f
33 files changed
+1420
-40
No files matched your search
@@ -110,6 +110,7 @@ var T = {
|
||||
);
|
||||
// 下载地址仅允许 HTTP(S) 或站内绝对路径,拒绝反斜杠、空白控制字符和协议相对地址。
|
||||
function q(e) {
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝发票下载地址中的控制字符。
|
||||
return typeof e != `string` || /[\u0000-\u0020\\]/.test(e)
|
||||
? ``
|
||||
: /^https?:\/\//i.test(e) || /^\/(?!\/)/.test(e)
|
||||
|
||||
Reference in new issue
Block a user