You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix allowedComponents check blocking components loaded as Doctrine proxies
When PageData is loaded from DB, its component associations are lazy-loaded
as Doctrine proxy instances. ComponentPositionNormalizer.normalizeForPageData()
called \$component::class on the proxy, returning the proxy class name
(Proxies\\__CG__\\...) rather than the real entity class. This caused
getIriFromResource() to produce the wrong collection IRI, so the in_array()
check against allowedComponents always failed — blocking all pageDataProperty
components for anonymous users (any request that cold-loaded PageData from DB).
Fix: detect Doctrine Proxy via instanceof and use get_parent_class() to
recover the real class name, matching the pattern used in PropagateUpdatesListener.
Adds Behat tests covering both the direct position fetch (path header) and
the manifest endpoint, with manager->clear() to force proxy loading.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -672,4 +672,4 @@ A custom Symfony profiler panel showing how the bundle handled a request — sec
672
672
673
673
When a component has a file uploaded to S3 with private ACL, accessing the file requires a pre-signed temporary URL. The bundle's uploadable system doesn't currently handle the pre-signed URL lifecycle — the URL returned may be permanent and publicly accessible (or inaccessible).
674
674
675
-
**Fix direction:** The `Flysystem temporary URL` generator (`silverback.api_components.uploadable.url_generator.temporary`) likely generates pre-signed URLs already. Tests for this path with a real (or mock) S3 adapter are missing. Also: the download endpoint (`src/Action/Uploadable/DownloadAction.php`) can gate access — apps can hook into events — but this isn't documented or tested.
675
+
**Fix direction:** The `Flysystem temporary URL` generator (`silverback.api_components.uploadable.url_generator.temporary`) likely generates pre-signed URLs already. Tests for this path with a real (or mock) S3 adapter are missing. Also: the download endpoint (`src/Action/Uploadable/DownloadAction.php`) can gate access — apps can hook into events — but this isn't documented or tested.
0 commit comments