Skip to main content
Drupal is a registered trademark of Dries Buytaert
Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: DKAN Dataset Archiver 0.333.8 Minor update available for module dkan_dataset_archiver (0.333.8). Release: DKAN Dataset Archiver 1.0.10 Minor update available for module dkan_dataset_archiver (1.0.10). Release: DKAN Dataset Archiver 1.1.8 Minor update available for module dkan_dataset_archiver (1.1.8). Release: Icecast Streaming Server 2.0.0 Major update available for module icecast (2.0.0). Release: Scheduler Content Moderation Defaults 1.1.3 Minor update available for module scheduler_content_moderation_defaults (1.1.3). Release: FlowDrop 2.5.0 Minor update available for module flowdrop (2.5.0). Release: Ejector Seat 3.0.0 Major update available for module ejectorseat (3.0.0). Release: Ejector Seat 2.0.1 Minor update available for module ejectorseat (2.0.1). Module Revived: Commerce Shipping Order Percentage 1.2.0 Module commerce_shipping_order_percentage updated after 11 months of inactivity...

Cryptic URL

No security coverage
View on drupal.org

This module makes file URLs unguessable by adding a secure, random token to filenames. This allows files to be stored in the public file system while still protecting access, potentially improving performance and preventing certain types of attacks.

This module appends a cryptographically secure token to filenames when files are uploaded. This makes file and image URLs "unguessable".

Features

The most common solution for protecting files so that they are accessible only by certain users is to store them in a private file system. Drupal then performs the necessary access checks before serving files to users. However, this comes with a performance cost, and it can cause caching issues.

This module appends a cryptographically secure token to all filenames so that their URLs become unguessable. Therefore, files can be stored in the public filesystem and only users that already have been given its URL can access a file or image.

Moreover, in some cases of sites that expose large files publicly this technique can help with preventing DDoS attacks.

Note that whether this technique is appropriate or secure enough for your Drupal application depends on your context and the specifics of your use case. Please evaluate them carefully before adopting it.

Future development

More related features could be added to this module, such as support for:

  • Configuring on which file systems and fields to append the token
  • Applying the same technique to other URLs e.g. content items or products
  • Configuring an expiration time
  • Configuring the size of the token i.e. security level
  • Support different token generation algorithms

I currently do not have the use cases for these features so it is unlikely that they will be developed soon. Merge requests or sponsorship are welcome.

Post-Installation

Currently, the module applies the feature to all files across the system. There is nothing to configure.

Requirements

Drupal 9.0+
PHP 8.0+

Supporting this Module

Create issues in the Drupal.org queue, submit MRs. If you are interested in sponsoring this module to add more features, contact the module maintainers.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.x-dev Dev 9–11 Jul 16, 2026