[backend/core] Don't run webfinger for local note urls (ISH-159)
This commit is contained in:
parent
b7ddbdcbaa
commit
794abcd727
1 changed files with 4 additions and 0 deletions
|
@ -116,6 +116,10 @@ public class UserResolver(
|
|||
public async Task<User> ResolveAsync(string query)
|
||||
{
|
||||
query = NormalizeQuery(query);
|
||||
|
||||
// Before we begin, let's skip local note urls
|
||||
if (query.StartsWith($"https://{config.Value.WebDomain}/notes/"))
|
||||
throw GracefulException.BadRequest("Refusing to resolve local note URL as user");
|
||||
|
||||
// First, let's see if we already know the user
|
||||
var user = await userSvc.GetUserFromQueryAsync(query);
|
||||
|
|
Loading…
Add table
Reference in a new issue