changeset 1213:544f5a4a8428

mod_auth_dovecot: Check return value properly
author Kim Alvefur <zash@zash.se>
date Tue, 13 Aug 2013 21:55:13 +0200
parents bd88728b0d95
children a234ad611633
files mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Sun Aug 11 00:00:58 2013 +0200
+++ b/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Tue Aug 13 21:55:13 2013 +0200
@@ -85,7 +85,7 @@
 
 if append_host then
 	function provider.test_password(username, password)
-		return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password);
+		return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password) == "success";
 	end
 
 	function provider.get_sasl_handler()