Menu

#202 Web: Prevent “memory bomb” + heap_size argument to supybot.commands.process()

open
nobody
None
8
2013-11-10
2013-11-10
No

Hi,

When calling a command of the Web plugin (@title, @headers, @fetch, …) with an URL to a specific server (I wrote the code of such a server, ask if you want to see it), Python's urllib will try to store all headers, leading in a forever increasing memory usage (which is very fast).

This patch makes Web execute all commands in a subprocess, which is killed when it tries to allocate too much memory.

https://github.com/ProgVal/Limnoria/commit/918b8a3c01a2c3ea08becb54b11bd79a07848a42
https://github.com/ProgVal/Limnoria/commit/d8a4ef8421422324bede067d3964b0b7ee60079e
https://github.com/ProgVal/Limnoria/commit/790bda46645925a9d9d99669db63c5b0ec0c94e1

Regards,
Valentih

Discussion


Log in to post a comment.

MongoDB Logo MongoDB