[backend/services] Check for profile URL and user URI when verifying links
This commit is contained in:
parent
fc07f55fe3
commit
aa3262caea
1 changed files with 5 additions and 3 deletions
|
@ -1201,9 +1201,11 @@ public class UserService(
|
|||
var document = await new HtmlParser().ParseDocumentAsync(html);
|
||||
|
||||
userProfileField.IsVerified =
|
||||
document.Links.Any(a => a.GetAttribute("href") == profileUrl
|
||||
&& (a.GetAttribute("rel")?.Contains("me")
|
||||
?? false));
|
||||
document.Links.Any(a => (a.GetAttribute("rel")?.Contains("me")
|
||||
?? false)
|
||||
&& a.GetAttribute("href") == profileUrl
|
||||
|| user.Uri != null
|
||||
&& a.GetAttribute("href") == user.Uri);
|
||||
}
|
||||
|
||||
bgDbContext.Update(bgUser.UserProfile);
|
||||
|
|
Loading…
Add table
Reference in a new issue