Описание HostURLFilter.configure считывает параметр ignoreOutsideDomain, но проверяет узел, принадлежащий ignoreOutsideHost, при принятии решения о настройке режима домена. Конфигурация фильтра, которая называет только ignoreOutsideDomain, которая в документации класса представлена как независимый режим, поэтому отбрасывается: флаг вынужден false, filter короткое замыкание на его страже и каждые URL возвращается без изменений. Фильтр ничего не применяет, когда кажется, что он настроен, и сбой молчит.
Конфигурация зеркального изображения, называющая только ignoreOutsideHost, терпит неудачу с NullPointerException во время запуска топологии. Эффект заключается в потере элемента управления областью видимости, настроенного оператором, поэтому внешние ссылки сканируемой страницы следуют на хосты, которые оператор намерен исключить. Воздействие за пределами области сканирования зависит от того, что сканер затем выбирает, и не заявлено здесь.
Проекты, сгенерированные из архетипов StormCrawler Maven, не затрагиваются, поскольку все три поставляемые конфигурации фильтров устанавливают оба параметра. Смягчение Upgrade до 4.0.0, где каждый параметр тестируется независимо. Операторы, чья конфигурация устанавливает только ignoreOutsideDomain, найдут сканирование ограниченным исходным доменом, как настроено, что может уменьшить количество принятых исходных ссылок.
Пользователи, которые не могут обновиться сразу, должны установить как ignoreOutsideHost, так и ignoreOutsideDomain явно в конфигурации HostURLFilter, которая создает предполагаемое поведение на затронутых версиях. Кредит Independently сообщил Apache StormCrawler PMC n0mi1k, с доказательством концепции. Также найдено ASF - с использованием агентов Claude для изучения безопасности проектов с открытым исходным кодом, подтвержденных и сообщенных Apache StormCrawler.
Показать оригинальное описание (EN)
Description `HostURLFilter.configure` reads the `ignoreOutsideDomain` parameter but tests the node belonging to `ignoreOutsideHost` when deciding whether the domain mode was configured. A filter configuration that names only `ignoreOutsideDomain`, which the class documentation presents as an independent mode, is therefore discarded: the flag is forced to false, `filter` short-circuits on its guard and every URL is returned unchanged. The filter enforces nothing while appearing to be configured, and the failure is silent. The mirror-image configuration, naming only `ignoreOutsideHost`, fails with a `NullPointerException` while the topology is starting. The effect is the loss of a scope control the operator configured, so a crawled page's outlinks are followed to hosts the operator intended to exclude. Impact beyond crawl scope depends on what the crawler then fetches and is not claimed here. Projects generated from the StormCrawler Maven archetypes are not affected, because all three shipped filter configurations set both parameters. Mitigation Upgrade to 4.0.0, where each parameter is tested independently. Operators whose configuration sets only `ignoreOutsideDomain` will find the crawl restricted to the source domain, as configured, which may reduce the number of outlinks accepted. Users who cannot upgrade immediately should set both `ignoreOutsideHost` and `ignoreOutsideDomain` explicitly in the `HostURLFilter` configuration, which produces the intended behaviour on affected versions. Credit Independently reported to the Apache StormCrawler PMC by n0mi1k, with a proof of concept. Also found by the ASF -- using Claude agents to study the security of open-source projects, validated and reported by Apache StormCrawler.