Repository navigation
Conversation
…ctories Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
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
The rules that hide dotfiles and dependency manifests are anchored at the web root, so
/.gitand/composer.jsonreturn 404, but the same files inside app directories were served as static files by thelocation /fallback. For apps cloned intoapps-extra, that exposed.git/(config, logs, index and loose objects),.env,composer.lockandpackage.json.This adds a location for
apps,apps-extraandapps-writablethat returns 404 for paths starting with a dot right below the app directory and forcomposer.json,composer.lock,package.jsonandpackage-lock.jsonat the app root. Assets of the app and PHP entry points are not affected, and WebDAV access to hidden user files goes throughremote.php, which this rule does not match.Validation
tests/proxy/compose-policy.batsfails onmainand passes with this change.nginx.confandnextcloud.conffrom the repo against a test docroot and a PHP-FPM container:main:apps-extra/<app>/.git/config,.env,composer.lockandapps/<app>/package.jsonreturned 200.apps-extra/<app>/js/app.js,/index.php/apps/files/and/remote.php/dav/files/<user>/.<hidden file>still reach their handlers with 200.