1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

spend less cpu on http attacks, bidi tweak, stop smtp-out

This commit is contained in:
psyc://loupsycedyglgamf.onion/~lynX 2016-11-17 05:49:53 +01:00
parent c5ce025488
commit 3eab6d6140
7 changed files with 31 additions and 16 deletions

View file

@ -51,7 +51,7 @@ int emit(string message) {
string t, err;
// according to http://www.w3.org/TR/xml/#charsets
// remove illegal unicode chars --// thx elmex
err = catch(t = regreplace(message, "[^\\x{9}\\x{A}\\x{D}\\x{20}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{10000}-\\x{10FFFFFF}]+", "*", RE_GLOBAL | RE_UTF8); nolog);
err = catch(t = regreplace(message, "[^\\x{9}\\x{A}\\x{D}\\x{20}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{10000}-\\x{10FFFFF}]+", "*", RE_GLOBAL | RE_UTF8); nolog);
if (err || t != message) {
// Info: Chars filtered to %O. Message was %O.
log_file("CHARS_XMPP", "[%s] %O %O %O\n", ctime(),

View file

@ -145,7 +145,8 @@ verify_connection(string to, string from, string type) {
sAuthenticated(from);
#ifdef XMPP_BIDI
if (bidi) {
P0(("doing register target for xmpp bidi!!!!\n"))
P0(("doing register target for xmpp bidi (2)!!!!\n"))
P0(("register_target(XMPP + %O)\n", from))
register_target(XMPP + from);
}
#endif
@ -423,7 +424,8 @@ jabberMsg(XMLNode node) {
while (remove_call_out(#'quit) != -1);
#ifdef XMPP_BIDI
if (bidi) {
P0(("doing register target for xmpp bidi!!!!\n"))
P0(("doing register target for xmpp bidi (1)!!!!\n"))
P0(("register_target(XMPP + %O)\n", t))
register_target(XMPP + t);
}
#endif