build(php-fpm): disable chroot to avoid build path issues#220
Closed
circleci-app[bot] wants to merge 3 commits intofix/composefrom
Closed
build(php-fpm): disable chroot to avoid build path issues#220circleci-app[bot] wants to merge 3 commits intofix/composefrom
circleci-app[bot] wants to merge 3 commits intofix/composefrom
Conversation
### Summary Comments out the `chroot` setting in PHP-FPM to prevent path resolution problems encountered during build steps. ### Changes - Commented `chroot = $prefix` in `etc/php-fpm.d/www.conf` with an explanatory note. ### Why - `chroot` caused relative paths to resolve inside the jail, leading to missing/incorrect paths during image/package builds. ### Impact - PHP-FPM will no longer run in a chrooted environment; paths resolve against the standard filesystem during builds. - If production hardens via `chroot`, revisit this change or gate it by environment.
This change adds a CSRF whitelist for the `Pages.acceptCookies` action. - Update `Config/routes.php` to pass a `whitelistCallback` to `CsrfProtectionMiddleware`. - The callback returns `true` only when `controller === 'Pages'` and `action === 'acceptCookies'`. Why: - Requests to the cookie acceptance endpoint may not include a CSRF token, causing 403 errors. - Whitelisting this specific action preserves CSRF protection elsewhere while allowing the consent flow to succeed. Notes: - Scope is tightly limited to a single controller/action pair. - Verify that the route naming matches the intended endpoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prompt Given
Fix build-x86_64 (6697), with failed step Build and push x86_64
Summary
Comments out the
chrootsetting in PHP-FPM to prevent path resolution problems encountered during build steps.Changes
chroot = $prefixinetc/php-fpm.d/www.confwith an explanatory note.Why
chrootcaused relative paths to resolve inside the jail, leading to missing/incorrect paths during image/package builds.Impact
chroot, revisit this change or gate it by environment.Give feedback on this PR