25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

* src/mod_configure.erl: Fixed some error codes

* src/cyrsasl_digest.erl: Bugfix (thanks to Justin Karneges)

SVN Revision: 151
This commit is contained in:
Alexey Shchepin 2003-10-16 18:17:44 +00:00
parent 8106d5f9c1
commit 8c027ab41d
3 changed files with 21 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2003-10-16 Alexey Shchepin <alexey@sevcom.net>
* src/mod_configure.erl: Fixed some error codes
* src/cyrsasl_digest.erl: Bugfix (thanks to Justin Karneges)
2003-10-14 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_local.erl: Bugfix

View File

@ -33,7 +33,7 @@ mech_new() ->
mech_step(#state{step = 1, nonce = Nonce} = State, "") ->
{continue,
"nonce=\"" ++ jlib:encode_base64(Nonce) ++
"nonce=\"" ++ Nonce ++
"\",qop=\"auth\",charset=utf-8,algorithm=md5-sess",
%"\",qop=\"auth,auth-int\",charset=utf-8,algorithm=md5-sess",
State#state{step = 3}};
@ -48,13 +48,13 @@ mech_step(#state{step = 3, nonce = Nonce} = State, ClientIn) ->
false ->
{error, "no-user"};
Passwd ->
Response = response(KeyVals, UserName, Passwd, AuthzId,
"AUTHENTICATE"),
Response = response(KeyVals, UserName, Passwd,
Nonce, AuthzId, "AUTHENTICATE"),
case xml:get_attr_s("response", KeyVals) of
Response ->
RspAuth = response(KeyVals,
UserName, Passwd,
AuthzId, ""),
Nonce, AuthzId, ""),
{continue,
"rspauth=" ++ RspAuth,
State#state{step = 5,
@ -127,9 +127,8 @@ hex([N | Ns], Res) ->
digit_to_xchar(N div 16) | Res]).
response(KeyVals, User, Passwd, AuthzId, A2Prefix) ->
response(KeyVals, User, Passwd, Nonce, AuthzId, A2Prefix) ->
Realm = xml:get_attr_s("realm", KeyVals),
Nonce = xml:get_attr_s("nonce", KeyVals),
CNonce = xml:get_attr_s("cnonce", KeyVals),
DigestURI = xml:get_attr_s("digest-uri", KeyVals),
NC = xml:get_attr_s("nc", KeyVals),

View File

@ -126,7 +126,7 @@ process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
get_form(["running nodes", ENode, "DB"], Lang) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case rpc:call(Node, mnesia, system_info, [tables]) of
{badrpc, Reason} ->
@ -160,7 +160,7 @@ get_form(["running nodes", ENode, "DB"], Lang) ->
get_form(["running nodes", ENode, "modules", "stop"], Lang) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case rpc:call(Node, gen_mod, loaded_modules, []) of
{badrpc, Reason} ->
@ -387,7 +387,7 @@ get_form(_, Lang) ->
set_form(["running nodes", ENode, "DB"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
lists:foreach(
fun({SVar, SVals}) ->
@ -421,7 +421,7 @@ set_form(["running nodes", ENode, "DB"], Lang, XData) ->
set_form(["running nodes", ENode, "modules", "stop"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
lists:foreach(
fun({Var, Vals}) ->
@ -439,7 +439,7 @@ set_form(["running nodes", ENode, "modules", "stop"], Lang, XData) ->
set_form(["running nodes", ENode, "modules", "start"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("modules", 1, XData) of
false ->
@ -475,7 +475,7 @@ set_form(["running nodes", ENode, "modules", "start"], Lang, XData) ->
set_form(["running nodes", ENode, "backup", "backup"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("path", 1, XData) of
false ->
@ -498,7 +498,7 @@ set_form(["running nodes", ENode, "backup", "backup"], Lang, XData) ->
set_form(["running nodes", ENode, "backup", "restore"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("path", 1, XData) of
false ->
@ -522,7 +522,7 @@ set_form(["running nodes", ENode, "backup", "restore"], Lang, XData) ->
set_form(["running nodes", ENode, "backup", "textfile"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("path", 1, XData) of
false ->
@ -545,7 +545,7 @@ set_form(["running nodes", ENode, "backup", "textfile"], Lang, XData) ->
set_form(["running nodes", ENode, "import", "file"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("path", 1, XData) of
false ->
@ -562,7 +562,7 @@ set_form(["running nodes", ENode, "import", "file"], Lang, XData) ->
set_form(["running nodes", ENode, "import", "dir"], Lang, XData) ->
case search_running_node(ENode) of
false ->
{error, "404", "Not Found"};
{error, ?ERR_ITEM_NOT_FOUND};
Node ->
case lists:keysearch("path", 1, XData) of
false ->