Bug Description
s3toss can panic while parsing malformed TAOS configuration values. The parser indexes split results and dataDir tiers without validating the parsed shape first, so invalid config is reported as an index-out-of-range panic instead of a configuration error.
To Reproduce
Use a taos.cfg that contains one of these malformed entries and run s3toss with that config:
ssAccessString s3:endpoint
or:
The documented dataDir tier range is 0, 1, and 2, so level 3 should be rejected cleanly.
Expected Behavior
s3toss should return a clear configuration parse error for malformed ssAccessString options or out-of-range dataDir levels instead of panicking.
Screenshots
N/A
Environment (please complete the following information):
- OS: reproduced with focused Go unit tests; config parsing is platform-independent
- Memory, CPU, current Disk Space: N/A
- TDengine Version: current main branch
Additional Context
The same parser also handles legacy s3endpoint configuration. Invalid endpoint values without an http:// or https:// prefix should be rejected before slicing the string.
Bug Description
s3toss can panic while parsing malformed TAOS configuration values. The parser indexes split results and dataDir tiers without validating the parsed shape first, so invalid config is reported as an index-out-of-range panic instead of a configuration error.
To Reproduce
Use a taos.cfg that contains one of these malformed entries and run s3toss with that config:
or:
The documented dataDir tier range is 0, 1, and 2, so level 3 should be rejected cleanly.
Expected Behavior
s3toss should return a clear configuration parse error for malformed ssAccessString options or out-of-range dataDir levels instead of panicking.
Screenshots
N/A
Environment (please complete the following information):
Additional Context
The same parser also handles legacy s3endpoint configuration. Invalid endpoint values without an http:// or https:// prefix should be rejected before slicing the string.