fastapi-user-auth
fastapi-user-auth copied to clipboard
FastAPI-User-Auth is a simple and powerful FastAPI user RBAC authentication and authorization library. Based on FastAPI-Amis-Admin and provides a freely extensible visual management interface.
``` @router.get('/xxx/API/Verification_Code') async def verification_code(): '''验证码生成''' # 定义图片大小及背景颜色 image = Image.new('RGB', (120, 30), color=(73, 109, 137)) # 使用系统自带字体,或指定字体文件路径 font_path = "./static/arial.ttf" fnt = ImageFont.truetype(font_path, 15) d = ImageDraw.Draw(image) captcha_text =...
xss漏洞示例:  修复: ``` /fastapi_user_auth/admin/admin.py 第118行和第190行 import html form.redirect = html.escape(request.query_params.get("redirect") or "/") ``` 效果: 