[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")
?? false)
&& a.GetAttribute("href") == profileUrl
|| user.Uri != null
&& a.GetAttribute("href") == user.Uri);
|| a.GetAttribute("href") == user.GetUriOrPublicUri(instance.Value));
}
bgDbContext.Update(bgUser.UserProfile);