fix(security): 文件上传 MIME 白名单 + OAuth JWT 密钥路径统一
P0 #1: 媒体文件上传增加 MIME 类型白名单校验(jpeg/png/gif/webp/svg/mp4/webm/pdf) 和文件大小限制(10MB),扩展名使用白名单清理防止路径遍历攻击。 P0 #2: OAuth JWT 密钥从环境变量改为 State 注入,消除运行时 env::var 依赖, FHIR 路由中间件使用闭包捕获 jwt_secret 保持类型安全。
This commit is contained in:
@@ -26,6 +26,7 @@ impl TestApp {
|
||||
db: test_db.db().clone(),
|
||||
event_bus: EventBus::new(100),
|
||||
crypto: PiiCrypto::dev_default(),
|
||||
jwt_secret: "test-jwt-secret-for-integration-tests".to_string(),
|
||||
};
|
||||
let dialysis_state = DialysisState {
|
||||
db: test_db.db().clone(),
|
||||
|
||||
Reference in New Issue
Block a user