mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
o Fix a misuse of exmpp_stanza:error/2: the namespace argument (the
first one) was missing. o Fix a bug in process_privacy_iq/4 where the #iq record was not converted back to an #xmlel before calling ejabberd_router:route/3. SVN Revision: 1572
This commit is contained in:
parent
052d006c88
commit
0dbbf53fbe
@ -8,6 +8,11 @@
|
|||||||
* src/ejabberd_auth_odbc.erl (check_password): Fix a typo in the
|
* src/ejabberd_auth_odbc.erl (check_password): Fix a typo in the
|
||||||
exmpp_stringprep module name.
|
exmpp_stringprep module name.
|
||||||
|
|
||||||
|
* src/ejabberd_c2s.erl: Fix a misuse of exmpp_stanza:error/2: the
|
||||||
|
namespace argument (the first one) was missing.
|
||||||
|
(process_privacy_iq): Fix a bug where the #iq record was not converted
|
||||||
|
back to an #xmlel before calling ejabberd_router:route/3.
|
||||||
|
|
||||||
2008-09-22 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
2008-09-22 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/mod_vcard.erl (get_sm_features): Remove unappropriate
|
* src/mod_vcard.erl (get_sm_features): Remove unappropriate
|
||||||
|
@ -120,10 +120,11 @@
|
|||||||
-define(DEFAULT_NS, ?NS_JABBER_CLIENT).
|
-define(DEFAULT_NS, ?NS_JABBER_CLIENT).
|
||||||
-define(PREFIXED_NS, [{?NS_XMPP, ?NS_XMPP_pfx}]).
|
-define(PREFIXED_NS, [{?NS_XMPP, ?NS_XMPP_pfx}]).
|
||||||
|
|
||||||
-define(STANZA_ERROR(Condition),
|
-define(STANZA_ERROR(NS, Condition),
|
||||||
exmpp_xml:xmlel_to_xmlelement(exmpp_stanza:error(Condition),
|
exmpp_xml:xmlel_to_xmlelement(exmpp_stanza:error(NS, Condition),
|
||||||
[?NS_JABBER_CLIENT], [{?NS_XMPP, "stream"}])).
|
[?NS_JABBER_CLIENT], [{?NS_XMPP, "stream"}])).
|
||||||
-define(ERR_FEATURE_NOT_IMPLEMENTED, ?STANZA_ERROR('feature-not-implemented')).
|
-define(ERR_FEATURE_NOT_IMPLEMENTED(NS),
|
||||||
|
?STANZA_ERROR(NS, 'feature-not-implemented')).
|
||||||
|
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
%%% API
|
%%% API
|
||||||
@ -383,7 +384,7 @@ wait_for_auth({xmlstreamelement, El}, StateData) ->
|
|||||||
exmpp_server_legacy_auth:fields(El, Fields)),
|
exmpp_server_legacy_auth:fields(El, Fields)),
|
||||||
fsm_next_state(wait_for_auth, StateData);
|
fsm_next_state(wait_for_auth, StateData);
|
||||||
{auth, _ID, set, {_U, _P, _D, undefined}} ->
|
{auth, _ID, set, {_U, _P, _D, undefined}} ->
|
||||||
Err = exmpp_stanza:error('not-acceptable',
|
Err = exmpp_stanza:error(El#xmlel.ns, 'not-acceptable',
|
||||||
{"en", "No resource provided"}),
|
{"en", "No resource provided"}),
|
||||||
send_element(StateData, exmpp_iq:error(El, Err)),
|
send_element(StateData, exmpp_iq:error(El, Err)),
|
||||||
fsm_next_state(wait_for_auth, StateData);
|
fsm_next_state(wait_for_auth, StateData);
|
||||||
@ -1741,20 +1742,20 @@ update_priority(Priority, Packet, StateData) ->
|
|||||||
Info).
|
Info).
|
||||||
|
|
||||||
process_privacy_iq(From, To,
|
process_privacy_iq(From, To,
|
||||||
#iq{type = Type} = IQ_Rec,
|
#iq{type = Type, iq_ns = IQ_NS} = IQ_Rec,
|
||||||
StateData) ->
|
StateData) ->
|
||||||
{Res, NewStateData} =
|
{Res, NewStateData} =
|
||||||
case Type of
|
case Type of
|
||||||
get ->
|
get ->
|
||||||
R = ejabberd_hooks:run_fold(
|
R = ejabberd_hooks:run_fold(
|
||||||
privacy_iq_get, StateData#state.server,
|
privacy_iq_get, StateData#state.server,
|
||||||
{error, ?ERR_FEATURE_NOT_IMPLEMENTED},
|
{error, ?ERR_FEATURE_NOT_IMPLEMENTED(IQ_NS)},
|
||||||
[From, To, IQ_Rec, StateData#state.privacy_list]),
|
[From, To, IQ_Rec, StateData#state.privacy_list]),
|
||||||
{R, StateData};
|
{R, StateData};
|
||||||
set ->
|
set ->
|
||||||
case ejabberd_hooks:run_fold(
|
case ejabberd_hooks:run_fold(
|
||||||
privacy_iq_set, StateData#state.server,
|
privacy_iq_set, StateData#state.server,
|
||||||
{error, ?ERR_FEATURE_NOT_IMPLEMENTED},
|
{error, ?ERR_FEATURE_NOT_IMPLEMENTED(IQ_NS)},
|
||||||
[From, To, IQ_Rec]) of
|
[From, To, IQ_Rec]) of
|
||||||
{result, R, NewPrivList} ->
|
{result, R, NewPrivList} ->
|
||||||
{{result, R},
|
{{result, R},
|
||||||
@ -1770,7 +1771,7 @@ process_privacy_iq(From, To,
|
|||||||
exmpp_iq:error(IQ_Rec, Error)
|
exmpp_iq:error(IQ_Rec, Error)
|
||||||
end,
|
end,
|
||||||
ejabberd_router:route(
|
ejabberd_router:route(
|
||||||
To, From, IQRes),
|
To, From, exmpp_iq:iq_to_xmlel(IQRes)),
|
||||||
NewStateData.
|
NewStateData.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user