XHTML Image size limit : 10mo->2mo
This commit is contained in:
parent
2403239695
commit
9ab2800fd0
1 changed files with 2 additions and 2 deletions
|
@ -681,8 +681,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
self._jump_line()
|
self._jump_line()
|
||||||
elif name == 'img':
|
elif name == 'img':
|
||||||
try:
|
try:
|
||||||
## Max image size = 10 MB (to try to prevent DoS)
|
## Max image size = 2 MB (to try to prevent DoS)
|
||||||
mem = urllib2.urlopen(attrs['src']).read(10*1024*1024)
|
mem = urllib2.urlopen(attrs['src']).read(2*1024*1024)
|
||||||
## Caveat: GdkPixbuf is known not to be safe to load
|
## Caveat: GdkPixbuf is known not to be safe to load
|
||||||
## images from network... this program is now potentially
|
## images from network... this program is now potentially
|
||||||
## hackable ;)
|
## hackable ;)
|
||||||
|
|
Loading…
Add table
Reference in a new issue