From 578216b55e8a03de5bbb477bcdc5cfe8cc63ca83 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 26 Nov 2013 18:39:34 +0100 Subject: [PATCH] Move the test on self.insecure to catch direct calls Module likes societegenerale includes direct calls on lowsslcheck, and the option -I (insecure) is not tested. --- weboob/tools/browser/browser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weboob/tools/browser/browser.py b/weboob/tools/browser/browser.py index cb8f99d3..ac991024 100644 --- a/weboob/tools/browser/browser.py +++ b/weboob/tools/browser/browser.py @@ -439,6 +439,8 @@ class StandardBrowser(mechanize.Browser): return def lowsslcheck(self, domain, hsh): + if self.INSECURE: + return certhash = self._certhash(domain) if self.logger: self.logger.debug('Found %s as certificate hash' % certhash) @@ -538,7 +540,7 @@ class BaseBrowser(StandardBrowser): self.username = username self.password = password - if not self.INSECURE and self.CERTHASH is not None and self.DOMAIN is not None: + if self.CERTHASH is not None and self.DOMAIN is not None: self.lowsslcheck(self.DOMAIN, self.CERTHASH) if self.password and get_home: