WordPress.org

Ready to get started?Download WordPress

Forums

Warning! Popular plugin in repository infects database and cannot be removed (5 posts)

  1. Mr Press
    Member
    Posted 1 year ago #

    My database has been infected with very many serialized php arrays left by the All-in-One Event Calendar plugin from the WP plugin repository. The plugin was removed, its tables in mysql had to be removed manually in phapmyadmin, but nevertheless the plugin has left lots of traces in the WP options table in the mysql database. While I could remove some of the options, the plugin has injected serialized arrays in core functionality such as user roles (option_id 99) and cron (option_id 106). The plugin has installed a user role called "Event contributor" which cannot be removed. Somebody else asked for help in the forum to remove it from the database. The person got no useful advice and his problems were not solved but despite that someone has marked the unresolved topic as [resolved]:

    http://wordpress.org/support/topic/plugin-all-in-one-event-calendar-uninstall-all-in-one-data-from-wordpress-database?replies=3

    Below is some of the mess in the cron and user_roles option id's.

    (106,'cron','a:12:{i:1351418914;a:1:{s:12:\"ai1ec_u_cron\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1351424436;a:1:{s:12:\"ai1ec_n_cron\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1351425083;a:1:{s:10:\"ai1ec_cron\"

    in 99 'user_roles':

    b:1;s:16:\"read_ai1ec_event\";b:1;s:16:\"edit_ai1ec_event\";b:1;s:17:\"edit_ai1ec_events\";b:1;s:24:\"edit_others_ai1ec_events\";b:1;s:25:\"edit_private_ai1ec_events\";b:1;s:27:\"edit_published_ai1ec_events\";b:1;s:18:\"delete_ai1ec_event\";b:1;s:19:\"delete_ai1ec_events\";b:1;s:26:\"delete_others_ai1ec_events\";b:1;s:29:\"delete_published_ai1ec_events\";b:1;s:27:\"delete_private_ai1ec_events\";b:1;s:20:\"publish_ai1ec_events\";b:1;s:25:\"read_private_ai1ec_events\";b:1;s:24:\"manage_events_categories\";b:1;s:18:\"manage_ai1ec_feeds\";

    Other people have complained about the same issue, but apparently nothing has been done to resolve it, although the complaints were made a long time ago:

    http://wordpress.org/support/topic/plugin-all-in-one-event-calendar-some-feedback-and-why-i-uninstalled-this-plugin?replies=51

  2. s_ha_dum
    Member
    Posted 1 year ago #

    Couple of thoughts...

    I'm not sure that accusing it of 'infecting' the database is quite fair. There is nothing wrong with serialized arrays. WordPress does it and it is recommended practice for plugins as well. (And I am pretty sure that those serialized arrays were technically added by a couple of WordPress core functions, albeit at the direction of the plugin.)

    Not cleaning up after itself is a valid complaint, but here is the problem with this kind of plugin when it comes to cleaning up: You can't really remove all of the entries from the database on deactivation because it is recommended practice to deactivate plugins before updating WordPress, and it isn't a bad idea to do so when updating the plugin. If it removed database entries on deactivation it would wipe whatever events you've worked to create, which would be bad. It should have an explicit 'cleanup' function, and maybe it does. I haven't looked.

  3. Bev
    Member
    Posted 1 year ago #

    This type of cleanup should happen when a plugin is uninstalled, not when it is deactivated. You should be able to deactivate/reactivate without loss of data or settings. But once the plugin is uninstalled it should delete all traces of itself.

    This is a pet peeve of mine.

  4. Infect is the wrong word. It's ugly, it doesn't clean up, and that's annoying, but it's not 'infecting.' It's just messy.

  5. k_nitin_r
    Member
    Posted 1 year ago #

    Many plugins don't cleanup their mess. Added DB columns, stray files, and ATKOST (all that kind of stuff there)

Topic Closed

This topic has been closed to new replies.

About this Topic