mirror of
https://github.com/openai/codex.git
synced 2026-09-29 16:57:06 +08:00
Reject dynamic environments named local (#34784)
## Why `local` identifies the environment owned by `EnvironmentManager`, but dynamic remote environment registration previously allowed that ID to be replaced. ## What changed Reject `local` in the shared environment ID validator used by dynamic remote environment registration. GitOrigin-RevId: 2622551f78989c16c432e6dd3d7da9bd8b0527c5
This commit is contained in:
@@ -490,6 +490,11 @@ fn validate_environment_id(environment_id: &str) -> Result<(), ExecServerError>
|
||||
"environment id cannot be empty".to_string(),
|
||||
));
|
||||
}
|
||||
if environment_id == LOCAL_ENVIRONMENT_ID {
|
||||
return Err(ExecServerError::Protocol(format!(
|
||||
"environment id `{LOCAL_ENVIRONMENT_ID}` is reserved for EnvironmentManager"
|
||||
)));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user