[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
|
@ -117,6 +117,10 @@ public class UserResolver(
|
||||||
{
|
{
|
||||||
query = NormalizeQuery(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
|
// First, let's see if we already know the user
|
||||||
var user = await userSvc.GetUserFromQueryAsync(query);
|
var user = await userSvc.GetUserFromQueryAsync(query);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue