git ssb

0+

cel / sslh



Commit 130348ed483d47cd5216d9c0cf4cdc19e7b1f865

Merge pull request #44 from antisocialdalek/antisocialdalek-fix-xmpp

add longer check for xmpp preamble
yrutschle committed on 3/9/2015, 8:46:18 PM
Parent: ce7c5b1ba2808da9786ed7cb01608388af5f758b
Parent: bdeccfd9fff5317f86d1023099b9d73880c8684b

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