P0 #1: 媒体文件上传增加 MIME 类型白名单校验(jpeg/png/gif/webp/svg/mp4/webm/pdf) 和文件大小限制(10MB),扩展名使用白名单清理防止路径遍历攻击。 P0 #2: OAuth JWT 密钥从环境变量改为 State 注入,消除运行时 env::var 依赖, FHIR 路由中间件使用闭包捕获 jwt_secret 保持类型安全。
13 lines
341 B
Rust
13 lines
341 B
Rust
use erp_core::crypto::PiiCrypto;
|
|
use erp_core::events::EventBus;
|
|
use sea_orm::DatabaseConnection;
|
|
|
|
#[derive(Clone)]
|
|
pub struct HealthState {
|
|
pub db: DatabaseConnection,
|
|
pub event_bus: EventBus,
|
|
pub crypto: PiiCrypto,
|
|
/// JWT 密钥,由 erp-server 在启动时从已验证的环境变量注入
|
|
pub jwt_secret: String,
|
|
}
|