diff mod_component_roundrobin/mod_component_roundrobin.lua @ 1343:7dbde05b48a9

all the things: Remove trailing whitespace
author Florian Zeitz <florob@babelmonkeys.de>
date Tue, 11 Mar 2014 18:44:01 +0100
parents a02fbed74487
children
line wrap: on
line diff
--- a/mod_component_roundrobin/mod_component_roundrobin.lua	Mon Mar 10 08:22:58 2014 +0000
+++ b/mod_component_roundrobin/mod_component_roundrobin.lua	Tue Mar 11 18:44:01 2014 +0100
@@ -1,7 +1,7 @@
 -- Prosody IM
 -- Copyright (C) 2008-2010 Matthew Wild
 -- Copyright (C) 2008-2010 Waqas Hussain
--- 
+--
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
 --
@@ -58,7 +58,7 @@
 --- Handle authentication attempts by components
 function handle_component_auth(event)
 	local session, stanza = event.origin, event.stanza;
-	
+
 	if session.type ~= "component_unauthed" then return; end
 	if sessions[session] then return; end
 
@@ -67,14 +67,14 @@
 		session:close("not-authorized");
 		return true;
 	end
-	
+
 	local secret = module:get_option("component_secret");
 	if not secret then
 		(session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host);
 		session:close("not-authorized");
 		return true;
 	end
-	
+
 	local supplied_token = t_concat(stanza);
 	local calculated_token = sha1(session.streamid..secret, true);
 	if supplied_token:lower() ~= calculated_token:lower() then
@@ -82,7 +82,7 @@
 		session:close{ condition = "not-authorized", text = "Given token does not match calculated token" };
 		return true;
 	end
-	
+
 	-- Add session to sessions table
 	sessions[session] = true;
 	session.on_destroy = on_destroy;
@@ -90,7 +90,7 @@
 	session.type = "component";
 	log("info", "Component successfully authenticated: %s", session.host);
 	session.send(st.stanza("handshake"));
-	
+
 	return true;
 end