Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#23822 closed defect (bug) (duplicate)

Invalid Plugin Contributors JSON from WP.org Plugin API

Reported by: bpetty's profile bpetty Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: WordPress.org Site Keywords:
Focuses: Cc:

Description

Under some rare conditions, some plugins can break the plugin API with invalid JSON, specifically in regards to the list of contributors returned. This is likely because of the string encoding used to either parse or store the values returned from the plugin file headers.

Basically though, it results in using a null name for a JSON object member where there absolutely needs to be a string.

For example, the "Aaaaah Lek Lek" plugin (aaaaaaah-lek-lek) returns the following JSON:

{
    "name": "Aaaaah Lek Lek",
    "slug": "aaaaaaah-lek-lek",
    "version": "1.0",
    "author": "<a href=\"http:\/\/valeriosouza.com.br\">Val&#233;rio Souza<\/a>",
    "author_profile": "http:\/\/profiles.wordpress.org\/valeriosza",
    "contributors": {
        null: ""
    },
    "requires": "3.0.1",
    "tested": "3.5.1",
    "compatibility": [
        
    ],
    "rating": 0,
    "num_ratings": 0,
    "downloaded": 20,
    "last_updated": "2013-03-12",
    "added": "2013-03-12",
    "homepage": "http:\/\/valeriosouza.com.br",
    "sections": {
        "description": "<p>Coloque a frase da m&#250;sica LekLek em seu WordPress, dentro do painel administrativo.<\/p>",
        "installation": "<p>Siga para Instalar<\/p>\n\n<ol>\n<li>Fa&#231;a Upload <code>aaaaaaah-lek-lek<\/code> para a pasta <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Ative no menu 'Plugins' no seu WordPress<\/li>\n<\/ol>",
        "changelog": "<h4>1.0<\/h4>\n\n<ul>\n<li>Lan&#231;ada Vers&#227;o 1.<\/li>\n<\/ul>",
        "faq": "<h4>What about foo bar?<\/h4>",
        "other_notes": "<h3>Arbitrary section<\/h3>"
    },
    "short_description": "Coloque o Lek Lek no seu WordPress",
    "download_link": "http:\/\/downloads.wordpress.org\/plugin\/aaaaaaah-lek-lek.zip",
    "tags": {
        "frases": "frases",
        "leklek": "leklek"
    }
}

JSONLint comes back with:

Parse error on line 7:
...ibutors": {        null: ""    },    
----------------------^
Expecting 'STRING', '}'

These plugin details come from these files:

(it mentions a stable tag, but there are no actual tags)

You might also notice that Extend is unable to display these details correctly either: http://wordpress.org/extend/plugins/aaaaaaah-lek-lek/

Change History (4)

#1 @SergeyBiryukov
12 years ago

FWIW, that readme.txt file is in Windows-1252 instead of UTF-8.

#2 @bpetty
12 years ago

I could still use a fix on this btw...

Additionally, here's the full list of plugins that trigger this same error for the same reason:

aaaaaaah-lek-lek
snapicious-for-wordpress
wp-jqtransform-archive
check-links-intercambios
flogmaker
envato-referral
tres-noticias-principais
landing-sites
flash-tag-cloud
single-categories
wice-contact-for-wordpress
chatbot-widget
flashblog

Here's another plugin with this encoding problem, but with tags rather than contributors:

sns

#3 @samuelsidler
12 years ago

  • Milestone WordPress.org deleted
  • Status changed from new to closed

Migrated to #meta157

#4 @SergeyBiryukov
12 years ago

  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.