From d807742f50b70fbac0ec3a7675d2f2efc4c040fc Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 28 Dec 2010 18:58:14 +0200 Subject: doc ftp,webdav: fallback to passwd=login when using base_crypt At the test scripts for these modules, we need to know the password for the user that's making the tests. If we detect that passwords are hashed by base_crypt, don't use them and attempt to assume that login=passwd. bzr revid: p_christ@hol.gr-20101228165814-sfbyxy9ngryyfaea --- addons/document_webdav/test_davclient.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/document_webdav/test_davclient.py') diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py index ac40d1a3d30..28455dc52a4 100644 --- a/addons/document_webdav/test_davclient.py +++ b/addons/document_webdav/test_davclient.py @@ -364,6 +364,10 @@ class DAVClient(object): assert res, "uid %s not found" % uid self.user = res[0]['login'] self.passwd = res[0]['password'] + if self.passwd.startswith('$1$'): + # md5 by base crypt. We cannot decode, wild guess + # that passwd = login + self.passwd = self.user return True def set_useragent(self, uastr): -- cgit v1.2.3