Don't fetch HTML pages attached by GNU Social
This commit is contained in:
parent
7c07cd79bc
commit
53138ea1c7
1 changed files with 4 additions and 0 deletions
|
@ -173,6 +173,10 @@ pub async fn handle_note(
|
||||||
continue;
|
continue;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
if attachment.media_type.as_deref() == Some("text/html; charset=UTF-8") {
|
||||||
|
// Don't fetch HTML pages attached by GNU Social
|
||||||
|
continue;
|
||||||
|
};
|
||||||
let attachment_url = attachment.url
|
let attachment_url = attachment.url
|
||||||
.ok_or(ValidationError("attachment URL is missing"))?;
|
.ok_or(ValidationError("attachment URL is missing"))?;
|
||||||
let (file_name, maybe_media_type) = fetch_file(
|
let (file_name, maybe_media_type) = fetch_file(
|
||||||
|
|
Loading…
Reference in a new issue