[backend/core] Fix profile field verification handling for non-html links

This commit is contained in:
Laura Hausmann 2025-02-13 12:38:08 +01:00
parent 5ef8e3581c
commit dd8f6b063e
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1187,7 +1187,7 @@ public class UserService(
|| !Uri.TryCreate(userProfileField.Value, UriKind.Absolute, out var uri))
continue;
var res = await httpClient.GetAsync(uri);
var res = await httpClient.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead);
if (!res.IsSuccessStatusCode
|| res.Content.Headers.ContentType?.MediaType != "text/html"