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

NGINX rules deviate from upstream defaults #93

Open
janmashat opened this issue May 28, 2024 · 2 comments
Open

NGINX rules deviate from upstream defaults #93

janmashat opened this issue May 28, 2024 · 2 comments

Comments

@janmashat
Copy link

janmashat commented May 28, 2024

The comment where this change propagates states:

# Replica of regex from Drupals core .htaccess.

However I wasn't able to find a reference to these new file extensions at the source: https://git.drupalcode.org/project/drupal/-/blob/11.x/.htaccess

Now this has become a breaking change on our project where we serve legitimate .md files sitewide.

@mxr576
Copy link

mxr576 commented May 29, 2024

In addition, the requested "security hardenings" in [#86] could be achieved by excluding those files from the scaffolded ones via Drupal Scaffold plugin config: https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold#toc_6

So the requested hardenings does not have to implemented in the web server level.

To be clear, the only concerning part for us is blocking markdown files to served globally, when there are legitimate use cases for that --- and to be fair/IMO, the README.md of Drupal core does not tell anything about the installed version, etc. I may discloses that Drupal is the app framework, but that could be guessed in many different ways.

(cc @elaman )

@elaman
Copy link
Contributor

elaman commented May 29, 2024

Fair point regarding .md files not being a direct vulnerability, although I think that publicly facing Markdown documents should be served out of public file system (eg sites/default/files.

Given that MD files are more often included with the code to explain said code (modules, themes, libraries, internal docs, etc), we don't want website visitors to be able to gain access to information about code.

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

No branches or pull requests

3 participants