Potential fix for code scanning alert no. 84: Incomplete string escaping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Haoyu Xu
2025-10-05 19:16:50 +08:00
committed by GitHub
parent a5961da45c
commit 78501c5253

View File

@@ -11,7 +11,7 @@ export default async (dataDir: string) => {
config.servers.map(async (server) => { config.servers.map(async (server) => {
const networkConfResp = await fetch(server.url) const networkConfResp = await fetch(server.url)
const networkConf = JSON.parse( const networkConf = JSON.parse(
(await networkConfResp.json()).content.replace('\\', '') (await networkConfResp.json()).content.replace(/\\/g, '')
) )
const funcVer = networkConf.funcVer const funcVer = networkConf.funcVer
const networkConfUrls = networkConf.configs[funcVer].network const networkConfUrls = networkConf.configs[funcVer].network