Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: authorization bypass (IDOR) in /v1/document/web_crawl (#13203)

Yongteng Lei2bf2abfdbcff
diff --git a/api/apps/document_app.py b/api/apps/document_app.py
index 504eae9eb7..5192756e0e 100644
--- a/api/apps/document_app.py
+++ b/api/apps/document_app.py
@@ -125,7 +125,7 @@ async def web_crawl():
e, kb = KnowledgebaseService.get_by_id(kb_id)
if not e:
raise LookupError("Can't find this dataset!")
- if check_kb_team_permission(kb, current_user.id):
+ if not check_kb_team_permission(kb, current_user.id):
return get_json_result(data=False, message="No authorization.", code=RetCode.AUTHENTICATION_ERROR)
blob = html2pdf(url)