Hey,
I noticed in testing that when one of our developers sent a 43MB message to
a dev instance of Djabberd it crashed with the output "Killed".

I'm thinking my stream compression plugin and additions are probably partly
to blame here, but regardless I'd like to implement something in Djabberd to
limit message sizes.

I'm thinking this would be a config option in djabberd.conf...

I'm thinking I would have to keep a running count of every byte sent to
XMLParser.parse_chunk_scalarref and parse_chunk (maybe from
Connection.event_read)

I'm thinking I would have to clear that running count whenever a stanza is
parsed out of it. (on_end_capture in SAXHandler.start_element.. or maybe
Connection.on_stanza_received)

And then, if that running count ever got larger than the count specified in
config, we would close the stream and log an error

Does this sound like a reasonable approach to the problem?

patch forthcoming....

Jacob

Reply via email to