限制 Raw 图片仅接收八位 PNG
使用 png 解码器读取位深并在 image 解码前拒绝非八位输入。 统一返回稳定的 8-bit PNG 客户端错误并补充十六位 PNG 测试。
This commit is contained in:
Generated
+1
@@ -240,6 +240,7 @@ dependencies = [
|
||||
"platform-oss",
|
||||
"platform-speech",
|
||||
"platform-wechat",
|
||||
"png",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"ring",
|
||||
|
||||
@@ -87,6 +87,7 @@ http-body-util = "0.1"
|
||||
httpdate = "1"
|
||||
hex = "0.4"
|
||||
image = { version = "0.25", default-features = false }
|
||||
png = "0.18"
|
||||
jsonwebtoken = "9"
|
||||
log = "0.4"
|
||||
mime_guess = "2.0.5"
|
||||
|
||||
@@ -14,6 +14,7 @@ bytes = { workspace = true }
|
||||
dotenvy = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
image = { workspace = true, features = ["jpeg", "png", "webp"] }
|
||||
png = { workspace = true }
|
||||
http-body-util = { workspace = true }
|
||||
reqwest = { workspace = true, features = ["json", "multipart", "rustls-tls"] }
|
||||
regex = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user