Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the scope of webserver protected folders #23101

Open
wants to merge 3 commits into
base: 5.x-dev
Choose a base branch
from

Conversation

michalkleiner
Copy link
Contributor

Description:

As per the title, ref. DEV-18936

Review

@@ -195,7 +201,7 @@ protected static function createWebConfigFiles()
<requestFiltering>
<denyUrlSequences>
<add sequence=".php" />
</denyUrlSequences>' . ($directoryToProtect === '/plugins' ? $additionForPlugins : '') . '
</denyUrlSequences>' . (!is_numeric($directoryToProtect) ? $additions : '') . '
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key->value items in the array have string keys, without the pair the key is numeric, so we can use this to check if we have some additions or not.

@@ -68,7 +68,7 @@ public static function createHtAccessFiles()
'/libs' => $denyAll . $allowStaticAssets,
'/vendor' => $denyAll . $allowStaticAssets,
'/plugins' => $denyAll . $allowStaticAssets . $allowManifestFile,
'/misc/user' => $denyAll . $allowStaticAssets,
'/misc' => $denyAll . $allowStaticAssets,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is explicit .htaccess in misc/cron allowing access to the archive.php script, so this should be ok as an extended scope.

@michalkleiner michalkleiner requested a review from a team March 6, 2025 23:26
@michalkleiner michalkleiner added this to the 5.4.0 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant