mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
* src/ejabberd_c2s.erl: Fixed starttls_required behaviour for
legacy connections (thanks to Brian Campbell) SVN Revision: 345
This commit is contained in:
parent
4f7359298e
commit
7cb79cd482
@ -1,5 +1,8 @@
|
||||
2005-05-09 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_c2s.erl: Fixed starttls_required behaviour for
|
||||
legacy connections (thanks to Brian Campbell)
|
||||
|
||||
* src/web/ejabberd_web_admin.erl: Images now specified via CSS,
|
||||
design slightly updated, added last activity statistics (thanks to
|
||||
Sergei Golovan)
|
||||
|
@ -256,16 +256,30 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
|
||||
_ ->
|
||||
Header = io_lib:format(
|
||||
?STREAM_HEADER,
|
||||
[StateData#state.streamid, Server, "", DefaultLang]),
|
||||
send_text(StateData, Header),
|
||||
{next_state, wait_for_auth,
|
||||
StateData#state{server = Server,
|
||||
lang = Lang}}
|
||||
[StateData#state.streamid, Server, "",
|
||||
DefaultLang]),
|
||||
if
|
||||
(not StateData#state.tls_enabled) and
|
||||
StateData#state.tls_required ->
|
||||
send_text(StateData,
|
||||
Header ++
|
||||
?POLICY_VIOLATION_ERR(
|
||||
Lang,
|
||||
"Use of STARTTLS required") ++
|
||||
?STREAM_TRAILER),
|
||||
{stop, normal, StateData};
|
||||
true ->
|
||||
send_text(StateData, Header),
|
||||
{next_state, wait_for_auth,
|
||||
StateData#state{server = Server,
|
||||
lang = Lang}}
|
||||
end
|
||||
end;
|
||||
_ ->
|
||||
Header = io_lib:format(
|
||||
?STREAM_HEADER,
|
||||
[StateData#state.streamid, ?MYNAME, "", DefaultLang]),
|
||||
[StateData#state.streamid, ?MYNAME, "",
|
||||
DefaultLang]),
|
||||
send_text(StateData,
|
||||
Header ++ ?HOST_UNKNOWN_ERR ++ ?STREAM_TRAILER),
|
||||
{stop, normal, StateData}
|
||||
|
Loading…
Reference in New Issue
Block a user