Skip to content

Commit df36b23

Browse files
authored
Merge pull request #681 from poppastring/webfinger-validation-fix
Fixed for WebFinger account validation
2 parents 3331d8d + 21d9f5f commit df36b23

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

source/DasBlog.Web.Repositories/ActivityPubManager.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,12 @@ public WebFinger WebFinger(string resource)
9797
{
9898
mastodonAccount = mastodonAccount.Remove(0, 1);
9999
}
100-
101-
var address = new MailAddress(resource);
102-
if (string.Compare(address.User, mastodonAccount, StringComparison.InvariantCultureIgnoreCase) != 0)
103-
{
104-
return null;
105-
}
106100

107101
if (!mastodonUrl.Contains("://"))
108102
{
109103
mastodonUrl = "https://" + mastodonUrl;
110104
}
111105

112-
var host = new Uri(mastodonUrl);
113-
if (string.Compare(address.Host, host.Host, StringComparison.InvariantCultureIgnoreCase) != 0)
114-
{
115-
return null;
116-
}
117-
118106
var mastotonSiteUri = new Uri(mastodonUrl);
119107
string usersUrl = new Uri(mastotonSiteUri, $"users/{mastodonAccount}").AbsoluteUri;
120108
string accountUrl = new Uri(mastotonSiteUri, $"@{mastodonAccount}").AbsoluteUri;

0 commit comments

Comments
 (0)