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:
Jin Hai
2026-07-13 21:00:19 +08:00
committed by GitHub
parent 45862bf95d
commit 844e3ea64d
9 changed files with 63 additions and 42 deletions

View File

@@ -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]")