You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(artifacts): normalize session_id across all artifact service backends
InMemoryArtifactService, FileArtifactService, and GcsArtifactService all
keyed session-scoped artifact storage on the raw, un-normalized session_id
string. Session services (InMemorySessionService, SqliteSessionService)
strip whitespace from session_id before using it (#6892, #6941/#6942), so
a session created with a padded id is stored under the trimmed one -- but
its artifacts, saved with the same padded id, landed in a sibling
namespace the session itself is never keyed under: one logical session,
two artifact namespaces.
This also let a whitespace-only session_id slip past validate_path_segment
(which only rejects an actually-empty string) and be used verbatim as a
literal path/key segment.
Adds artifact_util.normalize_session_id(), used at every entry point that
builds a storage key/path or path from a caller-supplied session_id:
save/load/list/delete/list_versions/list_artifact_versions/
get_artifact_version in the in-memory and GCS services, and the shared
_session_artifacts_dir() choke point in the file-based service. Also
applied inside parse_artifact_uri() and get_artifact_uri() so a
padded id can never leak into (or be read back out of) an artifact
reference URI, which is what the same-session artifact-reference scope
check compares against.
Does not touch session services -- that normalization already landed via
0 commit comments