mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-21 16:45:03 -05:00
Merge pull request #44 from antisocialdalek/antisocialdalek-fix-xmpp
add longer check for xmpp preamble
This commit is contained in:
commit
130348ed48
5
probe.c
5
probe.c
@ -169,7 +169,10 @@ static int is_tinc_protocol( const char *p, int len, struct proto *proto)
|
||||
* */
|
||||
static int is_xmpp_protocol( const char *p, int len, struct proto *proto)
|
||||
{
|
||||
if (len < 6)
|
||||
/* sometimes the word 'jabber' shows up late in the initial string,
|
||||
sometimes after a newline. this makes sure we snarf the entire preamble
|
||||
and detect it. (fixed for adium/pidgin) */
|
||||
if (len < 50)
|
||||
return PROBE_AGAIN;
|
||||
|
||||
return memmem(p, len, "jabber", 6) ? 1 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user