Skip to content

[ticket/17735] Skip AI crawler bots whose agent string already exists - #7078

Open
ECYaz wants to merge 3 commits into
phpbb:3.3.xfrom
ECYaz:ticket/17735
Open

ECYaz wants to merge 3 commits into
phpbb:3.3.xfrom
ECYaz:ticket/17735

Conversation

@ECYaz

@ECYaz ECYaz commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17735

The ai_crawler_bots migration only checked whether a bot with the same
name already existed. A board whose administrator had configured one of
the seeded agent strings under a different name therefore received a
second bot for the same agent, one in the bots group and one in the AI
crawlers group. Bots are matched case insensitively against the agent
string in phpbb\session, so both entries match the same requests.

Skip seeding a bot whose agent string is already configured, and add a
migration that removes the duplicates the 3.3.18 migration has already
created, keeping the older bot in each case.

PHPBB-17735
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Success ✅

This PR is ready to be merged.

Compare the agent strings of the bots already configured on the board
with the same case insensitive wildcard match phpbb\session applies to
the user agent, instead of an exact match after lowercasing. An AI
crawler is skipped by the migration, or removed by the cleanup, when an
older bot's agent string already matches it.

PHPBB-17735
A bot restricted to an IP address only matches visitors from that
address, so it does not stand in for a crawler matched by agent string
alone: the migration no longer treats its agent as already configured.
The cleanup migration is more conservative as well: it only removes an
AI crawler whose agent string exactly matches, case insensitively, that
of an older bot, and only when neither bot is restricted to an IP.

PHPBB-17735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants