Skip to content

Instantly share code, notes, and snippets.

@mylamour
Created September 14, 2018 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mylamour/702d9d6e24a27699d8759967e6eb9f4f to your computer and use it in GitHub Desktop.
Save mylamour/702d9d6e24a27699d8759967e6eb9f4f to your computer and use it in GitHub Desktop.
#Part of Flask Security#
  • 使用Flask-Security
  • 直接生成 HTML 而不通过使用Jinja2
  • 不要在用户提交的数据上调用Markup
  • 使用 Content-Disposition: attachment 标头去避免上传html文件
  • 防止CSRF,flask本身没有实现该功能
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment