首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >HostnameVerifier接口的不安全实现?

HostnameVerifier接口的不安全实现?

提问于 2020-12-08 20:04:42
回答 0关注 0查看 495

package com.tencent.apollo.apollovoice.httpclient;

public class HttpsUtils{

public static HostnameVerifier getHostNameVerify()

{

return new HostnameVerifier()

{

public boolean verify(String paramString, SSLSession paramSSLSession)

{

if (!(paramString.contains("qq.com")))

{

if (paramString.contains("183.3"))

return true;

HttpsURLConnection.getDefaultHostnameVerifier().verify(paramString, paramSSLSession);

}

//任何条件进来都会返回true

return true;

}

};

}

}

google play提醒安全漏洞 Your app(s) are using an unsafe implementation of the HostnameVerifier interface.

请修复!

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档