Skip to content

Encode dynamic URL path segments in SDK and CLI requests #5893

Description

@VectorPeak

Summary

Some hosted SDK and CLI methods build API URLs by interpolating caller-provided identifiers directly into URL path segments. Identifiers containing URL-structural characters such as /, ?, or # can change the generated request URL semantics instead of being treated as one literal path segment.

Affected areas

  • Python SDK memory paths
  • Python CLI memory, entity, and event paths
  • TypeScript SDK memory and entity paths
  • Node CLI memory, entity, and event paths

Expected behavior

Dynamic path segment values should be encoded before being inserted into API paths, for example:

org/team?active#frag -> org%2Fteam%3Factive%23frag

Related PR

This is addressed by #5818.

Metadata

Metadata

Assignees

Labels

P2-mediumAnnoying but has workaroundsbugSomething isn't workingsecuritySecurity vulnerability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions