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:
parent
8106d5f9c1
commit
8c027ab41d
@ -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>
|
2003-10-14 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/ejabberd_local.erl: Bugfix
|
* src/ejabberd_local.erl: Bugfix
|
||||||
|
@ -33,7 +33,7 @@ mech_new() ->
|
|||||||
|
|
||||||
mech_step(#state{step = 1, nonce = Nonce} = State, "") ->
|
mech_step(#state{step = 1, nonce = Nonce} = State, "") ->
|
||||||
{continue,
|
{continue,
|
||||||
"nonce=\"" ++ jlib:encode_base64(Nonce) ++
|
"nonce=\"" ++ Nonce ++
|
||||||
"\",qop=\"auth\",charset=utf-8,algorithm=md5-sess",
|
"\",qop=\"auth\",charset=utf-8,algorithm=md5-sess",
|
||||||
%"\",qop=\"auth,auth-int\",charset=utf-8,algorithm=md5-sess",
|
%"\",qop=\"auth,auth-int\",charset=utf-8,algorithm=md5-sess",
|
||||||
State#state{step = 3}};
|
State#state{step = 3}};
|
||||||
@ -48,13 +48,13 @@ mech_step(#state{step = 3, nonce = Nonce} = State, ClientIn) ->
|
|||||||
false ->
|
false ->
|
||||||
{error, "no-user"};
|
{error, "no-user"};
|
||||||
Passwd ->
|
Passwd ->
|
||||||
Response = response(KeyVals, UserName, Passwd, AuthzId,
|
Response = response(KeyVals, UserName, Passwd,
|
||||||
"AUTHENTICATE"),
|
Nonce, AuthzId, "AUTHENTICATE"),
|
||||||
case xml:get_attr_s("response", KeyVals) of
|
case xml:get_attr_s("response", KeyVals) of
|
||||||
Response ->
|
Response ->
|
||||||
RspAuth = response(KeyVals,
|
RspAuth = response(KeyVals,
|
||||||
UserName, Passwd,
|
UserName, Passwd,
|
||||||
AuthzId, ""),
|
Nonce, AuthzId, ""),
|
||||||
{continue,
|
{continue,
|
||||||
"rspauth=" ++ RspAuth,
|
"rspauth=" ++ RspAuth,
|
||||||
State#state{step = 5,
|
State#state{step = 5,
|
||||||
@ -127,9 +127,8 @@ hex([N | Ns], Res) ->
|
|||||||
digit_to_xchar(N div 16) | 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),
|
Realm = xml:get_attr_s("realm", KeyVals),
|
||||||
Nonce = xml:get_attr_s("nonce", KeyVals),
|
|
||||||
CNonce = xml:get_attr_s("cnonce", KeyVals),
|
CNonce = xml:get_attr_s("cnonce", KeyVals),
|
||||||
DigestURI = xml:get_attr_s("digest-uri", KeyVals),
|
DigestURI = xml:get_attr_s("digest-uri", KeyVals),
|
||||||
NC = xml:get_attr_s("nc", KeyVals),
|
NC = xml:get_attr_s("nc", KeyVals),
|
||||||
|
@ -126,7 +126,7 @@ process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
|
|||||||
get_form(["running nodes", ENode, "DB"], Lang) ->
|
get_form(["running nodes", ENode, "DB"], Lang) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case rpc:call(Node, mnesia, system_info, [tables]) of
|
case rpc:call(Node, mnesia, system_info, [tables]) of
|
||||||
{badrpc, Reason} ->
|
{badrpc, Reason} ->
|
||||||
@ -160,7 +160,7 @@ get_form(["running nodes", ENode, "DB"], Lang) ->
|
|||||||
get_form(["running nodes", ENode, "modules", "stop"], Lang) ->
|
get_form(["running nodes", ENode, "modules", "stop"], Lang) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case rpc:call(Node, gen_mod, loaded_modules, []) of
|
case rpc:call(Node, gen_mod, loaded_modules, []) of
|
||||||
{badrpc, Reason} ->
|
{badrpc, Reason} ->
|
||||||
@ -387,7 +387,7 @@ get_form(_, Lang) ->
|
|||||||
set_form(["running nodes", ENode, "DB"], Lang, XData) ->
|
set_form(["running nodes", ENode, "DB"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun({SVar, SVals}) ->
|
fun({SVar, SVals}) ->
|
||||||
@ -421,7 +421,7 @@ set_form(["running nodes", ENode, "DB"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "modules", "stop"], Lang, XData) ->
|
set_form(["running nodes", ENode, "modules", "stop"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun({Var, Vals}) ->
|
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) ->
|
set_form(["running nodes", ENode, "modules", "start"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("modules", 1, XData) of
|
case lists:keysearch("modules", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
@ -475,7 +475,7 @@ set_form(["running nodes", ENode, "modules", "start"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "backup", "backup"], Lang, XData) ->
|
set_form(["running nodes", ENode, "backup", "backup"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("path", 1, XData) of
|
case lists:keysearch("path", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
@ -498,7 +498,7 @@ set_form(["running nodes", ENode, "backup", "backup"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "backup", "restore"], Lang, XData) ->
|
set_form(["running nodes", ENode, "backup", "restore"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("path", 1, XData) of
|
case lists:keysearch("path", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
@ -522,7 +522,7 @@ set_form(["running nodes", ENode, "backup", "restore"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "backup", "textfile"], Lang, XData) ->
|
set_form(["running nodes", ENode, "backup", "textfile"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("path", 1, XData) of
|
case lists:keysearch("path", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
@ -545,7 +545,7 @@ set_form(["running nodes", ENode, "backup", "textfile"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "import", "file"], Lang, XData) ->
|
set_form(["running nodes", ENode, "import", "file"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("path", 1, XData) of
|
case lists:keysearch("path", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
@ -562,7 +562,7 @@ set_form(["running nodes", ENode, "import", "file"], Lang, XData) ->
|
|||||||
set_form(["running nodes", ENode, "import", "dir"], Lang, XData) ->
|
set_form(["running nodes", ENode, "import", "dir"], Lang, XData) ->
|
||||||
case search_running_node(ENode) of
|
case search_running_node(ENode) of
|
||||||
false ->
|
false ->
|
||||||
{error, "404", "Not Found"};
|
{error, ?ERR_ITEM_NOT_FOUND};
|
||||||
Node ->
|
Node ->
|
||||||
case lists:keysearch("path", 1, XData) of
|
case lists:keysearch("path", 1, XData) of
|
||||||
false ->
|
false ->
|
||||||
|
Loading…
Reference in New Issue
Block a user