Repository navigation
fix: harden configuration path handling - #1263
Merged
Merged
Conversation
- improve validation for configuration path fields - standardize downstream path handling - add regression coverage for boundary inputs Related to oceanbase#1262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Invalid deployment paths in configuration can reach shell commands and cause failures or unintended shell interpretation. This change validates effective observer and obproxy paths during configuration loading and consistently quotes paths in version, PID, configuration-check, and I/O device-discovery commands.
Closes #1262
Solution Description
home_path,data_dir, andredo_dir, and obproxyhome_path, after applying node overrides and global defaults. Report the affected node and field for invalid values.~, and~/paths with supported characters; reject empty values, non-string values, unsupported relative paths, whitespace, and shell metacharacters.~paths and use POSIX path joins for remote commands.Validation
Validated in an isolated environment using Python 3.14.3 on macOS:
The runs emitted existing invalid-escape and dependency deprecation warnings. No live OceanBase cluster integration test was performed.
Compatibility
Existing defaults and node-over-global precedence are unchanged. Unsupported configured paths now fail early with a field-specific error instead of reaching downstream commands.