XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Fix WebUI authentication bypass for /chat/ endpoint

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

d0ce5668
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/api/__init__.py +1 -1
@@ -269,7 +269,7 @@ class Api:
269 269 if user_g4f_api_key is not None:
270 270 if user is None:
271 271 return ErrorResponse.from_message("Invalid G4F API key", HTTP_403_FORBIDDEN)
272 elif path.startswith("/backend-api/") or path.startswith("/chat/") and path != "/chat/":
272 elif path.startswith("/backend-api/") or path.startswith("/chat/"):
273 273 try:
274 274 user = await self.get_username(request)
275 275 except HTTPException as e: