Commit 3d5e78c4 authored by csh's avatar csh

OF-183 Bad-namespace prefix is actually invalid-namespace?

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13947 b35dd754-fafc-0310-a699-88a17e54d16e
parent cceb769c
...@@ -616,12 +616,11 @@ public abstract class StanzaHandler { ...@@ -616,12 +616,11 @@ public abstract class StanzaHandler {
// may offer the client to secure the connection. If the client decides to secure // may offer the client to secure the connection. If the client decides to secure
// the connection then a <starttls> stanza should be received // the connection then a <starttls> stanza should be received
else if (!createSession(xpp.getNamespace(null), serverName, xpp, connection)) { else if (!createSession(xpp.getNamespace(null), serverName, xpp, connection)) {
// No session was created because of an invalid namespace prefix so answer a stream // http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions-invalid-namespace
// error and close the underlying connection // "or the content namespace declared as the default namespace is not supported (e.g., something other than "jabber:client" or "jabber:server")."
// Include the bad-namespace-prefix in the response streamError = new StreamError(StreamError.Condition.invalid_namespace);
streamError = new StreamError(StreamError.Condition.bad_namespace_prefix);
// Log a warning so that admins can track this cases from the server side // Log a warning so that admins can track this cases from the server side
Log.warn("Closing session due to bad_namespace_prefix in stream header. Prefix: " + Log.warn("Closing session due to invalid_namespace in stream header. Prefix: " +
xpp.getNamespace(null) + ". Connection: " + connection); xpp.getNamespace(null) + ". Connection: " + connection);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment