Opened 10 years ago
Closed 10 years ago
#36709 closed defect (bug) (fixed)
Symlinked plugin path incorrectly registered during uninstall
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | normal |
| Severity: | normal | Version: | 3.9 |
| Component: | Plugins | Keywords: | has-patch |
| Focuses: | administration | Cc: |
Description
The dirname() shouldn't be here in uninstall_plugin():
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . dirname( $file ) );
wp_register_plugin_realpath() calls dirname( $file ); to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered. Then, if uninstall.php does this check it will fail:
if ( dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) ) ) exit();
This was observed while trying to uninstall Jetpack which was installed as a symlink. The result was a WSOD. Removing the dirname() from uninstall_plugin() fixes the path registration and allows the check to pass.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Introduced in [27158].