radishconcepts / WordPress-GitHub-Plugin-Updater

This class is meant to be used with your Github hosted WordPress plugins. The purpose of the class is to allow your WordPress plugin to be updated whenever you push out a new version of your plugin; similarly to the experience users know and love with the WordPress.org plugin repository.
https://github.com/jkudish/WordPress-GitHub-Plugin-Updater
822 stars 195 forks source link

*_site_transient() key names can get to long #64

Closed nobleclem closed 9 years ago

nobleclem commented 10 years ago

There is a bug in the code where the transient data key names can easily end up larger that the WP options table 64 char length.

It really needs to be at most 26 characters. This takes into account the longest prefix WP adds (_site_transienttimeout) and the longest postfix the plugin adds (_new_version).

I don't currently have a proper fix yet as I just added a dirname() around the slug for the usage.

The consequence of this is that the get_new_version() logic is always executed instead of only once over 6 hours like I believe its intended.

Also the get_new_version() function checks both the readme and the plugin file version number all the time when it probably should just check the plugin comments and if not found then move to the readme.

afragen commented 9 years ago

I don't currently have a proper fix yet as I just added a dirname() around the slug for the usage.

If you wrap the whole thing in md5() you won't have any length issues.

coenjacobs commented 9 years ago

Closed via referenced pull request.