fix(httpapi): redact agent_secret from speaker list responses
Секрет agent больше не отдаётся viewer/editor в GET/list speakers; остаётся только при создании спикера. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6a6f6cedbc
commit
5a16a45922
2 files changed
+66
-1
No files matched your search
@@ -39,7 +39,10 @@ func speakerJSONFromStore(st store.Backend, sp *store.Speaker) map[string]any {
|
||||
if strings.TrimSpace(sp.MetaJSON) != "" && sp.MetaJSON != "{}" {
|
||||
var raw map[string]any
|
||||
if json.Unmarshal([]byte(sp.MetaJSON), &raw) == nil {
|
||||
m["meta_json"] = raw
|
||||
delete(raw, "agent_secret")
|
||||
if len(raw) > 0 {
|
||||
m["meta_json"] = raw
|
||||
}
|
||||
}
|
||||
}
|
||||
if meta.AgentDomain != "" {
|
||||
|
||||
Reference in new issue
Block a user