also react to other domain name in case of split domain setups

This commit is contained in:
Sascha Nitsch 2025-07-20 17:34:18 +02:00
parent 6df40c1946
commit 9464b28e11

View file

@ -49,7 +49,7 @@ class WebFinger
$config = $this->main->getConfig();
$domain = $config['generic']['externaldomain'];
$sourcedomain = $config['generic']['sourcedomain'];
if (preg_match("/^acct:([^@]+)@(.*)$/", $_resource, $matches) != 1 || $matches[2] !== $sourcedomain) {
if (preg_match("/^acct:([^@]+)@(.*)$/", $_resource, $matches) != 1 || ($matches[2] !== $sourcedomain && $matches[2] !== $domain)) {
throw new \Federator\Exceptions\InvalidArgument();
}
$user = \Federator\DIO\User::getUserByName(