Python web.py safeunicode函数错误?

Python web.py safeunicode函数错误?,python,security,exception,decode,web.py,Python,Security,Exception,Decode,Web.py,我在web.py utils.safeunicode函数上发现了一个bug。版本是0.36 >>> import web >>> app=web.application(('/hello','hello'),locals()) >>> class hello: ... def GET(self): ... return 'hello world' #it's the normal request >>> a

我在web.py utils.safeunicode函数上发现了一个bug。版本是0.36

>>> import web
>>> app=web.application(('/hello','hello'),locals())
>>> class hello:
...   def GET(self):
...       return 'hello world'

#it's the normal request
>>> app.request('/hello').data
'hello world'

#the Error request
>>> app.request('hello\xbf').data
...
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbf in position 6: unexpected code byte
我在一些web.py网站上试过,比如'http://web.site/index%bf,并且所有响应状态都为500或异常。那么这是一个bug还是易受攻击

我修复了utils.py行342

elif t is str:
    ooxxxxoo=obj.decode(encoding,'ignore')
    return ooxxxxoo

然后一切顺利。但是真的安全吗?

我已经在github存储库中打开了这个问题,并将其解决。也许你应该更新到0.37?

它仍然没有被修复。。在0.37上测试。尝试创建一个参数,如