Problem
Table/measurement names containing ASCII control characters (0x01-0x08, 0x0B-0x0C, 0x0E-0x1F) cause S3 listing to
fail. These characters are illegal in XML 1.0 and corrupt the ListObjectsV2 response.
Error
{
"error": "Failed to list databases: failed to list S3 objects: operation error S3: ListObjectsV2,
https response error StatusCode: 200, deserialization failed,
XML syntax error on line 1: illegal character code U+0005"
}
Affected Endpoints
- GET /api/v1/databases
- Any endpoint that lists S3 objects
Broken Characters
0x01-0x08, 0x0B, 0x0C, 0x0E-0x1F (all control chars except TAB, LF, CR)
Impact
One bad table name breaks all database/table listing for the entire bucket until manually deleted from S3.
Fix
Reject table names with control characters on write:
for _, r := range name {
if r < 0x20 && r != '\t' && r != '\n' && r != '\r' {
return fmt.Errorf("invalid character U+%04X in name", r)
}
}
Repro
aws s3 cp test.parquet "s3://bucket/db/table$(printf '\x05')name/test.parquet"
curl http://localhost:8000/api/v1/databases # fails
Environments
Problem
Table/measurement names containing ASCII control characters (0x01-0x08, 0x0B-0x0C, 0x0E-0x1F) cause S3 listing to
fail. These characters are illegal in XML 1.0 and corrupt the ListObjectsV2 response.
Error
{
"error": "Failed to list databases: failed to list S3 objects: operation error S3: ListObjectsV2,
https response error StatusCode: 200, deserialization failed,
XML syntax error on line 1: illegal character code U+0005"
}
Affected Endpoints
Broken Characters
0x01-0x08, 0x0B, 0x0C, 0x0E-0x1F (all control chars except TAB, LF, CR)
Impact
One bad table name breaks all database/table listing for the entire bucket until manually deleted from S3.
Fix
Reject table names with control characters on write:
for _, r := range name {
if r < 0x20 && r != '\t' && r != '\n' && r != '\r' {
return fmt.Errorf("invalid character U+%04X in name", r)
}
}
Repro
aws s3 cp test.parquet "s3://bucket/db/table$(printf '\x05')name/test.parquet"
curl http://localhost:8000/api/v1/databases # fails
Environments