V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cj1324
V2EX  ›  反馈

V2EX某异常泄露了部分信息 原来是基于py27/tornado/jinja2

  •  
  •   cj1324 · 2013-06-26 14:24:09 +08:00 · 3895 次点击
    这是一个创建于 3962 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1042, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
    File "/www/v2ex/galaxy/handlers/web/notifications.py", line 56, in get
    self.finalize('n.xml')
    File "/www/v2ex/galaxy/handlers/feed/__init__.py", line 45, in finalize
    self.write(template.render(self.values))
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
    File "/www/v2ex/galaxy/templates/feed/n.xml", line 25, in top-level template code
    {{ n.payload|es|nlink|tlink|sinaimg|youtube|youku|tudou|gist|mentions|autolink|nl2br }}
    File "/www/v2ex/galaxy/filters/__init__.py", line 55, in es
    value = value.replace('<', '<')
    AttributeError: 'NoneType' object has no attribute 'replace'
    8 条回复    1970-01-01 08:00:00 +08:00
    ipconfiger
        1
    ipconfiger  
       2013-06-26 15:39:37 +08:00
    這個,不看異常也知道啊
    Livid
        2
    Livid  
    MOD
       2013-06-26 15:54:53 +08:00
    多谢反馈。

    这个异常已经修复。
    ohhe
        3
    ohhe  
       2013-06-26 17:16:56 +08:00
    @Livid bug: 昨天我的未读提醒显示:21条未读提醒,其实只有1条
    loading
        4
    loading  
       2013-06-26 17:51:59 +08:00 via iPhone
    我想知道如何在出错后不显示这个给客户。
    bcxx
        5
    bcxx  
       2013-06-26 17:58:21 +08:00
    @loading 关掉 debug ?
    cj1324
        6
    cj1324  
    OP
       2013-06-26 18:20:29 +08:00
    关掉debug显示500 就行~
    tension
        7
    tension  
       2013-06-26 18:22:11 +08:00
    @ohhe 这个问题很多了我有时候显示91条
    Livid
        8
    Livid  
    MOD
       2013-06-26 18:24:59 +08:00
    @loading V2EX 的普通页面上是看不到这个异常的。

    是我们的一个 RSS Feed 出错时的异常。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   840 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 19:57 · PVG 03:57 · LAX 12:57 · JFK 15:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.