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

Allow renaming of admin folder for better security. #369 #391

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

cmroanirgo
Copy link

As part of general website security, these changes can be incorporated as part of #369.

Despite a lot of file changes, most simply change the hard-coded 'admin' folder to use a new global constant 'ADMIN'. This ADMIN constant is automatically calculated when using the backend interface (see admin/index.php), and should be manually added to defines.php if needed for user management in the front end.

The only issues beyond this were:

  1. The constant THEMES_ADMIN is problematic, so code in plugins/box/themes.plugin.php detects a default THEMES_ADMIN value and quietly ignores it. This ensures existing installs won't break without change.
  2. Using the 'members area' login/logout in the frontend, definitively requires the ADMIN constant to be defined. In case an existing install does not define ADMIN in defines.php, it is detected in Monstra::loadDefines() and defined there, so that things won't crash (but may cause 404's)

The Information > Security tab has been updated to describe the actions an admininstrator needs to take (rename admin folder and add ADMIN to defines.php). See screenshot below

monstra-admin-rename

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