mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-30 06:41:51 +00:00
fix(dashboard): require auth for plugin rescan (#27340)
This commit is contained in:
parent
5acaeba2bb
commit
ee002e7fc5
2 changed files with 6 additions and 1 deletions
|
|
@ -119,7 +119,6 @@ _PUBLIC_API_PATHS: frozenset = frozenset({
|
|||
"/api/model/info",
|
||||
"/api/dashboard/themes",
|
||||
"/api/dashboard/plugins",
|
||||
"/api/dashboard/plugins/rescan",
|
||||
})
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -327,6 +327,12 @@ class TestWebServerEndpoints:
|
|||
# Public endpoints should still work
|
||||
resp = unauth_client.get("/api/status")
|
||||
assert resp.status_code == 200
|
||||
resp = unauth_client.get("/api/dashboard/plugins")
|
||||
assert resp.status_code == 200
|
||||
resp = unauth_client.get("/api/dashboard/plugins/rescan")
|
||||
assert resp.status_code == 401
|
||||
resp = self.client.get("/api/dashboard/plugins/rescan")
|
||||
assert resp.status_code == 200
|
||||
|
||||
def test_path_traversal_blocked(self):
|
||||
"""Verify URL-encoded path traversal is blocked."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue