Comparison

mod_pubsub_feeds/mod_pubsub_feeds.lua @ 2422:57235bce06fc

mod_pubsub_feeds: Always approve unsubscription from unknown feeds
author Kim Alvefur <zash@zash.se>
date Mon, 19 Dec 2016 07:49:12 +0100
parent 2421:a9add2d1adf5
child 2423:1b6027ef5191
comparison
equal deleted inserted replaced
2421:a9add2d1adf5 2422:57235bce06fc
215 end 215 end
216 --module:log("debug", "Headers: %s", dump(request.headers)); 216 --module:log("debug", "Headers: %s", dump(request.headers));
217 217
218 local feed = feed_list[query.node]; 218 local feed = feed_list[query.node];
219 if not feed then 219 if not feed then
220 if query["hub.mode"] == "unsubscribe" then
221 -- Unsubscribe from unknown feed
222 module:log("debug", "Unsubscribe from unknown feed %s -- %s", query["hub.topic"], formencode(query));
223 return query["hub.challenge"];
224 end
220 module:log("debug", "Push for unknown feed %s -- %s", query["hub.topic"], formencode(query)); 225 module:log("debug", "Push for unknown feed %s -- %s", query["hub.topic"], formencode(query));
221 return 404; 226 return 404;
222 end 227 end
223 228
224 if method == "GET" then 229 if method == "GET" then