返回提交历史
Modified
g4f/api/__init__.py
+1
-1
XFEstudio/gpt4free
Fix WebUI authentication bypass for /chat/ endpoint
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
d0ce5668
代码差异
1 个文件
+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: