Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文域名下不支持获取在线音乐 #141

Open
sarabear opened this issue Feb 19, 2019 · 0 comments
Open

中文域名下不支持获取在线音乐 #141

sarabear opened this issue Feb 19, 2019 · 0 comments

Comments

@sarabear
Copy link

最后查了下,主要是 hermit_callback方法里面为了安全做了域名判断,但是域名判断时如果设置里面填的中文域名就不支持了。 我这边尝试加了idn_to_ascii转换后再判断就生效了,但是每次升级插件都要自己改下,不知道是否可以考虑下做一些兼容处理的?
这是我这边的地址: https://雪菜.我爱你/?p=263
/**
* JSON 音乐数据
*/
public function hermit_callback()
{
if (!empty($_SERVER["HTTP_REFERER"])) {
$referer = parse_url($_SERVER["HTTP_REFERER"]);
$host = strtolower($referer['host']);
}
if (empty($_SERVER["HTTP_REFERER"]) || $host === idn_to_ascii(parse_url(home_url())['host'])) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant