This commit is contained in:
1 parent
339df89fcf
commit
651c36367f
33 files changed
+1420
-40
No files matched your search
@@ -114,7 +114,7 @@ var fe = {
|
||||
let t = M.value.flatMap((e, t) => (e.enabled ? [t] : []));
|
||||
if (!t.length) return;
|
||||
let n = t.indexOf(N.value),
|
||||
r = n;
|
||||
r;
|
||||
if (e.key === `ArrowRight`) r = (n + 1) % t.length;
|
||||
else if (e.key === `ArrowLeft`) r = (n + t.length - 1) % t.length;
|
||||
else if (e.key === `Home`) r = 0;
|
||||
|
||||
@@ -41,6 +41,7 @@ var f = [`src`, `width`, `height`],
|
||||
// 仅接收站内绝对路径或无认证信息的 HTTP(S) 地址,拒绝控制字符和反斜杠。
|
||||
function m(e) {
|
||||
let t = String(e ?? ``).trim();
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝图标 URL 内的控制字符。
|
||||
if (!t || /[\u0000-\u0020\u007f\\]/.test(t)) return ``;
|
||||
if (/^\/(?!\/)/.test(t)) return t;
|
||||
try {
|
||||
|
||||
@@ -1002,7 +1002,7 @@ var le = {
|
||||
let Qe = computed(() =>
|
||||
Ie.value.map((e) => {
|
||||
let t = N.value[String(e.id)],
|
||||
n = ``;
|
||||
n;
|
||||
if (e.option_type === `cascade`) {
|
||||
let t = Re(e);
|
||||
n = Z(e).find((e) => e.item_id === t)?.label ?? ``;
|
||||
|
||||
@@ -836,7 +836,7 @@ var ae = {
|
||||
let Ze = computed(() =>
|
||||
(O.availableOptions?.value ?? F.value?.options ?? []).map((e) => {
|
||||
let t = I.value[e.id],
|
||||
n = ``;
|
||||
n;
|
||||
if (e.kind === `quantity`) {
|
||||
let r = (Ne(e) ? Le(e) : ``) || e.unit;
|
||||
n = typeof t == `number` ? `${t}${r ? ` ${r}` : ``}` : ``;
|
||||
|
||||
@@ -632,6 +632,7 @@ function W(e, t) {
|
||||
return;
|
||||
(W(), (N.value = ``));
|
||||
let t = L,
|
||||
// eslint-disable-next-line no-useless-assignment -- 边界一致性:保留 try 外 computed 求值及异常传播顺序。
|
||||
r = B.value;
|
||||
try {
|
||||
(G(), (t = L), (r = B.value));
|
||||
|
||||
@@ -4,12 +4,14 @@ function e(e) {
|
||||
typeof e != `string` ||
|
||||
!e.startsWith(`/`) ||
|
||||
e.startsWith(`//`) ||
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝跳转路径中的控制字符。
|
||||
/[\\\u0000-\u0020\u007f]/.test(e)
|
||||
)
|
||||
return `/`;
|
||||
try {
|
||||
// 路径解码后再次检查,避免编码后的双斜杠或反斜杠绕过站内限制。
|
||||
let t = decodeURIComponent(e.split(/[?#]/, 1)[0] || ``);
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:解码后仍须拒绝控制字符绕过。
|
||||
if (t.startsWith(`//`) || /[\\\u0000-\u0020\u007f]/.test(t)) return `/`;
|
||||
} catch {
|
||||
return `/`;
|
||||
|
||||
@@ -270,6 +270,7 @@ function d(e) {
|
||||
if (
|
||||
typeof e != `string` ||
|
||||
!/^https?:\/\//i.test(e) ||
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝菜单 URL 内的控制字符。
|
||||
/[\u0000-\u0020\\]/.test(e)
|
||||
)
|
||||
return ``;
|
||||
|
||||
@@ -104,10 +104,10 @@ function o(t, r, i) {
|
||||
[`available`, `none`, `not_applicable`].includes(
|
||||
String(s.quota_status ?? ``),
|
||||
),
|
||||
x = null,
|
||||
S = null,
|
||||
x,
|
||||
S,
|
||||
C = null,
|
||||
w = ``,
|
||||
w,
|
||||
T = !1,
|
||||
E = t === `kky_ecs` && !!s.start_time && !!s.end_time,
|
||||
D = E ? a(s.incoming) : null;
|
||||
|
||||
@@ -21,6 +21,7 @@ var e = {
|
||||
/** 优先采用合法站内/HTTP(S)图片地址;否则从 e/n 的系统描述推断本地图标。 */
|
||||
function t(e, t, n) {
|
||||
let r = String(e ?? ``).trim();
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝模块 URL 内的控制字符。
|
||||
if (r && !/[\u0000-\u0020\u007f\\]/.test(r)) {
|
||||
if (/^\/(?!\/)/.test(r)) return r;
|
||||
try {
|
||||
|
||||
+3
-1
@@ -13,6 +13,7 @@ function t(t) {
|
||||
return [];
|
||||
let n = typeof t.img == `string` ? t.img : ``,
|
||||
r =
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝登录图标路径中的控制字符。
|
||||
/^\/(?!\/)/.test(n) && !/[\\\u0000-\u0020]/.test(n)
|
||||
? n
|
||||
: backend_menu_o(n);
|
||||
@@ -29,7 +30,8 @@ function t(t) {
|
||||
}
|
||||
function n(t, n) {
|
||||
return typeof t == `string`
|
||||
? /^\/(?!\/)/.test(t) && !/[\\\u0000-\u0020]/.test(t)
|
||||
? // eslint-disable-next-line no-control-regex -- 安全边界:拒绝登录跳转地址中的控制字符。
|
||||
/^\/(?!\/)/.test(t) && !/[\\\u0000-\u0020]/.test(t)
|
||||
? new URL(t, n).href
|
||||
: backend_menu_o(t)
|
||||
: ``;
|
||||
|
||||
@@ -16,6 +16,7 @@ function n(e) {
|
||||
return (
|
||||
t.startsWith(`/`) &&
|
||||
!t.startsWith(`//`) &&
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝订单续接路径中的控制字符。
|
||||
!/[\\\u0000-\u0020\u007f]/.test(t)
|
||||
);
|
||||
}
|
||||
@@ -24,6 +25,7 @@ function r(e, r) {
|
||||
try {
|
||||
if (
|
||||
typeof e != `string` ||
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:解码后仍须拒绝控制字符绕过。
|
||||
/[\\\u0000-\u0020\u007f]/.test(e) ||
|
||||
!n(e.split(/[?#]/, 1)[0] || ``)
|
||||
)
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ function n(n) {
|
||||
a = !1,
|
||||
o = [e[r[0].replace(/[ _-]+/g, ` `).toLowerCase()]],
|
||||
s =
|
||||
/^[\s_-]*(x86[_-]64|64[ _-]?(?:bits?|位)|32[ _-]?(?:bits?|位)|\d+(?:\.\d+)*(?:R2)?|Server|Stream|Datacenter|Standard|Enterprise|Professional|Essentials|Education|Desktop|Minimal|Core|Pro|Home|R2|LTS|SP\d+|UEFI|BIOS|GPT|BT|ARM64|aarch64|x64|amd64|x86|x32|i386|i686|ARM|cn|en|zh(?:[ _-](?:CN|TW))?|专业版|标准版|数据中心版|企业版|家庭版|教育版|中文版|英文版)(?=$|[\s_()()\[\]【】-])/i;
|
||||
/^[\s_-]*(x86[_-]64|64[ _-]?(?:bits?|位)|32[ _-]?(?:bits?|位)|\d+(?:\.\d+)*(?:R2)?|Server|Stream|Datacenter|Standard|Enterprise|Professional|Essentials|Education|Desktop|Minimal|Core|Pro|Home|R2|LTS|SP\d+|UEFI|BIOS|GPT|BT|ARM64|aarch64|x64|amd64|x86|x32|i386|i686|ARM|cn|en|zh(?:[ _-](?:CN|TW))?|专业版|标准版|数据中心版|企业版|家庭版|教育版|中文版|英文版)(?=$|[\s_()()[\]【】-])/i;
|
||||
for (let e = i.match(s); e; e = i.match(s)) {
|
||||
let n = t[e[1].toLowerCase()] ?? e[1];
|
||||
(/^\d+(?:\.\d+)*(?:R2)?$/i.test(n) &&
|
||||
@@ -67,7 +67,7 @@ function r(e) {
|
||||
return (
|
||||
n(t.replace(/\.(?:iso|qcow2?|img|raw|vhdx?|vmdk)$/i, ``))
|
||||
.replace(
|
||||
/[\s_-]*(?:[((【\[]\s*)?纯净优化版(?:\s*[))】\]])?(?=$|[\s_-])/g,
|
||||
/[\s_-]*(?:[((【[]\s*)?纯净优化版(?:\s*[))】\]])?(?=$|[\s_-])/g,
|
||||
``,
|
||||
)
|
||||
.replace(RegExp(`[((\\[【]\\s*${r}\\s*[))\\]】]`, `gi`), ` `)
|
||||
|
||||
@@ -36,6 +36,7 @@ var e = new Set(
|
||||
]);
|
||||
// 图片额外允许有限位图类型的 base64 data URL;普通链接可用 mailto/tel,不允许脚本协议。
|
||||
function n(e, t = !1) {
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝富文本链接和图片中的控制字符。
|
||||
if (!e || /[\u0000-\u001f\u007f]/.test(e)) return !1;
|
||||
if (
|
||||
t &&
|
||||
|
||||
@@ -465,7 +465,7 @@ function C(e, t = ``) {
|
||||
if (!n || /[×*¥¥$€]|(?:^|[\s([{])[-+]\s*\d/.test(n)) return null;
|
||||
let r = [...n.matchAll(/\d+(?:\.\d+)?\s*(?:[kmgtpe](?:i?b)?|b)(?![a-z])/gi)],
|
||||
i = r[0],
|
||||
a = ``;
|
||||
a;
|
||||
if (r.length === 1) a = S(/[a-z]+$/i.exec(i[0])?.[0] ?? ``);
|
||||
else if (r.length === 0 && S(t)) {
|
||||
let e = [...n.matchAll(/\d+(?:\.\d+)?/g)];
|
||||
|
||||
@@ -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
|
||||
: ``),
|
||||
|
||||
@@ -402,6 +402,7 @@ function o(e) {
|
||||
function s(e) {
|
||||
if (typeof e != `string`) return `#`;
|
||||
let t = e.trim();
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝官网链接内的控制字符。
|
||||
return !t || /[\u0000-\u001f\\]/.test(t)
|
||||
? `#`
|
||||
: /^(https?:\/\/|mailto:|tel:|#|\/(?!\/))/i.test(t)
|
||||
@@ -412,6 +413,7 @@ function s(e) {
|
||||
function c(e) {
|
||||
if (typeof e != `string`) return ``;
|
||||
let t = e.trim();
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝官网图片 URL 内的控制字符。
|
||||
return !t || /[\u0000-\u001f\\]/.test(t)
|
||||
? ``
|
||||
: /^(https?:\/\/|\/(?!\/))/i.test(t)
|
||||
|
||||
@@ -329,7 +329,7 @@ var Ce = {
|
||||
];
|
||||
// 为账户设置标签提供左右方向键及 Home/End 导航,并同步实际焦点。
|
||||
function Xt(e, t) {
|
||||
let n = t;
|
||||
let n;
|
||||
if (e.key === `ArrowRight`) n = (t + 1) % E.length;
|
||||
else if (e.key === `ArrowLeft`) n = (t + E.length - 1) % E.length;
|
||||
else if (e.key === `Home`) n = 0;
|
||||
|
||||
@@ -387,6 +387,7 @@ var xe = {
|
||||
Tt = computed(() => {
|
||||
let e = R.value?.certification_auth_template_url || ``;
|
||||
return /^(?:https?:\/\/|\/(?!\/))/i.test(e) &&
|
||||
// eslint-disable-next-line no-control-regex -- 安全边界:拒绝认证模板 URL 内的控制字符。
|
||||
!/[\\\u0000-\u0020]/.test(e)
|
||||
? e
|
||||
: ``;
|
||||
|
||||
@@ -127,9 +127,6 @@ var je = {
|
||||
Xe = {
|
||||
class: `amount`,
|
||||
},
|
||||
Ze = {
|
||||
class: `consumption-overview`,
|
||||
},
|
||||
x = _plugin_vue_export_helper_t(
|
||||
defineComponent({
|
||||
__name: `index`,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -295,7 +295,7 @@ var ue = {
|
||||
createElementVNode(
|
||||
`p`,
|
||||
ge,
|
||||
`发布时间 ` +
|
||||
`发布时间\u3000` +
|
||||
toDisplayString(
|
||||
(`formatTime` in n
|
||||
? n.formatTime
|
||||
|
||||
@@ -121,6 +121,7 @@ var j = {
|
||||
position: K.value,
|
||||
item: U.value,
|
||||
};
|
||||
return undefined;
|
||||
}),
|
||||
J = ref(!1),
|
||||
Y = ref(null),
|
||||
|
||||
@@ -119,7 +119,7 @@ var j = {
|
||||
}));
|
||||
// 标签按左右方向键循环切换,Home/End 跳至首尾,并同步焦点到新标签。
|
||||
function G(e, t) {
|
||||
let n = t;
|
||||
let n;
|
||||
if (e.key === `ArrowRight`) n = (t + 1) % V.length;
|
||||
else if (e.key === `ArrowLeft`) n = (t + V.length - 1) % V.length;
|
||||
else if (e.key === `Home`) n = 0;
|
||||
|
||||
@@ -61,9 +61,6 @@ var le = {
|
||||
me = {
|
||||
class: `ticket-title`,
|
||||
},
|
||||
he = {
|
||||
class: `ticket-num`,
|
||||
},
|
||||
ge = {
|
||||
class: `ticket-meta`,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user