imoyao
imoyao
https://github.com/dusktreader/flask-praetorian/blob/c23d10e0d6e34b2b3102b9b71e48f006b8397467/flask_praetorian/base.py#L243 ```python self.reset_sender = app.config.get( "PRAETORIAN_RESET_SENDER", ) ``` might can be replace by: ``` ... DEFAULT_SENDER = app.config.get( "DEFAULT_SENDER" ) ... self.reset_sender = app.config.get( "PRAETORIAN_RESET_SENDER", DEFAULT_SENDER ) ``` IPO,the only...
- [ ] 发现一个越权漏洞,解决方案:authorId需根据article_id查询出来,因为前端的数据除了token,都不可信。 ```python json_data = request.json current_user_id = json_data.get('authorId') if g.user.id != current_user_id: # or g.current_user.can(Permission.ADMINISTER): return forbidden('Insufficient permissions') ``` _Originally posted by @githubcyc in https://github.com/imoyao/idealyard/issues/9#issuecomment-824031989_
他山之石可以攻玉,本人在学习Flask的过程中也看到其他人已经做的一部分工作,希望要为翻译项目做贡献的同学在翻译的时候可以参考下面的已有内容,以达到事半功倍的效果。 非常感谢作者为Flask的发展所做的工作和贡献,相信在官方社区人员的帮助下,文档的质量会更高。 [欢迎来到 Flask 的世界 — Flask 中文文档( 1.1.2 )](https://dormousehole.readthedocs.io/en/latest/) [欢迎使用 Flask — Flask 0.10.1 documentation](http://www.pythondoc.com/flask/) [欢迎使用 Flask — Flask 0.10.1 文档](http://docs.jinkan.org/docs/flask/)