Skip to content

Conversation

@michalsn
Copy link
Member

Description
This PR updates the magic link controller to ignore requests originating from bots or crawlers.

See #1293 for more details.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the enhancement New feature or request label Oct 31, 2025
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalsn, thank you. I know the main focus of the discussion has been on the magic link, but I remember someone mentioning a similar issue regarding the activation link as well.
I’d like to know what your plan is regarding that issue?

Copy link
Member

@lonnieezell lonnieezell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@datamweb
Copy link
Collaborator

datamweb commented Oct 31, 2025

Since the list of bots was recently updated in CodeIgniter version 4.7, but Shield remains compatible with earlier versions, I think it would be helpful to mention in Shield’s documentation that the bot list can be updated through the app/Config/UserAgents.php file.

@michalsn
Copy link
Member Author

michalsn commented Nov 1, 2025

@datamweb I have added the docs.

We can add the same functionality to all actions in a separate PR. I think the right place for that would be https://github.com/codeigniter4/shield/blob/develop/src/Controllers/ActionController.php#L83, right?

@datamweb
Copy link
Collaborator

datamweb commented Nov 1, 2025

Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks.

@michalsn michalsn merged commit 93091f3 into codeigniter4:develop Nov 3, 2025
36 checks passed
@michalsn
Copy link
Member Author

michalsn commented Nov 3, 2025

Thank you for your review!

@michalsn michalsn deleted the feat/ignore-robots branch November 3, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants