123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <?php
- namespace App\Util\Lexer;
- class RestrictedNames
- {
- public static $additional = [
- 'autoconfig',
- 'blog',
- 'broadcasthost',
- 'copyright',
- 'download',
- 'domainadmin',
- 'domainadministrator',
- 'errors',
- 'events',
- 'example',
- 'faq',
- 'faqs',
- 'features',
- 'ftp',
- 'guest',
- 'guests',
- 'hostmaster',
- 'hostmaster',
- 'imap',
- 'info',
- 'information',
- 'is',
- 'isatap',
- 'it',
- 'localdomain',
- 'localhost',
- 'mail',
- 'mailer-daemon',
- 'mailerdaemon',
- 'marketing',
- 'me',
- 'mis',
- 'mx',
- 'no-reply',
- 'nobody',
- 'noc',
- 'noreply',
- 'ns0',
- 'ns1',
- 'ns2',
- 'ns3',
- 'ns4',
- 'ns5',
- 'ns6',
- 'ns7',
- 'ns8',
- 'ns9',
- 'owner',
- 'pop',
- 'pop3',
- 'postmaster',
- 'pricing',
- 'root',
- 'sales',
- 'security',
- 'signin',
- 'signout',
- 'smtp',
- 'src',
- 'ssladmin',
- 'ssladministrator',
- 'sslwebmaster',
- 'sys',
- 'sysadmin',
- 'system',
- 'tutorial',
- 'tutorials',
- 'usenet',
- 'uucp',
- 'webmaster',
- 'wpad',
- ];
- public static $reserved = [
- // Reserved for instance admin
- 'admin',
- 'administrator',
- // Static Assets
- 'assets',
- 'public',
- 'storage',
- 'htaccess',
- '.htaccess',
- 'favicon.ico',
- 'embed.js',
- 'index.php',
- 'manifest.json',
- 'mix-manifest.json',
- 'robots.txt',
- // Laravel Horizon
- 'horizon',
- // Reserved routes
- 'a',
- 'app',
- 'about',
- 'aboutus',
- 'about-us',
- 'abuse',
- 'actor',
- 'actors',
- 'account',
- 'admins',
- 'api',
- 'audio',
- 'auth',
- 'avatar',
- 'avatars',
- 'b',
- 'bartender',
- 'broadcast',
- 'broadcaster',
- 'booth',
- 'bouncer',
- 'c',
- 'cdn',
- 'circle',
- 'circles',
- 'checkpoint',
- 'collection',
- 'collections',
- 'community',
- 'communities',
- 'contact',
- 'contact-us',
- 'contact_us',
- 'costar',
- 'costars',
- 'css',
- 'd',
- 'dashboard',
- 'dmca',
- 'db',
- 'deck',
- 'dev',
- 'developer',
- 'developers',
- 'discover',
- 'discovers',
- 'dj',
- 'doc',
- 'docs',
- 'docs',
- 'drive',
- 'drives',
- 'driver',
- 'e',
- 'embed',
- 'email',
- 'emails',
- 'emoji',
- 'emojis',
- 'error',
- 'explore',
- 'export',
- 'exports',
- 'f',
- 'feed',
- 'font',
- 'fonts',
- 'follow',
- 'follows',
- 'followme',
- 'follow-me',
- 'follow_me',
- 'g',
- 'gdpr',
- 'graph',
- 'ghost',
- 'ghosts',
- 'group',
- 'groups',
- 'h',
- 'header',
- 'headers',
- 'home',
- 'help',
- 'helpcenter',
- 'help-center',
- 'help_center',
- 'help_center_',
- 'help-center-',
- 'help-center_',
- 'help_center-',
- 'i',
- 'instance',
- 'inbox',
- 'img',
- 'imgs',
- 'image',
- 'images',
- 'invite',
- 'invites',
- 'import',
- 'imports',
- 'j',
- 'js',
- 'k',
- 'key',
- 'l',
- 'lang',
- 'language',
- '_lang',
- '_language',
- 'lab',
- 'labs',
- 'legal',
- 'live',
- 'loop',
- 'loops',
- 'location',
- 'locations',
- 'login',
- 'logout',
- 'm',
- 'media',
- 'menu',
- 'music',
- 'my2020',
- 'my2021',
- 'my2022',
- 'my2023',
- 'my2024',
- 'my2025',
- 'my2026',
- 'my2027',
- 'my2028',
- 'my2029',
- 'my2030',
- 'n',
- 'news',
- 'new',
- 'news',
- 'news',
- 'newsfeed',
- 'newsroom',
- 'newsrooms',
- 'news-room',
- 'news-rooms',
- 'o',
- 'oauth',
- 'official',
- 'p',
- 'page',
- 'pages',
- 'pin',
- 'pins',
- 'photo',
- 'photos',
- 'password',
- 'privacy',
- 'private',
- 'q',
- 'quote',
- 'query',
- 'r',
- 'redirect',
- 'redirects',
- 'register',
- 'registers',
- 'review',
- 'reset',
- 'report',
- 'results',
- 'reports',
- 'robot',
- 'robots',
- 's',
- 'sc',
- 'search',
- 'sell',
- 'send',
- 'settings',
- 'short',
- 'shortcode',
- 'status',
- 'statuses',
- 'site',
- 'sites',
- 'stage',
- 'static',
- 'story',
- 'stories',
- 'support',
- 'svg',
- 'svgs',
- 't',
- 'terms',
- 'telescope',
- 'timeline',
- 'timelines',
- 'tour',
- 'tv',
- 'u',
- 'user',
- 'users',
- 'username',
- 'usernames',
- 'v',
- 'valet',
- 'video',
- 'videos',
- 'vendor',
- 'w',
- 'waiter',
- 'wall',
- 'whats-new',
- 'whatsnew',
- 'whatnew',
- 'whats-news',
- 'web',
- 'ws',
- 'wss',
- 'www',
- 'x',
- 'y',
- 'z',
- '400',
- '401',
- '403',
- '404',
- '500',
- '503',
- '504',
- ];
- public static function get()
- {
- $banned = [];
- if(config('instance.username.banned')) {
- $banned = array_map('trim', explode(',', config('instance.username.banned')));
- }
- $additional = self::$additional;
- $reserved = self::$reserved;
- $res = array_merge($additional, $reserved, $banned);
- $res = array_unique($res);
- sort($res);
-
- return $res;
- }
- }
|