mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-06 15:44:09 +08:00
Go and Python: fix IDOR issue of search completions (#16864)
### Summary In Go and python implementation, the dataset / KB id isn't validated if it is accessible by this user. --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -247,3 +247,12 @@ def ensure_parsed_document(rest_client, create_document):
|
||||
return dataset_id, document_id
|
||||
|
||||
return _ensure
|
||||
|
||||
|
||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||
def pytest_runtest_protocol(item, nextitem):
|
||||
import time
|
||||
start = time.perf_counter()
|
||||
yield
|
||||
duration = time.perf_counter() - start
|
||||
print(f" [{duration:.3f}s]")
|
||||
|
||||
Reference in New Issue
Block a user