Add image-gen module: Spring AI ImageModel options on the wire, a moderation gate, and safe storage of generated images in MinIO (sniffed content type, byte and pixel caps, server-chosen keys, capped URL fetcher); per-provider cost table dated 2026-10-28. ImageModel and ModerationModel are hand-written fakes; MinIO is real via Testcontainers; no image provider called.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Key construction
|
||||
|
||||
200 puts of identical bytes -> 200 distinct ids (a content hash would give 1)
|
||||
owner '../admin' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner 'user-42/../../x' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner 'USER' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner '' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner 'a b' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner 'user-42\0' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
owner 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' -> bad-owner: owner must match [a-z0-9][a-z0-9-]{0,31}
|
||||
id '../../etc/passwd' -> bad-id: an image id is 32 lowercase hex characters
|
||||
id 'ABCDEF0123456789ABCDEF0123456789' -> bad-id: an image id is 32 lowercase hex characters
|
||||
id '0123' -> bad-id: an image id is 32 lowercase hex characters
|
||||
id '0123456789abcdef0123456789abcde/' -> bad-id: an image id is 32 lowercase hex characters
|
||||
user-43 asks for user-42's id -> NoSuchKeyException (key is rebuilt under user-43/)
|
||||
Reference in New Issue
Block a user