125续15l-8:修innerHTML+onclick引号嵌套截断属性值(根因)
This commit is contained in:
@@ -604,7 +604,10 @@ require_once __DIR__ . '/captcha_guard.php';
|
||||
applyAgreementUI();
|
||||
document.getElementById('agreementSection').style.display = AG.need ? 'block' : 'none';
|
||||
actionsDiv.style.display = 'flex';
|
||||
actionsDiv.innerHTML = '<button class="btn btn-primary" style="width:100%" onclick="enterWeb(' + JSON.stringify(player) + ')">进入 Web 端</button>';
|
||||
// ★ 125 续15l-8:player 用单引号包(HTML 属性值本身用双引号),
|
||||
// 并对 player 做 HTML 转义防 XSS + 防引号嵌套截断属性值
|
||||
const _p = JSON.stringify(player).replace(/"/g, "'");
|
||||
actionsDiv.innerHTML = '<button class="btn btn-primary" style="width:100%" onclick="enterWeb(' + _p + ')">进入 Web 端</button>';
|
||||
return;
|
||||
}
|
||||
// ★ 已签 / 无协议 → 无感登录:直接跳转(fireAgreementMark 幂等,未签才补写;显式传 player)
|
||||
|
||||
Reference in New Issue
Block a user