Session file security updates (#3071)
This commit is contained in:
@@ -372,9 +372,17 @@ impl Agent {
|
||||
})?;
|
||||
|
||||
// Get the session file path
|
||||
let session_path = crate::session::storage::get_path(
|
||||
let session_path = match crate::session::storage::get_path(
|
||||
crate::session::storage::Identifier::Name(session_id.to_string()),
|
||||
);
|
||||
) {
|
||||
Ok(path) => path,
|
||||
Err(e) => {
|
||||
return Err(ToolError::ExecutionError(format!(
|
||||
"Invalid session ID '{}': {}",
|
||||
session_id, e
|
||||
)));
|
||||
}
|
||||
};
|
||||
|
||||
// Check if session file exists
|
||||
if !session_path.exists() {
|
||||
|
||||
Reference in New Issue
Block a user