Support » Plugin: Sucuri Security - Auditing, Malware Scanner and Security Hardening » Activating plugin deletes wp-content

  • Resolved asamson23

    (@asamson23)


    When I try to install the plugin, everything is working fine. However, when I try to activate the plugin, all of the content inside the wp-content folder gets deleted. I have tried to get the plugin from my xampp install, from the plugin manager on the website and also from the WordPress.org zip file directly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter asamson23

    (@asamson23)

    The server environnement I am using the website on is running on Debian, with PHP version 5.6

    yorman

    (@yorman)

    Wow! This is serious! In the four years that I have been maintaining the code for the Sucuri plugin this is the first time someone reports a problem like this. Please contact me directly at [deleted] (deleted to reduce spam) so I can address this bug as soon as possible.

    yorman

    (@yorman)

    This issue has been addressed with this commit [1]; the patch hasn’t been merged to upstream but everyone is free to download the alpha version of the code from here [2] and install it in their websites until an official version is released to the public.

    The way I fixed this was by scanning the entire code base for the PHP function “rmdir” [3] which is the only way the plugin can delete an entire directory. There is only one block of code using that function, I added conditions to prevent the deletion of the content and uploads directories as you can see in the patch linked below.

    I will mark this as resolved, feel free to re-open if you need more information.

    [1] https://github.com/cixtor/sucuri-wordpress-plugin/commit/fd2a4bc
    [2] https://github.com/cixtor/sucuri-wordpress-plugin/archive/master.zip
    [3] http://php.net/manual/en/function.rmdir.php

    Thread Starter asamson23

    (@asamson23)

    I sent you an email explaining what I tried. When I applied your fix, the issues were gone.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Activating plugin deletes wp-content’ is closed to new replies.