fix: harden codex home boundaries
This commit is contained in:
@@ -11,6 +11,12 @@ type Config struct {
|
||||
}
|
||||
|
||||
func DefaultConfig() Config {
|
||||
if codexHome := os.Getenv("CODEX_HOME"); codexHome != "" {
|
||||
return Config{
|
||||
CodexHome: codexHome,
|
||||
HTTPAddr: "127.0.0.1:18083",
|
||||
}
|
||||
}
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
home = "."
|
||||
|
||||
Reference in New Issue
Block a user