From d17dda596596e74f1e8515e45b9244f8ee893e3c Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 21 Mar 2013 13:21:42 +0100 Subject: [PATCH] detect when credentials are wrong --- modules/cragr/web/browser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cragr/web/browser.py b/modules/cragr/web/browser.py index ef6e8583..6d7085a5 100644 --- a/modules/cragr/web/browser.py +++ b/modules/cragr/web/browser.py @@ -102,6 +102,9 @@ class Cragr(BaseBrowser): # The result of POST is the destination URL. url = self.page.get_result_url() + if not url.startswith('http'): + raise BrowserIncorrectPassword(url) + self.location(url) if self.is_on_page(LoginErrorPage) or not self.is_logged():