Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _compare_passwords(self, name, attempt, stored):
try:
return PASSWORD_TYPE.make(self, name, attempt) == stored
except sasl.PasswordError:
return False