90blog
V2EX  ›  反馈

头像上传未过滤

  •  
  •   90blog · Sep 8, 2012 · 3816 views
    This topic created in 5149 days ago, the information mentioned may be changed or developed.
    <script>alert("xss")</script>保存为图片上传,报错

    Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 988, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 1739, in wrapper
    return method(self, *args, **kwargs)
    File "/www/v2ex/galaxy/handlers/web/settings.py", line 364, in post
    avatar73 = self.rescale(avatar, 73, 73)
    File "/www/v2ex/galaxy/handlers/__init__.py", line 395, in rescale
    img = pil.open(input_file)
    File "/usr/lib64/python2.6/site-packages/PIL/Image.py", line 1980, in open
    raise IOError("cannot identify image file")
    IOError: cannot identify image file
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3115 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:11 · PVG 22:11 · LAX 07:11 · JFK 10:11
    ♥ Do have faith in what you're doing.