Restrict /api/config/raw to admin role to prevent credential leak to non-admin users (#22523)

This commit is contained in:
Josh Hawkins
2026-03-18 16:14:59 -06:00
committed by GitHub
parent ae9b307dfc
commit e78da2758d
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ def config_raw_paths(request: Request):
return JSONResponse(content=raw_paths)
@router.get("/config/raw", dependencies=[Depends(allow_any_authenticated())])
@router.get("/config/raw", dependencies=[Depends(require_role(["admin"]))])
def config_raw():
config_file = find_config_file()