]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd.cfg.example: Update of the example for anonymous.
authorMickaël Rémond <mickael.remond@process-one.net>
Thu, 20 Apr 2006 15:42:51 +0000 (15:42 +0000)
committerMickaël Rémond <mickael.remond@process-one.net>
Thu, 20 Apr 2006 15:42:51 +0000 (15:42 +0000)
Removed unnecessary parameter.
* src/ejabberd_auth_anonymous.erl: Removed unnecessary parameter
and bugfix.

SVN Revision: 534

ChangeLog
src/ejabberd.cfg.example
src/ejabberd_auth_anonymous.erl

index 14bcfeff0189883c47c31b7ebebce0d866ec4278..d13f3740810fd17c33795a739690995196dd2202 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-04-20  Mickael Remond  <mickael.remond@process-one.net>
+
+       * src/ejabberd.cfg.example: Update of the example for anonymous.
+       Removed unnecessary parameter.
+       * src/ejabberd_auth_anonymous.erl: Removed unnecessary parameter /
+       bugfix.
+
 2006-04-19  Alexey Shchepin  <alexey@sevcom.net>
 
        * src/msgs/pl.msg: Updated (thanks to Andrzej Smyk)
index 9fa19682f78190a26f166d69242e719eadef0d66..bbad0d8344ddb37aaaeb39c3db01c49d7cea7b71 100644 (file)
 % Host name:
 {hosts, ["localhost"]}.
 
-
 %% Anonymous login support:
-%% anonymous_protocol: sasl_anon|login_anon|both
-%% allow_multiple_connections: true|false
-%% anon_digest_password: "anonymous" (this is the default password that should
-%%                                    be use for digest login).
+%%  auth_method: anonymous
+%%  anonymous_protocol: sasl_anon|login_anon|both
+%%  allow_multiple_connections: true|false
 %%{host_config, "public.example.org", [{auth_method, anonymous},
-%%                                    {allow_multiple_connections, false},
-%%                                    {anonymous_protocol, sasl_anon},
-%%                                    {anon_digest_password, "anonymous"}]}.
+%%                                     {allow_multiple_connections, false},
+%%                                     {anonymous_protocol, sasl_anon}]}.
 %% To use both anonymous and internal authentication:
 %%{host_config, "public.example.org", [{auth_method, [anonymous, internal]}]}.
 
index 5b731d87499e2a0107d2b3c936f277af48f60dfd..e63c664884570e8b760e624f72a4b62a03a22342 100644 (file)
@@ -60,7 +60,7 @@ start(Host) ->
 
 %% Return true if anonymous is allowed for host or false otherwise
 allow_anonymous(Host) ->
-    lists:member(anonymous, ejabberd_auth:auth_modules(Host)).
+    lists:member(?MODULE, ejabberd_auth:auth_modules(Host)).
 
 %% Return true if anonymous mode is enabled and if anonymous protocol is SASL
 %% anonymous protocol can be: sasl_anon|login_anon|both
@@ -192,8 +192,7 @@ get_vh_registered_users(_Server) ->
 
 %% Return password of permanent user or false for anonymous users
 get_password(User, Server) ->
-    DefaultPassword = get_default_password(Server),
-    get_password(User, Server, DefaultPassword).
+    get_password(User, Server, "").
 
 get_password(User, Server, DefaultValue) ->
     case anonymous_user_exist(User, Server) of
@@ -205,13 +204,6 @@ get_password(User, Server, DefaultValue) ->
            false
     end.
 
-%% Return the default digest password from the config file
-get_default_password(Host) ->
-    case ejabberd_config:get_local_option({anon_digest_password, Host}) of
-           undefined -> "";
-           Pass -> Pass
-    end.
-
 %% Returns true if the user exists in the DB or if an anonymous user is logged
 %% under the given name
 is_user_exists(User, Server) ->