Skip to content

s3toss can panic on malformed configuration entries #35403

Description

@VectorPeak

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:

dataDir /tmp/taos 3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions