Loading ccserver/conf.py +11 −7 Original line number Diff line number Diff line Loading @@ -217,14 +217,18 @@ class CCConf(object): return None is_valid = False m = CCConf.RE_SALTPW.match(passwd_conf) if m is None: is_valid = self._auth_plain(passwd_conf, password) meth = '_auth_plain' password_wo_method = passwd_conf else: meth = '_auth_%s' % m.group('method').lower() password_wo_method = m.group('password') if hasattr(self, meth): auth = getattr(self, meth) is_valid = auth(password, m.group('password')) == passwd_conf is_valid = auth(password, password_wo_method) == passwd_conf else: logging.warning('Bad authentication method for %s: ' '%s' % (login, m.group('method'))) Loading Loading
ccserver/conf.py +11 −7 Original line number Diff line number Diff line Loading @@ -217,14 +217,18 @@ class CCConf(object): return None is_valid = False m = CCConf.RE_SALTPW.match(passwd_conf) if m is None: is_valid = self._auth_plain(passwd_conf, password) meth = '_auth_plain' password_wo_method = passwd_conf else: meth = '_auth_%s' % m.group('method').lower() password_wo_method = m.group('password') if hasattr(self, meth): auth = getattr(self, meth) is_valid = auth(password, m.group('password')) == passwd_conf is_valid = auth(password, password_wo_method) == passwd_conf else: logging.warning('Bad authentication method for %s: ' '%s' % (login, m.group('method'))) Loading