cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
500 stars 49 forks source link

Download fails when plugin directory name includes punctuation characters (or anything outside `sanitize_key()`) #108

Closed lkraav closed 4 years ago

lkraav commented 4 years ago

Hi. As identified in #83, I think we could use a add_filter sanitize_key to perhaps add more elements to the whitelist. For example, some of our plugins are named something-other.git, to distinguish it from something-other aka clean upstream version. Your thoughts?

lkraav commented 4 years ago

Aah, I see now https://github.com/cedaro/satispress/commit/be16e113db75613b5f20fbf4a9c157e4f83d2cbc moves away from sanitize_key(), which means we could use a custom filter, or just hardcode to add the . character, since it's likely to be used elsewhere also.

bradyvercher commented 4 years ago

Composer does allow . in package names, so I don't think there should be an issue hardcoding that. If you modify that regex to include ., does it solve your use case?

lkraav commented 4 years ago

Yes, it works.