codeigniter4 / codeigniter4/shield

Dev: Add bot detection for magic links

Abierto
#1,293 5 comentarios 0 reacciones 1 asignado Reclamado por @datamweb Ver en GitHub
dev
Lenguaje dominante
PHP
Estrellas
426
Forks
143
Merge medio
9 h 19 min
PR fusionados (30 d)
6

Descripción

In one of my projects we ran into issues with Android mobile devices and SMS where the OS was trying to be too helpful and would visit the links to ensure they were safe, or prep for read aloud, etc, and it would invalidate the magic link since it had already been visited.

While this was specifically for SMS, I can see email clients attempting to be helpful breaking the magic link system, also. Additionally, there is potential use by developers using that link for SMS messages.

There are 2 solutions and we might want to consider both long-term.

1) Analyze the user-agents and/or IP address of known bots that might interfere and block their attempt at that URL.
2) A better long-term alternative is to make it something that requires user input, like sending 4-6 numbers in the email and require user input so we don't have to play cat and mouse with bots.

Here's the list of user agent strings that we've used and is working so far:

- Googlebot
- Bingbot
- Slurp
- DuckDuckBot
- Baiduspider
- Sogou
- Exabot
- ia_archiver
- Google-PageRenderer
- Google-Read-Aloud
- Google-Safety
- bot
- crawler
- spider
- Yandex
- BingPreview

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.