POST/DELETE /v1/account/avatar (session, exact Origin, CSRF) and public GET /v1/avatars/<id>. Uploads are sniffed, size and dimension limited, fully decoded, re-encoded to a 256x256 PNG without metadata and stored in SQLite, one per account. avatar_url in the session points to it, with the provider avatar as fallback. Claude-Session: https://claude.ai/code/session_01GDjxLvBcnJqniFQGUGb1V4
38 lines
1.3 KiB
TOML
38 lines
1.3 KiB
TOML
[package]
|
|
name = "vnox-hub"
|
|
description = "Vnox central service foundation — identity, readiness and transactional mail"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
axum = "0.8"
|
|
ed25519-dalek.workspace = true
|
|
hex.workspace = true
|
|
rand.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio = { workspace = true, features = ["signal"] }
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
uuid = { workspace = true, features = ["serde"] }
|
|
sqlx = { version = "0.9", default-features = false, features = ["sqlite", "runtime-tokio", "migrate", "macros"] }
|
|
lettre = { version = "0.11.23", default-features = false, features = ["builder", "smtp-transport", "tokio1-rustls", "aws-lc-rs", "webpki-roots"] }
|
|
url = "2"
|
|
# Avatar re-encoding: only PNG, JPEG and WebP decoders and the PNG encoder; no GIF, SVG or other formats.
|
|
image = { version = "0.25.10", default-features = false, features = ["png", "jpeg", "webp"] }
|
|
|
|
reqwest.workspace = true
|
|
sha2.workspace = true
|
|
oauth2 = { version = "5", default-features = false, features = ["timing-resistant-secret-traits"] }
|
|
cookie = "0.18"
|
|
subtle = "2.6"
|
|
hmac.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
tower = { version = "0.5", features = ["util"] }
|