Djabberd max message size

Brad Fitzpatrick brad at danga.com
Wed Jun 18 05:51:03 UTC 2008


Sounds good.

On Tue, Jun 17, 2008 at 4:02 PM, Jacob Burkhart <igotimac at gmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20080617/dba683c5/attachment.html 


More information about the Djabberd mailing list