fix(install): reject NaN and Infinity in existing settings
Python's JSON parser accepts them, so an invalid settings file was rewritten instead of being refused and left untouched. Refs: #280 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
1 parent
aa8319a1db
commit
f0aac594c3
2 files changed
+3
-2
No files matched your search
@@ -147,7 +147,7 @@ else
|
||||
fail "a second run changed the merged settings"
|
||||
fi
|
||||
|
||||
for invalid in '{"model": "opus",' '["not an object"]' ''; do
|
||||
for invalid in '{"model": "opus",' '["not an object"]' '{"x": NaN}' ''; do
|
||||
BAD_HOME="$(new_home)"
|
||||
BAD="$BAD_HOME/.claude/settings.json"
|
||||
printf '%s' "$invalid" > "$BAD"
|
||||
|
||||
Reference in new issue
Block a user