mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-22 15:52:13 +00:00
Alternator has a function validate_attr_name_length() used to validate an attribute name passed in different operations like PutItem, UpdateItem, GetItem, etc. It fails the request if the attribute name is longer than 65535 characters. It turns out that we forgot to check if the attribute name length isn’t 0 - which should be forbidden as well! This patch fixes the validation code, and also adds a test that confirms that after this patch empty attribute names are rejected - just like DynamoDB does - whereas before this patch they were silently accepted. We want to fix this issue now, because in a later patch we intend to use the same validation function also for vector indexes - and want it to be accurate. Fixes SCYLLADB-1069. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
54 KiB
54 KiB