fix(weixin): trust international WeChat hosts

This commit is contained in:
xmanrui 2026-08-26 18:46:55 +08:00
parent 50d55090b9
commit dc66366ac0
6 changed files with 14 additions and 5 deletions

View file

@ -74,7 +74,8 @@ export function safeVerificationUrl(value) {
const url = new URL(value);
const host = url.hostname.toLowerCase();
return url.protocol === 'https:'
&& (host === 'weixin.qq.com' || host.endsWith('.weixin.qq.com'))
&& (host === 'weixin.qq.com' || host.endsWith('.weixin.qq.com')
|| host === 'wechat.com' || host.endsWith('.wechat.com'))
? url.toString()
: undefined;
} catch {