diff --git a/libraries/src/Environment/Browser.php b/libraries/src/Environment/Browser.php index cfc8c787b5366..db2ff22b12797 100644 --- a/libraries/src/Environment/Browser.php +++ b/libraries/src/Environment/Browser.php @@ -79,371 +79,392 @@ class Browser * @since 3.0.0 */ protected $robots = [ - 'Googlebot\/', - 'Googlebot-Mobile', - 'Googlebot-Image', - 'Googlebot-News', - 'Googlebot-Video', - 'AdsBot-Google([^-]|$)', - 'AdsBot-Google-Mobile', - 'Feedfetcher-Google', - 'Mediapartners-Google', - 'Mediapartners \(Googlebot\)', - 'APIs-Google', - 'bingbot', - 'Slurp', - '[wW]get', - 'curl', - 'LinkedInBot', - 'Python-urllib', - 'python-requests', - 'libwww', - 'httpunit', - 'nutch', - 'Go-http-client', - 'phpcrawl', - 'msnbot', - 'jyxobot', - 'FAST-WebCrawler', - 'FAST Enterprise Crawler', - 'BIGLOTRON', - 'Teoma', - 'convera', - 'seekbot', - 'Gigabot', - 'Gigablast', - 'exabot', - 'ia_archiver', - 'GingerCrawler', - 'webmon ', - 'HTTrack', - 'grub.org', - 'UsineNouvelleCrawler', - 'antibot', - 'netresearchserver', - 'speedy', - 'fluffy', - 'bibnum.bnf', - 'findlink', - 'msrbot', - 'panscient', - 'yacybot', - 'AISearchBot', - 'ips-agent', - 'tagoobot', - 'MJ12bot', - 'woriobot', - 'yanga', - 'buzzbot', - 'mlbot', - 'YandexBot', - 'yandex.com\/bots', - 'purebot', - 'Linguee Bot', - 'CyberPatrol', - 'voilabot', - 'Baiduspider', - 'citeseerxbot', - 'spbot', - 'twengabot', - 'postrank', - 'turnitinbot', - 'scribdbot', - 'page2rss', - 'sitebot', - 'linkdex', - 'Adidxbot', - 'blekkobot', - 'ezooms', - 'dotbot', - 'Mail.RU_Bot', - 'discobot', - 'heritrix', - 'findthatfile', - 'europarchive.org', - 'NerdByNature.Bot', - 'sistrix crawler', - 'Ahrefs(Bot|SiteAudit)', - 'fuelbot', - 'CrunchBot', - 'centurybot9', - 'IndeedBot', - 'mappydata', - 'woobot', - 'ZoominfoBot', - 'PrivacyAwareBot', - 'Multiviewbot', - 'SWIMGBot', - 'Grobbot', - 'eright', - 'Apercite', - 'semanticbot', - 'Aboundex', - 'domaincrawler', - 'wbsearchbot', - 'summify', - 'CCBot', - 'edisterbot', - 'seznambot', - 'ec2linkfinder', - 'gslfbot', - 'aiHitBot', - 'intelium_bot', - 'facebookexternalhit', - 'Yeti', - 'RetrevoPageAnalyzer', - 'lb-spider', - 'Sogou', - 'lssbot', - 'careerbot', - 'wotbox', - 'wocbot', - 'ichiro', - 'DuckDuckBot', - 'lssrocketcrawler', - 'drupact', - 'webcompanycrawler', - 'acoonbot', - 'openindexspider', - 'gnam gnam spider', - 'web-archive-net.com.bot', - 'backlinkcrawler', - 'coccoc', - 'integromedb', - 'content crawler spider', - 'toplistbot', - 'it2media-domain-crawler', - 'ip-web-crawler.com', - 'siteexplorer.info', - 'elisabot', - 'proximic', - 'changedetection', - 'arabot', - 'WeSEE:Search', - 'niki-bot', - 'CrystalSemanticsBot', - 'rogerbot', - '360Spider', - 'psbot', - 'InterfaxScanBot', - 'CC Metadata Scaper', - 'g00g1e.net', - 'GrapeshotCrawler', - 'urlappendbot', - 'brainobot', - 'fr-crawler', - 'binlar', - 'SimpleCrawler', - 'Twitterbot', - 'cXensebot', - 'smtbot', - 'bnf.fr_bot', - 'A6-Indexer', - 'ADmantX', - 'Facebot', - 'OrangeBot\/', - 'memorybot', - 'AdvBot', - 'MegaIndex', - 'SemanticScholarBot', - 'ltx71', - 'nerdybot', - 'xovibot', - 'BUbiNG', - 'Qwantify', - 'archive.org_bot', - 'Applebot', - 'TweetmemeBot', - 'crawler4j', - 'findxbot', - 'S[eE][mM]rushBot', - 'yoozBot', - 'lipperhey', - 'Y!J', - 'Domain Re-Animator Bot', - 'AddThis', - 'Screaming Frog SEO Spider', - 'MetaURI', - 'Scrapy', - 'Livelap[bB]ot', - 'OpenHoseBot', - 'CapsuleChecker', - 'collection@infegy.com', - 'IstellaBot', - 'DeuSu\/', - 'betaBot', - 'Cliqzbot\/', - 'MojeekBot\/', - 'netEstate NE Crawler', - 'SafeSearch microdata crawler', - 'Gluten Free Crawler\/', - 'Sonic', - 'Sysomos', - 'Trove', - 'deadlinkchecker', - 'Slack-ImgProxy', - 'Embedly', - 'RankActiveLinkBot', - 'iskanie', - 'SafeDNSBot', - 'SkypeUriPreview', - 'Veoozbot', - 'Slackbot', - 'redditbot', - 'datagnionbot', - 'Google-Adwords-Instant', - 'adbeat_bot', - 'WhatsApp', - 'contxbot', - 'pinterest', - 'electricmonk', - 'GarlikCrawler', - 'BingPreview\/', - 'vebidoobot', - 'FemtosearchBot', - 'Yahoo Link Preview', - 'MetaJobBot', - 'DomainStatsBot', - 'mindUpBot', - 'Daum\/', - 'Jugendschutzprogramm-Crawler', - 'Xenu Link Sleuth', - 'Pcore-HTTP', - 'moatbot', - 'KosmioBot', - 'pingdom', - 'PhantomJS', - 'Gowikibot', - 'PiplBot', - 'Discordbot', - 'TelegramBot', - 'Jetslide', - 'newsharecounts', - 'James BOT', - 'Barkrowler', - 'TinEye', - 'SocialRankIOBot', - 'trendictionbot', - 'Ocarinabot', - 'epicbot', - 'Primalbot', - 'DuckDuckGo-Favicons-Bot', - 'GnowitNewsbot', - 'Leikibot', - 'LinkArchiver', - 'YaK\/', - 'PaperLiBot', - 'Digg Deeper', - 'dcrawl', - 'Snacktory', - 'AndersPinkBot', - 'Fyrebot', - 'EveryoneSocialBot', - 'Mediatoolkitbot', - 'Luminator-robots', - 'ExtLinksBot', - 'SurveyBot', - 'NING\/', - 'okhttp', - 'Nuzzel', - 'omgili', - 'PocketParser', - 'YisouSpider', - 'um-LN', - 'ToutiaoSpider', - 'MuckRack', - 'Jamie\'s Spider', - 'AHC\/', - 'NetcraftSurveyAgent', - 'Laserlikebot', - 'Apache-HttpClient', - 'AppEngine-Google', - 'Jetty', - 'Upflow', - 'Thinklab', - 'Traackr.com', - 'Twurly', - 'Mastodon', - 'http_get', - 'DnyzBot', - 'botify', - '007ac9 Crawler', - 'BehloolBot', - 'BrandVerity', - 'check_http', - 'BDCbot', - 'ZumBot', - 'EZID', - 'ICC-Crawler', - 'ArchiveBot', - '^LCC ', - 'filterdb.iss.net\/crawler', - 'BLP_bbot', - 'BomboraBot', - 'Buck\/', - 'Companybook-Crawler', - 'Genieo', - 'magpie-crawler', - 'MeltwaterNews', - 'Moreover', - 'newspaper\/', - 'ScoutJet', - '(^| )sentry\/', - 'StorygizeBot', - 'UptimeRobot', - 'OutclicksBot', - 'seoscanners', - 'Hatena', - 'Google Web Preview', - 'MauiBot', - 'AlphaBot', - 'SBL-BOT', - 'IAS crawler', - 'adscanner', - 'Netvibes', - 'acapbot', - 'Baidu-YunGuanCe', - 'bitlybot', - 'blogmuraBot', - 'Bot.AraTurka.com', - 'bot-pge.chlooe.com', - 'BoxcarBot', - 'BTWebClient', - 'ContextAd Bot', - 'Digincore bot', - 'Disqus', - 'Feedly', - 'Fetch\/', - 'Fever', - 'Flamingo_SearchEngine', - 'FlipboardProxy', - 'g2reader-bot', - 'imrbot', - 'K7MLWCBot', - 'Kemvibot', - 'Landau-Media-Spider', - 'linkapediabot', - 'vkShare', - 'Siteimprove.com', - 'BLEXBot\/', - 'DareBoost', - 'ZuperlistBot\/', - 'Miniflux\/', - 'Feedspotbot\/', - 'Diffbot\/', - 'SEOkicks', - 'tracemyfile', - 'Nimbostratus-Bot', - 'zgrab', - 'PR-CY.RU', - 'AdsTxtCrawler', - 'Datafeedwatch', - 'Zabbix', - 'TangibleeBot', - 'google-xrawler', - 'axios', - 'Amazon CloudFront', - 'Pulsepoint', + '/bot', + '007ac9 crawler', + '360spider', + 'AliyunSecBot', + 'Amazonbot', + 'Barkrowler', + 'Bytespider', + 'ClaudeBot', + 'DuckDuckBot', + 'Google-Read-Aloud', + 'OAI-SearchBot', + 'PetalBot', + 'SemrushBot', + 'a6-indexer', + 'aboundex', + 'acapbot', + 'acoonbot', + 'adbeat_bot', + 'addthis', + 'adidxbot', + 'admantx', + 'adsbot', + 'adsbot-google', + 'adsbot-google-mobile', + 'adscanner', + 'adstxtcrawler', + 'advbot', + 'ahc/', + 'ahrefsbot', + 'ahrefssiteaudit', + 'aihitbot', + 'aisearchbot', + 'alphabot', + 'amazon cloudfront', + 'anderspinkbot', + 'antibot', + 'apache-httpclient', + 'apercite', + 'apis-google', + 'appengine-google', + 'applebot', + 'arabot', + 'archive.org_bot', + 'archivebot', + 'axios', + 'backlinkcrawler', + 'baidu-yunguance', + 'baiduspider', + 'barkrowler', + 'bdcbot', + 'behloolbot', + 'betabot', + 'bibnum.bnf', + 'biglotron', + 'bingbot', + 'bingpreview/', + 'binlar', + 'bitlybot', + 'blekkobot', + 'blexbot/', + 'blogmurabot', + 'blp_bbot', + 'bnf.fr_bot', + 'bomborabot', + 'bot-pge.chlooe.com', + 'bot.araturka.com', + 'botify', + 'boxcarbot', + 'brainobot', + 'brandverity', + 'btwebclient', + 'bubing', + 'buck/', + 'buzzbot', + 'bytesspider', + 'capsulechecker', + 'careerbot', + 'cc metadata scaper', + 'ccbot', + 'centurybot9', + 'changedetection', + 'check_http', + 'citeseerxbot', + 'cliqzbot/', + 'coccoc', + 'collection@infegy.com', + 'companybook-crawler', + 'content crawler spider', + 'contextad bot', + 'contxbot', + 'convera', + 'crawler4j', + 'crunchbot', + 'crystalsemanticsbot', + 'curl', + 'cxensebot', + 'cyberpatrol', + 'dareboost', + 'datafeedwatch', + 'datagnionbot', + 'daum/', + 'dcrawl', + 'deadlinkchecker', + 'deusu/', + 'diffbot/', + 'digg deeper', + 'digincore bot', + 'discobot', + 'discordbot', + 'disqus', + 'dnyzbot', + 'domain re-animator bot', + 'domaincrawler', + 'domainstatsbot', + 'dotbot', + 'drupact', + 'duckduckbot', + 'duckduckgo-favicons-bot', + 'ec2linkfinder', + 'edisterbot', + 'electricmonk', + 'elisabot', + 'embedly', + 'epicbot', + 'eright', + 'europarchive.org', + 'everyonesocialbot', + 'exabot', + 'extlinksbot', + 'ezid', + 'ezooms', + 'facebookexternalhit', + 'facebot', + 'fast enterprise crawler', + 'fast-webcrawler', + 'feedfetcher-google', + 'feedly', + 'feedspotbot/', + 'femtosearchbot', + 'fetch/', + 'fever', + 'filterdb.iss.net/crawler', + 'findlink', + 'findthatfile', + 'findxbot', + 'flamingo_searchengine', + 'flipboardproxy', + 'fluffy', + 'fr-crawler', + 'fuelbot', + 'fyrebot', + 'g00g1e.net', + 'g2reader-bot', + 'garlikcrawler', + 'genieo', + 'gigablast', + 'gigabot', + 'gingercrawler', + 'gluten free crawler/', + 'gnam gnam spider', + 'gnowitnewsbot', + 'go-http-client', + 'google web preview', + 'google-adwords-instant', + 'google-extended', + 'google-inspection', + 'google-xrawler', + 'googlebot-image', + 'googlebot-mobile', + 'googlebot-news', + 'googlebot-video', + 'googlebot/', + 'googleother', + 'gowikibot', + 'gptbot', + 'grapeshotcrawler', + 'grobbot', + 'grub.org', + 'gslfbot', + 'hatena', + 'heritrix', + 'http_get', + 'httpunit', + 'httrack', + 'ia_archiver', + 'ias crawler', + 'icc-crawler', + 'ichiro', + 'imrbot', + 'indeedbot', + 'integromedb', + 'intelium_bot', + 'interfaxscanbot', + 'ip-web-crawler.com', + 'ips-agent', + 'iskanie', + 'istellabot', + 'it2media-domain-crawler', + 'james bot', + 'jamie\'s spider', + 'jetslide', + 'jetty', + 'jugendschutzprogramm-crawler', + 'jyxobot', + 'k7mlwcbot', + 'kemvibot', + 'kosmiobot', + 'landau-media-spider', + 'laserlikebot', + 'lb-spider', + 'leikibot', + 'libwww', + 'linguee bot', + 'linkapediabot', + 'linkarchiver', + 'linkdex', + 'linkedinbot', + 'lipperhey', + 'livelapbot', + 'lssbot', + 'lssrocketcrawler', + 'ltx71', + 'luminator-robots', + 'magpie-crawler', + 'mail.ru_bot', + 'mappydata', + 'mastodon', + 'mauibot', + 'mediapartners (googlebot)', + 'mediapartners-google', + 'mediatoolkitbot', + 'megaindex', + 'meltwaternews', + 'memorybot', + 'meta-externalagent', + 'metajobbot', + 'metauri', + 'mindupbot', + 'miniflux/', + 'mj12bot', + 'mlbot', + 'moatbot', + 'mojeekbot/', + 'moreover', + 'msnbot', + 'msrbot', + 'muckrack', + 'multiviewbot', + 'nerdbynature.bot', + 'nerdybot', + 'netcraftsurveyagent', + 'netestate ne crawler', + 'netresearchserver', + 'netvibes', + 'newsharecounts', + 'newspaper/', + 'niki-bot', + 'nimbostratus-bot', + 'ning/', + 'nutch', + 'nuzzel', + 'ocarinabot', + 'okhttp', + 'omgili', + 'openai.com/bot', + 'openhosebot', + 'openindexspider', + 'orangebot/', + 'outclicksbot', + 'page2rss', + 'panscient', + 'paperlibot', + 'pcore-http', + 'perplexitybot', + 'petalbot', + 'phantomjs', + 'phpcrawl', + 'pingdom', + 'pinterest', + 'piplbot', + 'pocketparser', + 'postrank', + 'pr-cy.ru', + 'primalbot', + 'privacyawarebot', + 'proximic', + 'psbot', + 'pulsepoint', + 'purebot', + 'python-requests', + 'python-urllib', + 'qwantify', + 'rankactivelinkbot', + 'redditbot', + 'retrevopageanalyzer', + 'rogerbot', + 'safednsbot', + 'safesearch microdata crawler', + 'sbl-bot', + 'scoutjet', + 'scrapy', + 'screaming frog seo spider', + 'scribdbot', + 'searchbot', + 'seekbot', + 'semanticbot', + 'semanticscholarbot', + 'semrushbot', + 'sentry/', + 'seokicks', + 'seoscanners', + 'seznambot', + 'simplecrawler', + 'sistrix crawler', + 'sitebot', + 'siteexplorer.info', + 'siteimprove.com', + 'skypeuripreview', + 'slack-imgproxy', + 'slackbot', + 'slurp', + 'smtbot', + 'snacktory', + 'socialrankiobot', + 'sogou', + 'sonic', + 'spbot', + 'speedy', + 'storygizebot', + 'summify', + 'surveybot', + 'swimgbot', + 'sysomos', + 'tagoobot', + 'tangibleebot', + 'telegrambot', + 'teoma', + 'thinklab', + 'tineye', + 'toplistbot', + 'toutiaospider', + 'traackr.com', + 'tracemyfile', + 'trendictionbot', + 'trove', + 'turnitinbot', + 'tweetmemebot', + 'twengabot', + 'twitterbot', + 'twurly', + 'um-ln', + 'upflow', + 'uptimerobot', + 'urlappendbot', + 'usinenouvellecrawler', + 'vebidoobot', + 'veoozbot', + 'vkshare', + 'voilabot', + 'wbsearchbot', + 'web-archive-net.com.bot', + 'webcompanycrawler', + 'webmon ', + 'wesee:search', + 'wget', + 'whatsapp', + 'wocbot', + 'woobot', + 'woriobot', + 'wotbox', + 'xenu link sleuth', + 'xovibot', + 'yacybot', + 'yahoo link preview', + 'yak/', + 'yandex.com/bots', + 'yandexbot', + 'yanga', + 'yeti', + 'yisouspider', + 'yoozbot', + 'zabbix', + 'zgrab', + 'zoominfobot', + 'zumbot', + 'zuperlistbot/', ]; /** @@ -907,7 +928,7 @@ public function isBrowser($browser) public function isRobot() { foreach ($this->robots as $robot) { - if (preg_match('/' . $robot . '/', $this->agent)) { + if (str_contains($this->lowerAgent, $robot)) { return true; } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 64a406ebf4b41..3876faed8da64 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -9154,6 +9154,16 @@ parameters: count: 1 path: libraries/src/Encrypt/Aes.php + - + message: ''' + #^Call to method getDispatcher\(\) of deprecated interface Joomla\\CMS\\Application\\EventAwareInterface\: + 4\.3 will be removed in 7\.0 + This interface will be removed without replacement as the Joomla 3\.x compatibility layer will be removed$# + ''' + identifier: method.deprecatedInterface + count: 1 + path: libraries/src/Environment/Browser.php + - message: '#^Unsafe usage of new static\(\)\.$#' identifier: new.static