News for hackers. Stuff that matters.
Re:The most dangerous code in the world by pjscott on Wednesday October 24, 2012 @10:49PM (#4696132)
Sounds like it might be easier to list the options that actually do the Right Thing. If you're using Python, for example, the correct way to make HTTP requests is to ignore the standard library's urllib and (shudder) urllib2, and use Requests instead:

http://docs.python-requests.org/en/latest/

It validates SSL certificates correctly by default. How about other languages?

Re:The most dangerous code in the world by gingerlime on Thursday October 25, 2012 @03:13AM (#4696665)
Good to know. I always wondered how come none those libraries fully validate SSL certificates. On one of my projects, we were hooking into the Windows Winhttp Libraries to be able to do this (and a couple of other things), but when porting to Mac we kinda had to accept the standard libs just didn't care enough about this. It's been a while ago, so perhaps things have changed. Requests is a great example of this I guess.
Re:The most dangerous code in the world by Tobu on Thursday October 25, 2012 @05:31PM (#4699674)
Well, it does the right thing by default if you have a sufficiently recent version. You still need to pass `verify=True` to make older versions fail rather than silently accept bad certs. For httplib2, the idiom is similar: `client = httplib2.Http(disable_ssl_certificate_validation=False)`