WordPress.org

Plugin Directory

Changeset 814959


Ignore:
Timestamp:
12/04/13 17:20:38 (5 months ago)
Author:
georgestephanis
Message:

Jetpack: Stats: Consolidate on $_GET not $_REQUEST for the query arg, and add in a sanitize_title() call -- that shouldn't ever do anything, but there's no harm in it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/stats.php

    r814593 r814959  
    409409    } 
    410410 
    411     if ( isset( $_REQUEST['chart'] ) ) { 
    412         if ( preg_match( '/^[a-z0-9-]+$/', $_REQUEST['chart'] ) ) 
    413             $url = 'http://' . STATS_DASHBOARD_SERVER . "/wp-includes/charts/{$_REQUEST['chart']}.php"; 
     411    if ( isset( $_GET['chart'] ) ) { 
     412        if ( preg_match( '/^[a-z0-9-]+$/', $_GET['chart'] ) ) { 
     413            $chart = sanitize_title( $_GET['chart'] ); 
     414            $url = 'http://' . STATS_DASHBOARD_SERVER . "/wp-includes/charts/{$chart}.php"; 
     415        } 
    414416    } else { 
    415417        $url = 'http://' . STATS_DASHBOARD_SERVER . "/wp-admin/index.php"; 
Note: See TracChangeset for help on using the changeset viewer.