cj1324
V2EX  ›  反馈

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

  •  
  •   cj1324 · Jun 26, 2013 · 4768 views
    This topic created in 4737 days ago, the information mentioned may be changed or developed.
    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 replies    1970-01-01 08:00:00 +08:00
    ipconfiger
        1
    ipconfiger  
       Jun 26, 2013
    這個,不看異常也知道啊
    Livid
        2
    Livid  
    MOD
    PRO
       Jun 26, 2013
    多谢反馈。

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

    是我们的一个 RSS Feed 出错时的异常。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5890 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 71ms · UTC 03:05 · PVG 11:05 · LAX 20:05 · JFK 23:05
    ♥ Do have faith in what you're doing.