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

Use SymLinksIfOwnerMatch by default. #1570

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

ostark
Copy link
Contributor

@ostark ostark commented Nov 27, 2023

Q A
License MIT

Options +SymLinksIfOwnerMatch is more secure than Options +FollowSymlinks.

With the FollowSymlinks option enabled, you could easily mistakenly create a symlink to a file outside the web root folder and Apache would follow it. The owner of files for the web application usually differs from other system files. This additional owner check reduces the risk of exposing files.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) November 27, 2023 11:26
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1570/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1570/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/apache-pack:^1.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

@frank-laemmer
Copy link

May I add some context:

We (fortrabbit) offer a standardized shared hosting solution with Apache. Our Symfony install guide suggests to install the apache-pack. That is not working any more, because of the open rule to follow any symlink.

We are aware that this may have an performance impact. Yet the increased security level might be worth it.

@symfony-recipes-bot symfony-recipes-bot merged commit 209c667 into symfony:main Jan 1, 2024
2 checks passed
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.

4 participants