util.sasl.scram: Fixing logic error in argument checking.

Mon, 24 May 2010 17:44:13 +0200

author
Tobias Markmann <tm@ayena.de>
date
Mon, 24 May 2010 17:44:13 +0200
changeset 3118
95ddd75ed3c5
parent 3115
4c35ef27d868
child 3119
c1ac08fa2533
child 3122
579f17b9f948

util.sasl.scram: Fixing logic error in argument checking.

util/sasl/scram.lua file | annotate | diff | comparison | revisions
--- a/util/sasl/scram.lua	Sun May 23 23:05:01 2010 +0100
+++ b/util/sasl/scram.lua	Mon May 24 17:44:13 2010 +0200
@@ -94,7 +94,7 @@
 
 function saltedPasswordSHA1(password, salt, iteration_count)
 	local salted_password
-	if type(password) ~= "string" and type(salt) ~= "string" and type(iteration_count) ~= "number" then
+	if type(password) ~= "string" or type(salt) ~= "string" or type(iteration_count) ~= "number" then
 		return false, "inappropriate argument types"
 	end
 	if iteration_count < 4096 then

mercurial