Skip to content

Commit 23d86dc

Browse files
committed
fix: Fix handling of contributor_ids sanitization
Signed-off-by: Shadi Sharaf <shady@sharaf.me>
1 parent 2b089c6 commit 23d86dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

classes/class-wpcom-liveblog-rest-api.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,10 @@ public static function sanitize_numeric( $param, $request, $key ) {
660660
*/
661661
public static function get_json_param( $param, $json ) {
662662
if ( isset( $json[ $param ] ) ) {
663+
// Handle arrays (e.g., contributor_ids from multi-select)
664+
if ( is_array( $json[ $param ] ) ) {
665+
return array_map( 'html_entity_decode', $json[ $param ] );
666+
}
663667
return html_entity_decode( $json[ $param ] );
664668
}
665669
return false;

0 commit comments

Comments
 (0)