Page MenuHomePhabricator

Add validation to input json in API
Closed, ResolvedPublic

Description

Per https://gerrit.wikimedia.org/r/#/c/358378/11/includes/WikispeechApi.php@29

Also consider changing to FormatJson.

Note that with FormatJson::parse( $parameters['removetags'] ) we don't get the same result as with json_decode( $parameters['removetags'], true ).

Event Timeline

Note that with FormatJson::parse( $parameters['removetags'] ) we don't get the same result as with json_decode( $parameters['removetags'], true ).

Even when options contain FormatJson::FORCE_ASSOC?

Note that with FormatJson::parse( $parameters['removetags'] ) we don't get the same result as with json_decode( $parameters['removetags'], true ).

Even when options contain FormatJson::FORCE_ASSOC?

Can't remember what I tried :/

Change 376493 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Validate value of API parameter "removetags"

https://gerrit.wikimedia.org/r/376493

Change 376493 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Validate value of API parameter "removetags"

https://gerrit.wikimedia.org/r/376493