mod_atom/mod_atom.lua
changeset 3428 6ae875c98daf
parent 3427 4a8fa0364f35
child 3436 61368aec97d6
--- a/mod_atom/mod_atom.lua	Thu Jan 03 11:36:01 2019 +0100
+++ b/mod_atom/mod_atom.lua	Thu Jan 03 11:39:28 2019 +0100
@@ -3,6 +3,7 @@
 
 local mod_pep = module:depends"pep";
 
+local um = require "core.usermanager";
 local nodeprep = require "util.encodings".stringprep.nodeprep;
 local st = require "util.stanza";
 
@@ -15,6 +16,9 @@
 
 			user = nodeprep(user);
 			if not user then return 400; end
+			if not um.user_exists(user, module.host) then
+				return 404;
+			end
 
 			local pubsub_service = mod_pep.get_pep_service(user);
 			local ok, items = pubsub_service:get_items("urn:xmpp:microblog:0", actor);