Install

Works with Drupal: ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 45.48 KB
MD5: 22c07a63582fa7f143a148f76f975320
SHA-1: 6b1dc477669531988c33b1ae3c5e89d6280b40be
SHA-256: a2931a738ef51e05735ff8fca71db3e9c56cad4b4887ec1ec8253b6351319d52
Download zip 64.92 KB
MD5: 712633f4441614030d36bce25c302f51
SHA-1: 2780be7e9f9262d302679aac0e69777d3be98047
SHA-256: 03fe6699d097135f5bbef20c6627627f90cbd31a7fce1fc938aa5403e5171728

Release notes

When oci_osfs overrides private:// and a user tries to download a file
attached to a webform submission, access is denied even if the user has
the 'view any webform submission' permission.

Root cause:
oci_osfs_file_download() returns -1 when the user lacks 'access private
files'. Because Drupal's FileDownloadController treats any single -1 from
any module as a final deny, webform's own hook_file_download() (which
checks submission-level permissions) never gets to run.

Note: 'access private files' is not registered in any permissions.yml,
So it can never be granted through the UI, making private file access
impossible for all non-UID-1 users when override_private is enabled.

Fix:
Before the 'access private files' check, look up the file's usage record.
If the file belongs to a webform submission, return NULL to defer control
to webform's hook_file_download(), which applies proper submission-level
access control.

Steps to reproduce:

  1. Enable oci_osfs with override_private = TRUE
  2. Install webform module
  3. Create a webform with a file upload field
  4. Submit the form with a file
  5. Grant a role 'view any webform submission' (but NOT 'access private files')
  6. Log in as that role and try to download the file → Access denied (403)

Expected: Access granted via webform's submission-level check.
Actual: Access denied because oci_osfs returns -1 first.

Created by: 3eidoz
Created on: 2 Mar 2026 at 08:37 UTC
Last updated: 2 Mar 2026 at 08:38 UTC
Bug fixes
Unsupported

Other releases