Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

shy_one_time

312 sites Security covered
View on drupal.org

Introduction

When requesting a one-time login link (request new password or password forgotten function), it often comes to the fact that the link arrives invalidated/invalid via e-mail.

This can be observed especially with applications from Microsoft, e.g. Outlook or Bing, but also with Gmail (possibly other services). The reason for this is that the link is crawled in advance by security tools before it is delivered via email. Malicious bots, crawlers or spiders can cause this problem in the same way.

The result is the following message, which is certainly familiar to some:

You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.

This module prevents the crawling of the One-Time reset/login link, no separate configuration for the module is necessary. All add-on modules that access the One-Time Login logic of Drupal are supported.

Versions

Shy One Time 2.x

  • Reliably blocks crawlers and bots that are included in the CrawlerDetect library.
  • Additional user agents can be configured in the module to be blocked when a request is made via the user.reset route.
  • These bots are redirected via route user.login to the login form with status code 302. The reset/login link will not be invalidated.
  • An experience database of possible user agents that can be blocked is maintained here in the issue #3373364.

Requirements

This module requires no modules outside of Drupal core, if the installation is performed via Composer.

Installation

It's recommended to install module via Composer.

  • Install the Shy One-Time module as you would normally install a contributed Drupal module, further information.

Configuration

The module works out of the box, if no individual user agents are entered, only CrawlerDetect library checks whether the access comes from a bot/crawler.

After installing the module, the configuration interface can be reached via the
link /admin/config/system/shy_one_time. User agents that are unwanted and should be blocked are entered in the text field. Only ONE user agent may be inserted per line.

The format for custom user agents looks as follows, e.g.

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us; rv:1.9.2.3) Gecko/20100401 YFF35 Firefox/3.6.3
Mozilla/5.0 Windows NT 10.0; Win64; x64 AppleWebKit/537.36 KHTML, like Gecko Chrome/65.0.3286.0 Safari/537.36 Rigor

Note

From now on, all requests made via the route user.reset will be logged in the dblog. If a login does not work, it is possible to quickly check which user agent is involved and transfer it to the check routine.

Note

It especially affects modules that offer login by only email, e.g.:

If these modules are used, a single valid login link is sent, this can be invalidated and thus a login into the system is not possible. In a pure Drupal installation without additional modules that do not change the behavior of the login, Shy One-Time is to be used only if necessary.

Further information on the problem

This module uses 'CrawlerDetect', a PHP class for detecting bots/crawlers/spiders via the user agent and http_from header. Currently able to detect 1,000's of bots/spiders/crawlers, further information.

Sponsors

Development on Shy One Time is sponsored and testet by TRENDKRAFT.

Activity

Total releases
1
First release
Feb 2026
Latest release
2 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.4 Stable Feb 10, 2026