mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling. PR: EJABP-1 SVN Revision: 1618
This commit is contained in:
parent
ccd94bb734
commit
c0e4af9ac0
@ -8,6 +8,10 @@
|
|||||||
was passed to exmpp_jid:jid_to_list/1 instead of a #jid. Now we use
|
was passed to exmpp_jid:jid_to_list/1 instead of a #jid. Now we use
|
||||||
exmpp_jid:jid_to_list/3. Thanks to Pablo Polvorin!
|
exmpp_jid:jid_to_list/3. Thanks to Pablo Polvorin!
|
||||||
|
|
||||||
|
* src/ejabberd_s2s_in.erl (wait_for_feature_request/2): Replace
|
||||||
|
jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the error
|
||||||
|
handling.
|
||||||
|
|
||||||
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which
|
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which
|
||||||
|
@ -255,19 +255,15 @@ wait_for_feature_request({xmlstreamelement, El}, StateData) ->
|
|||||||
#xmlel{ns = ?NS_SASL, name = 'auth'} when TLSEnabled ->
|
#xmlel{ns = ?NS_SASL, name = 'auth'} when TLSEnabled ->
|
||||||
case exmpp_server_sasl:next_step(El) of
|
case exmpp_server_sasl:next_step(El) of
|
||||||
{auth, "EXTERNAL", Auth} ->
|
{auth, "EXTERNAL", Auth} ->
|
||||||
AuthDomain = jlib:nameprep(Auth),
|
{AuthDomain, AuthRes} = try
|
||||||
AuthRes =
|
AuthDomain0 = exmpp_stringprep:nameprep(Auth),
|
||||||
case (StateData#state.sockmod):get_peer_certificate(
|
AuthRes0 = case (StateData#state.sockmod):get_peer_certificate(
|
||||||
StateData#state.socket) of
|
StateData#state.socket) of
|
||||||
{ok, Cert} ->
|
{ok, Cert} ->
|
||||||
case (StateData#state.sockmod):get_verify_result(
|
case (StateData#state.sockmod):get_verify_result(
|
||||||
StateData#state.socket) of
|
StateData#state.socket) of
|
||||||
0 ->
|
0 ->
|
||||||
case AuthDomain of
|
case idna:domain_utf8_to_ascii(AuthDomain0) of
|
||||||
error ->
|
|
||||||
false;
|
|
||||||
_ ->
|
|
||||||
case idna:domain_utf8_to_ascii(AuthDomain) of
|
|
||||||
false ->
|
false ->
|
||||||
false;
|
false;
|
||||||
PCAuthDomain ->
|
PCAuthDomain ->
|
||||||
@ -276,12 +272,16 @@ wait_for_feature_request({xmlstreamelement, El}, StateData) ->
|
|||||||
match_domain(
|
match_domain(
|
||||||
PCAuthDomain, D)
|
PCAuthDomain, D)
|
||||||
end, get_cert_domains(Cert))
|
end, get_cert_domains(Cert))
|
||||||
end
|
|
||||||
end;
|
end;
|
||||||
_ ->
|
_ ->
|
||||||
false
|
false
|
||||||
end;
|
end;
|
||||||
error ->
|
error ->
|
||||||
|
{undefined, false}
|
||||||
|
end,
|
||||||
|
{AuthDomain0, AuthRes0}
|
||||||
|
catch
|
||||||
|
_ ->
|
||||||
false
|
false
|
||||||
end,
|
end,
|
||||||
if
|
if
|
||||||
|
Loading…
Reference in New Issue
Block a user