You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ListStreams: the table name gate checks 3 to 255 characters while the other operations check the configured bounds #992
The table name gate in crates/server/src/table_name_gate.rs (#830) refuses a ListStreamsTableName shorter than 3 or longer than 255 characters. The answer is ValidationException "TableName must be at least 3 characters long and at most 255 characters long". The bounds are literals in the gate's ListStreams arm (line 133 at 95425f5) and in the text (line 77).
The other table operations check the length with validate_table_name in crates/core/src/validation/mod.rs. That function reads limits.min_table_name_length and limits.max_table_name_length, and a deployment can raise the maximum above 255. For those operations the gate leaves a name inside the character pattern to the engine handlers.
So on a deployment with max_table_name_length = 300, CreateTable accepts a name of 300 characters. Then ListStreams with that name answers the 3 to 255 text, and it never reaches the handler.
This comes from reading the code. It was not run on a deployment with raised limits.
Proposed fix: take the bounds of the gate's ListStreams arm, and of its text, from the deployment's limits, as validate_table_name does. With the default limits (3 and 255) the answer stays the same.
The same fixed bounds appear in two more places of the gate, read from the code at main 5252eda:
bare_name_error (crates/server/src/table_name_gate.rs, line 220) answers a name outside the character pattern in every other member that the gate checks. Its length clauses are the literals Member must have length greater than or equal to 3 and Member must have length less than or equal to 255. So on a deployment with other min_table_name_length or max_table_name_length values, such a name gets clauses that name bounds the deployment does not apply. A name inside the pattern goes to the engine, which checks the deployment's bounds.
Activity
LeeroyHannigan commentedon Nov 25, 2026
The same fixed bounds appear in two more places of the gate, read from the code at main 5252eda:
bare_name_error(crates/server/src/table_name_gate.rs, line 220) answers a name outside the character pattern in every other member that the gate checks. Its length clauses are the literalsMember must have length greater than or equal to 3andMember must have length less than or equal to 255. So on a deployment with othermin_table_name_lengthormax_table_name_lengthvalues, such a name gets clauses that name bounds the deployment does not apply. A name inside the pattern goes to the engine, which checks the deployment's bounds.TargetTableNamein the gate with the fixed bounds(3, 255), where the engine uses the deployment's bounds.With the default limits, all three answers stay the same. A fix for this issue can take the bounds of all three from the deployment's limits.