Making WordPress.org


Ignore:
Timestamp:
08/21/2018 04:56:33 PM (6 years ago)
Author:
Otto42
Message:

Plugins: Stats report - Add output escaping to all printf's. Output in admin areas should always be properly escaped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php

    r6875 r7622  
    227227            printf(
    228228                __( 'The day up to which stats are to be gathered. In YYYY-MM-DD format. Defaults to today (%s).', 'wporg-plugins' ),
    229                 $date
     229                esc_html( $date )
    230230            );
    231231        ?>
     
    270270            printf(
    271271                __( 'Displaying stats for the %1$d days preceding %2$s (and other stats for the %3$d most recent days).', 'wporg-plugins' ),
    272                 $stats['num_days'],
    273                 $stats['date'],
    274                 $stats['recentdays']
     272                esc_html( $stats['num_days'] ),
     273                esc_html( $stats['date'] ),
     274                esc_html( $stats['recentdays'] )
    275275            );
    276276        ?>
     
    285285                printf(
    286286                    __( 'Plugins requested : %d', 'wporg-plugins' ),
    287                     $stats['plugin_new']
     287                    esc_html( $stats['plugin_new'] )
    288288                );
    289289            ?>
     
    294294                printf(
    295295                    __( 'Plugins rejected : %s', 'wporg-plugins' ),
    296                     $stats['plugin_reject']
     296                    esc_html( $stats['plugin_reject'] )
    297297                );
    298298            ?>
     
    303303                printf(
    304304                    __( 'Plugins closed : %s', 'wporg-plugins' ),
    305                     $stats['plugin_delist']
     305                    esc_html( $stats['plugin_delist'] )
    306306                );
    307307                $reasons = array();
     
    321321                printf(
    322322                    __( 'Plugins approved : %s', 'wporg-plugins' ),
    323                     $stats['plugin_approve']
     323                    esc_html( $stats['plugin_approve'] )
    324324                );
    325325            ?>
     
    335335                printf(
    336336                    __( 'Plugins in the queue (new and pending)* : %d', 'wporg-plugins' ),
    337                     $stats['in_queue']
     337                    esc_html( $stats['in_queue'] )
    338338                );
    339339            ?>
     
    344344                printf(
    345345                    __( '→ (older than %1$d days ago)** : %2$d', 'wporg-plugins' ),
    346                     $stats['recentdays'],
    347                     $stats['in_queue_old']
     346                    esc_html( $stats['recentdays'] ),
     347                    esc_html( $stats['in_queue_old'] )
    348348                );
    349349            ?>
     
    354354                printf(
    355355                    __( '→ (%1$s - %2$s) : %3$d', 'wporg-plugins' ),
    356                     $start_date,
    357                     $stats['date'],
    358                     $stats['in_queue_from_time_window']
     356                    esc_html( $start_date ),
     357                    esc_html( $stats['date'] ),
     358                    esc_html( $stats['in_queue_from_time_window'] )
    359359                );
    360360            ?>
     
    365365                printf(
    366366                    __( '→ (new; not processed or replied to yet)* : %d', 'wporg-plugins' ),
    367                     $stats['in_queue_new']
     367                    esc_html( $stats['in_queue_new'] )
    368368                );
    369369            ?>
     
    374374                printf(
    375375                    __( '→ (pending; replied to)* : %d', 'wporg-plugins' ),
    376                     $stats['in_queue_pending']
     376                    esc_html( $stats['in_queue_pending'] )
    377377                );
    378378            ?>
     
    388388                printf(
    389389                    __( 'Total open tickets* : %d', 'wporg-plugins' ),
    390                     $stats['supportpress_queue_total_open']
     390                    esc_html( $stats['supportpress_queue_total_open'] )
    391391                );
    392392            ?>
     
    397397                printf(
    398398                    __( ' → (with no activity in last %1$d days)** : %2$d', 'wporg-plugins' ),
    399                     $stats['recentdays'],
    400                     $stats['supportpress_queue_total_open_old']
     399                    esc_html( $stats['recentdays'] ),
     400                    esc_html( $stats['supportpress_queue_total_open_old'] )
    401401                );
    402402            ?>
     
    407407                printf(
    408408                    __( 'Within defined %d day time window:', 'wporg-plugins' ),
    409                     $stats['num_days']
     409                    esc_html( $stats['num_days'] )
    410410                );
    411411                ?>
     
    416416                        printf(
    417417                            __( 'Total : %d', 'wporg-plugins' ),
    418                             $stats['supportpress_queue_interval_all']
     418                            esc_html( $stats['supportpress_queue_interval_all'] )
    419419                        );
    420420                    ?>
     
    425425                        printf(
    426426                            __( 'Closed : %d', 'wporg-plugins' ),
    427                             $stats['supportpress_queue_interval_closed']
     427                            esc_html( $stats['supportpress_queue_interval_closed'] )
    428428                        );
    429429                    ?>
     
    434434                        printf(
    435435                            __( 'Open : %d', 'wporg-plugins' ),
    436                             $stats['supportpress_queue_interval_open']
     436                            esc_html( $stats['supportpress_queue_interval_open'] )
    437437                        );
    438438                    ?>
Note: See TracChangeset for help on using the changeset viewer.