Closed (fixed)
Project:
FileGate
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2026 at 05:41 UTC
Updated:
3 Oct 2026 at 14:10 UTC
Jump to comment: Most recent
A field storage marked as gated on a public file scheme is this module's worst state: the configuration says the files are protected and the web server hands them to anyone with the URL.
Two checks exist. The field storage form forces the private scheme, and GatedFieldSchemeValidator rejects the combination at config import. Neither runs when a field storage is saved any other way: a config API write, a Drush config:set, a recipe, an update hook, or a governed configuration tool over MCP. Those writes succeed, and the only trace is a status report error afterwards.
file_gate third-party setting gated to TRUE on its storage with drush config:set or the config API, and save.Found by reading 1.x. Not yet reproduced on a site.
field_storage_config that throws when gated is TRUE and the storage has a uri_scheme other than private. It covers every write path, including the form and the import.uri_scheme unaffected, switching an already gated storage from private to public refused.A save that used to succeed and leave files public now throws.
Comments
Comment #2
jmcerdaCommitted to 1.x; ships in 1.10.0. One rule class now backs every guard. A presave hook on the field storage entity throws before any write. A config save subscriber covers raw config writes such as
drush config:setand governed config tools: core has no event before a raw write, so it restores the previous value and then throws. The import validator and the status report use the same rule, and a schema constraint lets validating callers see the violation with a property path. Only a save that creates or changes the combination is refused. Refusing every re-save of a storage that is already in this state would break core updates, uninstall and the field form on affected sites, so that case stays a status report error. Refusals are written to the audit log. The work also caught a regression in its own first draft, where a public field that already holds files could have been gated through the form; that is covered by a test.