dont follow more than 2 redirects for URL previews for security reasons

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry authored and June committed 2024-02-11 21:56:55 -05:00
1 parent fb2eba722d
commit 8e6d52e7dd
2 files changed
+40 -1

No files matched your search

+1 -1
View File
@@ -432,7 +432,7 @@ fn url_request_allowed(addr: &IpAddr) -> bool {
}
async fn request_url_preview(url: &str) -> Result<UrlPreviewData> {
let client = services().globals.default_client();
let client = services().globals.url_preview_client();
let response = client.head(url).send().await?;
if !response