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

非TLS登陆的安全问题 #48

Closed
chaserhkj opened this issue Mar 24, 2015 · 8 comments
Closed

非TLS登陆的安全问题 #48

chaserhkj opened this issue Mar 24, 2015 · 8 comments

Comments

@chaserhkj
Copy link
Collaborator

ae9a745 这个commit中为了回避证书错误问题而改用了未加密的http代理,可能引入安全问题.

某君曾言,"没有加密的身份验证都是耍流氓",我觉得还是加密比较好...

至于ubuntu下的证书错误问题,我觉得应该检查以下几点解决:

  1. music.163.com使用的TLS证书是否符合规范
  2. requests库的https请求处理使用的证书存储空间是否正确
  3. 测试机器上的证书存储配置是否正确
@darknessomi
Copy link
Owner

额,官方的登录页面http://music.163.com/ ,就是非TLS登陆。
看来网易自己就在耍流氓。

@chaserhkj
Copy link
Collaborator Author

嘛……理论上来讲能用TLS就用TLS当然是Best Practice,但是实践上很多国内公司都做不到,其实这的确是一个很不负责任的表现.

像github, G+, facebook这种网站且不说登录页面TLS,更是实现了全域TLS,可见在这方面的安全重要性.

另一方面来讲,虽然我没有调查过,但是我相信网易既然有TLS登陆的接口(https://music.163.com/api/login ),就应该是在使用的……

我强烈怀疑网易自己的手机/Windows客户端是TLS登陆的,至于网页端不这么做纯粹因为他们觉得用网页端的人少……

我觉得我们的项目的安全性还是要向Windows客户端看齐的……

@darknessomi
Copy link
Owner

嗯,没错,客户端经过抓包确实是TLS登陆的,但是 Ubuntu 证书错误的确是个问题,本人平时并不使用 Ubuntu。 在没找到解决方案之前,所以只能临时去掉了TLS登陆,毕竟先得保证 Ubuntu 用户能用才能再考虑可能存在的安全问题。
你要是常用 Ubuntu 环境的话可以帮忙看看啊,应该是 Ubuntu 系统问题,纯净 Ubuntu 也会报错,其他系统不存在这个问题。

@chaserhkj
Copy link
Collaborator Author

没问题,我可以比较方便的接触Ubuntu环境,回头有空就看看……

不过我觉得如果是证书错误的话,优先尝试https登陆,出错再Drop back回http登陆或许也可以是一个方案?

@darknessomi
Copy link
Owner

看来是urllib3更新引起的
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
Python2.7.9 以下使用urllib3 1.9就会报错,看来只要等Python更新就好,或者禁用ssl检查

@typcn
Copy link

typcn commented Aug 9, 2015

这这情况一般是把证书指纹内嵌到软件中,在建立 SSL 连接的时候校验一下服务端的证书是否与预置的相等

@chaserhkj
Copy link
Collaborator Author

@typcn 但是这样的话,服务端要是换证书了软件也得更新后才能用啊……

@typcn
Copy link

typcn commented Aug 11, 2015

一般证书至少都是一年换的吧。。。

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

3 participants