ejabberd - Comments for "access_from - anonymous registration bug?" https://www.ejabberd.im/node/5020 en Gordon? Have you tested this https://www.ejabberd.im/node/5020#comment-58046 <p>Gordon? Have you tested this yet? I need this feature too.</p> Thu, 17 Nov 2011 11:23:33 +0000 Tomcat comment 58046 at https://www.ejabberd.im Gordon wrote: Thank you so https://www.ejabberd.im/node/5020#comment-57973 <div class="quote-msg"> <div class="quote-author"><em>Gordon</em> wrote:</div> <p>Thank you so much! We will definitely apply this... I wonder if this should become a trunk modification for future users of access_from ?</p></div> <p>Once you try it and comment here that it works perfectly, I'll request the change for inclusion in trunk.</p> Sat, 29 Oct 2011 19:31:40 +0000 mfoss comment 57973 at https://www.ejabberd.im Thank you so much! We will https://www.ejabberd.im/node/5020#comment-57968 <p>Thank you so much! We will definitely apply this... I wonder if this should become a trunk modification for future users of access_from ?</p> Wed, 26 Oct 2011 20:16:10 +0000 Gordon comment 57968 at https://www.ejabberd.im The option access_from was https://www.ejabberd.im/node/5020#comment-57962 <p>The option access_from was only designed to restrict JIDs of authenticated users.</p> <p>But I think removing two lines allows far more configurations:</p> <pre> --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -414,8 +414,6 @@ send_registration_notifications(UJID, Source) -&gt; ok end. -check_from(#jid{user = "", server = ""}, _Server) -&gt; - allow; check_from(JID, Server) -&gt; Access = gen_mod:get_module_opt(Server, ?MODULE, access_from, none), acl:match_rule(Server, Access, JID). </pre><p> With that patch now I can configure what you want:</p> <pre> %% Only admins can register accounts, not even unauthenticated users (requires patch) {access, register_from, [{allow, admin}, {deny, all}]}. %% Only authenticated users can register (requires patch) %%{acl, unauthenticated, {user, "", ""}}. %%{access, register_from, [{deny, unauthenticated}, {allow, all}]}. </pre> Wed, 26 Oct 2011 12:01:32 +0000 mfoss comment 57962 at https://www.ejabberd.im