MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / sanitizePluginMetadata

Function sanitizePluginMetadata

internal/pluginhost/rpc_client.go:224–238  ·  view source on GitHub ↗
(src map[string]any)

Source from the content-addressed store, hash-verified

222}
223
224func sanitizePluginMetadata(src map[string]any) map[string]any {
225 if len(src) == 0 {
226 return nil
227 }
228 dst := make(map[string]any, len(src))
229 for key, value := range src {
230 if sanitized, ok := sanitizePluginMetadataValue(value); ok {
231 dst[key] = sanitized
232 }
233 }
234 if len(dst) == 0 {
235 return nil
236 }
237 return dst
238}
239
240func sanitizePluginMetadataValue(value any) (any, bool) {
241 switch v := value.(type) {

Callers 2

sanitizePluginRequestFunction · 0.85

Calls 1

Tested by

no test coverage detected