This commit is contained in:
1 parent
339df89fcf
commit
651c36367f
33 files changed
+1420
-40
No files matched your search
@@ -3,6 +3,7 @@
|
||||
function e(e) {
|
||||
if (
|
||||
!/^(?:https?:\/\/|\/(?!\/)|\.\.?\/)/i.test(e) ||
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝附件 URL 内的控制字符。
|
||||
/[\u0000-\u001f\u007f\\]/.test(e)
|
||||
)
|
||||
return !1;
|
||||
@@ -56,6 +57,7 @@ function r(t) {
|
||||
u = c || (l ? n(l, i) : ``),
|
||||
d =
|
||||
l ||
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝附件名中的控制字符。
|
||||
(typeof o == `string` && !e(o) && !/[\\/:\u0000-\u001f]/.test(o)
|
||||
? o
|
||||
: ``),
|
||||
|
||||
Reference in new issue
Block a user