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
Query and Scan: a TableName outside the pattern beside Limit 0 answers the table name, where DynamoDB answers the Limit fault #905
The table name gate of #830 runs first in authorize_request (crates/server/src/table_name_gate.rs), before the handler checks Limit. A request with both faults gets the table name fault.
Measured on 2026-11-06 at the head of #830 (ccdae81), SQLite and PostgreSQL:
Request
ExtendDB
Scan, TableName: "a b", Limit: 0
1 validation error detected: Value 'a b' at 'tableName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9_.-]+
Query, TableName: "a b", Limit: 0, a key condition
the same sentence
The #830 review reports that the merge base (25ee109) answered the Scan request with ResourceNotFoundException.
What DynamoDB does
Measured in us-east-1 on 2026-11-06, with SDK parameter validation off. Both requests answer the Limit fault, the same sentence as Limit: 0 on an existing table:
1 validation error detected: Value at 'Limit' failed to satisfy constraint: Member must have value greater than or equal to 1
Suggested fix
For Query and Scan, check Limit before the table name pattern, or let the gate pass a request whose Limit is below 1 on to the handler. Which other members DynamoDB checks before the table name was not measured. #563 covers the two text forms of the Limit sentence and #778 covers Limit beside an ExpressionAttributeValues fault.
I measured the Query row again on 2026-11-23, with one more shape: a number fault beside the table name fault.
Amazon DynamoDB, us-east-1, 2026-11-23 at 11:56 UTC, each request twice with the same answer, Query with TableNamebad name! and KeyConditionExpressionpk = :p. The last column is local SQLite servers built from main at 8c64333 and from #544's branch at 5cd089d, which give the same answers, twice each. "Table name text" is 1 validation error detected: Value 'bad name!' at 'tableName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9_.-]+.
1 validation error detected: Value at 'Limit' failed to satisfy constraint: Member must have value greater than or equal to 1
Table name text
:p = {"N": "bob"}
Table name text
Table name text
So the service checks the table name pattern after Limit and ahead of the numbers in ExpressionAttributeValues. check_table_name_chars runs first in authorize_request (crates/server/src/request_helpers.rs). #544 runs its Query request checks later in the same function. A fix has to move the Limit check ahead of the table name gate and keep the number check after it. I did not measure the order of ReturnConsumedCapacity or Select against the table name.
Activity
LeeroyHannigan commentedon Nov 23, 2026
I measured the
Queryrow again on 2026-11-23, with one more shape: a number fault beside the table name fault.Amazon DynamoDB, us-east-1, 2026-11-23 at 11:56 UTC, each request twice with the same answer,
QuerywithTableNamebad name!andKeyConditionExpressionpk = :p. The last column is local SQLite servers built from main at 8c64333 and from #544's branch at 5cd089d, which give the same answers, twice each. "Table name text" is1 validation error detected: Value 'bad name!' at 'tableName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9_.-]+.Limit: 0,:p={"S": "x"}1 validation error detected: Value at 'Limit' failed to satisfy constraint: Member must have value greater than or equal to 1:p={"N": "bob"}So the service checks the table name pattern after
Limitand ahead of the numbers inExpressionAttributeValues.check_table_name_charsruns first inauthorize_request(crates/server/src/request_helpers.rs). #544 runs itsQueryrequest checks later in the same function. A fix has to move theLimitcheck ahead of the table name gate and keep the number check after it. I did not measure the order ofReturnConsumedCapacityorSelectagainst the table name.