易受攻击类:
Google警告: SSL错误处理程序漏洞
com.microsoft.live.AuthorizationRequest$OAuthDialog$AuthorizationWebViewClient
但是,我已经检查了我的代码,我没有使用任何web视图,而且我也没有任何方法
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}我不知道该怎么处理。有人能帮我吗?
发布于 2016-08-30 04:23:49
onReceivedSslError应该通知用户使用无效证书的页面。你不应该直接去做。
这是来自LiveSDK的行
这个项目不包括可怕的SSL攻击。这个库更符合安全性,并且按照Android文档的最新指南使用HTTP。
参考文献:1)https://github.com/OneDrive/onedrive-sdk-android/issues/31
2)https://github.com/liveservices/LiveSDK-for-Android/issues/63
你可以试试这个。
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.notification_error_ssl_cert_invalid);
builder.setPositiveButton("continue", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.proceed();
}
});
builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.cancel();
}
});
final AlertDialog dialog = builder.create();
dialog.show();
}https://stackoverflow.com/questions/39198890
复制相似问题