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

Check for custom plugins directory. #7361

Open
OWMC opened this issue Sep 28, 2024 · 0 comments
Open

Check for custom plugins directory. #7361

OWMC opened this issue Sep 28, 2024 · 0 comments

Comments

@OWMC
Copy link

OWMC commented Sep 28, 2024

pods/init.php

Line 153 in 20f681a

if ( ! headers_sent() && ( ! function_exists( 'pods_ui_manage' ) && ! file_exists( WP_CONTENT_DIR . 'plugins/pods-ui/pods-ui.php' ) ) ) {

in init.php several deactivation functions check the hard-coded plugins/pods-ui directory.

This may prevent devs from changing the name of the plugins directory. Which can often be a security recomendation. Eg:

define('WP_PLUGIN_DIR', dirname(__FILE__) . '/../wp-content/extensions');
define('WP_PLUGIN_URL', 'http://localhost.com/site/wp-content/extensions');

Can we improve this so it checks for alternative directory structures? I believe wp-migrate-lite does something like this here: https://github.com/deliciousbrains/wp-migrate-db/blob/f0bd63fae078f3c6added0b3db18983a2a6d4e07/compatibility/wp-migrate-db-pro-compatibility.php#L17

(Also, was pods-ui the original directory name way back in the day?)

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