git ssb

0+

cel / sslh



Commit bdeccfd9fff5317f86d1023099b9d73880c8684b

add longer check for xmpp preamble

original wasn't catching the preamble from Adium or Pidgin XMPP clients, because of a newline after the initial <xml> line. Grew the length of the check string so it'd see the word 'jabber' faster.
Justin Matlock committed on 3/6/2015, 7:58:52 AM
Parent: ce7c5b1ba2808da9786ed7cb01608388af5f758b

Files changed

probe.cchanged
probe.cView
@@ -168,9 +168,12 @@
168168 * clients, just checking first frame containing "jabber" in xml entity)
169169 * */
170170 static int is_xmpp_protocol( const char *p, int len, struct proto *proto)
171171 {
172- if (len < 6)
172+ /* sometimes the word 'jabber' shows up late in the initial string,
173+ sometimes after a newline. this makes sure we snarf the entire preamble
174+ and detect it. (fixed for adium/pidgin) */
175+ if (len < 50)
173176 return PROBE_AGAIN;
174177
175178 return memmem(p, len, "jabber", 6) ? 1 : 0;
176179 }

Built with git-ssb-web