Repository navigation
Conversation
This branch has not been deployed
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.
Summary
.htaccess.laravel.log.1), backups, nested files, directory requests and nonexistent routes, rather than only filenames ending in.log..htaccess, public/PHP/storage controls and a negative control that rejects image-side protection masking a broken application rule.Context and scope
Refs LinkStackOrg/linkstack-docker#168.
Related architectural discussion: #935.
The existing
.logfile restrictions already protectlaravel.logwhen Apache honors.htaccess. On an Apache/PHP baseline built from the Docker repository, the previous project.htaccessnevertheless served an existinglaravel.log.1and a nested text fixture with HTTP 200 over both HTTP and HTTPS. This change hardens those directory boundaries; it does not claim the unrotated log is universally exposed in current installations.Companion Docker PR: LinkStackOrg/linkstack-docker#169.
The complementary Docker change places log protection outside the persistent application volume. This application change is useful for Apache installations that use the project
.htaccesswithout that image-side protection.This is not the public-only webroot migration proposed in #935. Nginx/Caddy/IIS require their own server configuration. The exact cause and image/version of the original reporter's deployment are still unverified.
Validation
LinkStackOrg/linkstack-dockerrevision50b92be8711b5ed03ea9a675d9cde3409b0c80a8, without the proposed Docker hardening.python3 tests/runtime_logs.py linkstack-log-regression:before— 52 checks; 0 failures.logs-public) controls; unprivileged runtime-log append.git diff --checkpassed.All log content is synthetic. Test containers have no external network and no published ports. The test does not exercise a complete Laravel installation, the automatic updater, a subdirectory deployment, or arbitrary custom Apache authorization rules.
Deployment
Existing installations must install the updated root
.htaccess, including when application files live in a persistent volume. Back up local customizations first. The new rule requires the same Apache rewrite/override support as the application's existing routing rules. No application data or log files are deleted.