|
|
|
@ -4,7 +4,7 @@ namespace App\Util\Lexer;
|
|
|
|
|
|
|
|
|
|
class RestrictedNames
|
|
|
|
|
{
|
|
|
|
|
public static $blacklist = [
|
|
|
|
|
public static $additional = [
|
|
|
|
|
'autoconfig',
|
|
|
|
|
'blog',
|
|
|
|
|
'broadcasthost',
|
|
|
|
@ -294,16 +294,18 @@ class RestrictedNames
|
|
|
|
|
|
|
|
|
|
public static function get()
|
|
|
|
|
{
|
|
|
|
|
$reserved = $blacklist = [];
|
|
|
|
|
$banned = [];
|
|
|
|
|
|
|
|
|
|
if (true == config('pixelfed.restricted_names.use_blacklist')) {
|
|
|
|
|
$blacklist = self::$blacklist;
|
|
|
|
|
if(config('instance.username.banned')) {
|
|
|
|
|
$banned = array_map('trim', explode(',', config('instance.username.banned')));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (true == config('pixelfed.restricted_names.reserved_routes')) {
|
|
|
|
|
$additional = self::$additional;
|
|
|
|
|
$reserved = self::$reserved;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return array_merge($blacklist, $reserved);
|
|
|
|
|
$res = array_merge($additional, $reserved, $banned);
|
|
|
|
|
sort($res);
|
|
|
|
|
|
|
|
|
|
return $res;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|