mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(ses): check v2 send request bodies against the service model SendEmail, SendBulkEmail and SendCustomVerificationEmail read their members by hand, so a member of the wrong JSON type was coerced, read as empty, or rejected with a Floci-specific BadRequestException, depending on which member it was. AWS deserializes the whole body against the model first and answers the first member of the wrong type, in body order, with a SerializationException and its deserializer message. tools/aws/regen_sesv2_shapes.py vendors the body shapes of botocore's SES v2 model into src/main/resources/aws/sesv2-request-shapes.json, kept in sync by make aws-data-check like the DynamoDB shapes. SesV2RequestShapes checks a body against them, and the three send endpoints call it before reading any member. The type checks it makes redundant are removed from the send helpers. A null address list element still passes and fails as "Invalid email address null.", as on AWS. Only the string, blob, list, structure and map messages have been probed, so number, boolean and timestamp members are left to their controllers. * fix(ses): report a null v2 send address where SES does A null element of a v2 send address list was rejected for the whole request while the body was read. SES lets it through deserialization and reports it later: SendEmail answers "Invalid email address null." after its content and sender checks and before the tenant lookup, and SendBulkEmail reports it as the INVALID_PARAMETER status of the entry it belongs to, of every entry for a null Reply-To, or as "Destination cannot be empty" when no entry of the request has a non-null recipient. The address lists now keep the null, SendEmail checks for it ahead of the tenant gate, and the bulk entry check reports it per entry. Two ordered integration tests that shared an @Order value get their own. * chore(core): share the vendored request-shape model DynamoDbRequestShapes and SesV2RequestShapes each carried the same Shape and Model records and the same parse() and load(), and load() repeated VendoredResources.read. RequestShapeModel in core.common now holds that half and both checks use it; each keeps its own walk and its protocol's messages.