90blog
V2EX  ›  反馈

头像上传未过滤

  •  
  •   90blog · Sep 8, 2012 · 3738 views
    This topic created in 5066 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   ·   Solana   ·   997 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:21 · PVG 03:21 · LAX 12:21 · JFK 15:21
    ♥ Do have faith in what you're doing.