summaryrefslogtreecommitdiff
path: root/libpurple/protocols/jabber/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpurple/protocols/jabber/parser.c')
-rw-r--r--libpurple/protocols/jabber/parser.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libpurple/protocols/jabber/parser.c b/libpurple/protocols/jabber/parser.c
index 2c0dae610f..7e6e622c58 100644
--- a/libpurple/protocols/jabber/parser.c
+++ b/libpurple/protocols/jabber/parser.c
@@ -93,10 +93,25 @@ jabber_parser_element_start_libxml(void *user_data,
}
}
- if (js->stream_id == NULL)
+ if (js->stream_id == NULL) {
+#if 0
+ /* This was underspecified in rfc3920 as only being a SHOULD, so
+ * we cannot rely on it. See #12331 and Oracle's server.
+ */
purple_connection_error_reason(js->gc,
PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE,
_("XMPP stream missing ID"));
+#else
+ /* Instead, let's make up a placeholder stream ID, which we need
+ * to do because we flag on it being NULL as a special case
+ * in this parsing code.
+ */
+ js->stream_id = g_strdup("");
+ purple_debug_info("jabber", "Server failed to specify a stream "
+ "ID (underspecified in rfc3920, but intended "
+ "to be a MUST; digest legacy auth may fail.");
+#endif
+ }
} else {
if(js->current)