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

Hide exposed .user.js file from Internet (and/or allow nginx configuration changes for admin only) #224

Open
LowMem opened this issue Aug 12, 2023 · 1 comment

Comments

@LowMem
Copy link

LowMem commented Aug 12, 2023

Bug description

Please allow .user.js file to be hidden from internet when installing Wordfence module (recommended in Hardening Wordpress.

This is due to nginx webserver use.
I could get rid of security warning following manual configuration, but I believe it will appear again on update.

Context

  • Hardware: Olinuxino
  • YunoHost version:
yunohost: 
  repo: stable
  version: 11.1.15
yunohost-admin: 
  repo: stable
  version: 11.1.8
moulinette: 
  repo: stable
  version: 11.1.4
ssowat: 
  repo: stable
  version: 11.1.4
  • I have access to my server: Through SSH and through the webadmin and direct access via keyboard / screen.
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no.
    I only installed Wordpress and Wordfence module.
  • Using, or trying to install package version/branch: Wordpress - 6.2~ynh1

Steps to reproduce

```sh
sudo yunohost app install wordpress
```
  • Then, login into wordpress and install wordfence plugin. Public file is detected at first scan.

Expected behavior

What would be really great, would be to be able to add some nginx config block in Wordpress configuration in admin panel.
This would allow to hide such file and also any other file exposed by any other wordpress module.

Logs

Nothing has failed. Wordpress needs manual nginx configuration changes when using Wordfence (a well known Wordpress module).

@LowMem
Copy link
Author

LowMem commented Aug 12, 2023

I forgot to mention that manual change to nginx configuration file is (only) to add such block to /etc/nginx/conf.d/<wordpress_ynh_URL_used>.d/wordpress.conf file:

location ~ ^/\.user\.ini {
deny all;
}

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

1 participant