Changeset

767:e5667f1da6bf

mod_pubsub_hub: Enforce minimal lease time
author Kim Alvefur <zash@zash.se>
date Thu, 02 Aug 2012 00:28:33 +0200
parents 766:1184fe8ebb21
children 768:af06e69c807a
files mod_pubsub_hub/mod_pubsub_hub.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_hub/mod_pubsub_hub.lua	Thu Aug 02 00:25:24 2012 +0200
+++ b/mod_pubsub_hub/mod_pubsub_hub.lua	Thu Aug 02 00:28:33 2012 +0200
@@ -50,7 +50,7 @@
 			local callback = body["hub.callback"];
 			local mode = body["hub.mode"];
 			local topic = body["hub.topic"];
-			local lease_seconds = m_min(tonumber(body["hub.lease_seconds"]) or default_lease, max_lease);
+			local lease_seconds = m_max(min_lease, m_min(tonumber(body["hub.lease_seconds"]) or default_lease, max_lease));
 			local secret = body["hub.secret"];
 			local verify_token = body["hub.verify_token"];