mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-11 17:58:52 -05:00
disallow svg MIME types to be inline Content-Disposition
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
2bd7a92256
commit
829307c83b
1 changed files with 7 additions and 1 deletions
|
|
@ -16,7 +16,13 @@ pub(crate) fn content_disposition_type(buf: &[u8], _content_type: &Option<String
|
|||
};
|
||||
|
||||
match file_type.matcher_type() {
|
||||
MatcherType::Image | MatcherType::Audio | MatcherType::Text | MatcherType::Video => "inline",
|
||||
MatcherType::Image | MatcherType::Audio | MatcherType::Text | MatcherType::Video => {
|
||||
if file_type.mime_type().contains("svg") {
|
||||
"attachment"
|
||||
} else {
|
||||
"inline"
|
||||
}
|
||||
},
|
||||
_ => "attachment",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue