[backend/services] Also check user URI for local users when verifying links

This commit is contained in:
pancakes 2025-01-22 22:13:36 +10:00 committed by Laura Hausmann
parent aa3262caea
commit 9d0cb44743
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1204,8 +1204,7 @@ public class UserService(
document.Links.Any(a => (a.GetAttribute("rel")?.Contains("me") document.Links.Any(a => (a.GetAttribute("rel")?.Contains("me")
?? false) ?? false)
&& a.GetAttribute("href") == profileUrl && a.GetAttribute("href") == profileUrl
|| user.Uri != null || a.GetAttribute("href") == user.GetUriOrPublicUri(instance.Value));
&& a.GetAttribute("href") == user.Uri);
} }
bgDbContext.Update(bgUser.UserProfile); bgDbContext.Update(bgUser.UserProfile);