An ExpressionAttributeNames entry with a malformed key and a value that is not a string answers ValidationException, where DynamoDB answers SerializationException

Aperta Adatta ai principianti
#1,321 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, backend, database

Direzione di ricerca

Inizia da deserialize_placeholder_map in crates/core/src/serde_helpers.rs, raggiunta tramite deserialize_expression_names. Leggi dove viene validata ogni chiave e dove viene convertito ogni valore, poi verifica perché il controllo sulla chiave viene eseguito per primo. È completato quando un valore non stringa in ExpressionAttributeNames restituisce SerializationException anche se la chiave è malformata, per entrambe le richieste GetItem e SearchVectors nel payload.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Measured

DynamoDB in us-east-1 on 2026-11-21, each request twice with the same answer:

  • GetItem with ProjectionExpression #n and ExpressionAttributeNames {"n": 5} answers SerializationException NUMBER_VALUE cannot be converted to String.
  • SearchVectors with the same members answers SerializationException invalid type: integer `5`, expected a string at line 1 column 218.

ExtendDB (main 8c643330c, SQLite) answers the GetItem request with ValidationException ExpressionAttributeNames contains invalid key: Syntax error; key: "n". It answers the SearchVectors request with SerializationException, on main and with the fix for #729.

Where

deserialize_placeholder_map in crates/core/src/serde_helpers.rs reads each value as raw JSON, and it checks the key before it converts the value. Every operation that reads the map with deserialize_expression_names at the parse has this order.

Expected

Report the value of the wrong type first, as the service does.

Lingua principale
Rust
Stelle
517
Fork
60
Merge medio
3g 21h
PR unite (30g)
116

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ExtendDB/extenddb

Tutte le issue di ExtendDB/extenddb

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.