[wp-trac] [WordPress Trac] #35032: Shiny plugin updates fails if slug has special characters

WordPress Trac noreply at wordpress.org
Tue Dec 15 03:06:12 UTC 2015


#35032: Shiny plugin updates fails if slug has special characters
-------------------------------------+------------------------------
 Reporter:  khag7                    |       Owner:  adamsilverstein
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Upgrade/Install          |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------

Comment (by khag7):

 The patch I gave does solve the problem in core. I still see a better long
 term solution to be getting away from using plugin name or slug as
 identifiers for the reasons we discussed. But for now the patch I
 submitted does fix the more immediate issue of shiny updates failing for
 some plugins.

 I will resubmit a patch using `esc_attr( sanitize_key ( $slug ) )`
 although I think it's redundant to have both. Or maybe I'm confused about
 what each of those does.

 I threw together a [https://github.com/khag7/this-plugin-always-needs-to-
 be-updated little plugin] that might help you reproduce this issue. It
 adds itself to the 'update_plugins' transient (that's where available
 plugin updates are stored) and it uses its filename (including special
 chars) as the slug. It also always shows as having an update available, so
 its ideal for testing this kind of thing.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35032#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list