ajenti / ajenti

Test for membership should be 'not in' FLK-E713
Anti-pattern
Minor
6 months ago2 years old
test for membership should be 'not in'
 66        return None
 67
 68    def get_profile(self, username):
 69        if not username or not username in aj.users.data['users']: 70            return {}
 71        return aj.users.data['users'][username]
 72
test for membership should be 'not in'
11    def verify(self, x509):
12        serial = x509.get_serial_number()
13        digest = x509.digest('sha256')
14        if not b'sha256' in x509.get_signature_algorithm():15            logging.warning(
16                f'Sha1 digest algorithm is deprecated,'
17                f'you should revoke the client certificate with serial {serial}'