Changeset 2832242 for wp-slimstat
- Timestamp:
- 12/12/2022 09:58:00 AM (3 years ago)
- Location:
- wp-slimstat
- Files:
-
- 4 added
- 16 deleted
- 11 edited
- 1 copied
-
assets/banner-1544x500.jpg (added)
-
assets/banner-772x250-1.jpg (deleted)
-
assets/banner-772x250-10.png (deleted)
-
assets/banner-772x250-11.png (deleted)
-
assets/banner-772x250-12.jpg (deleted)
-
assets/banner-772x250-14.jpg (deleted)
-
assets/banner-772x250-15.jpg (deleted)
-
assets/banner-772x250-16.jpg (deleted)
-
assets/banner-772x250-2.png (deleted)
-
assets/banner-772x250-3.png (deleted)
-
assets/banner-772x250-5.jpg (deleted)
-
assets/banner-772x250-6.png (deleted)
-
assets/banner-772x250-7.png (deleted)
-
assets/banner-772x250-8.png (deleted)
-
assets/banner-772x250-9.jpg (deleted)
-
assets/banner-772x250-9.png (deleted)
-
assets/banner-772x250.jpg (added)
-
assets/banner-772x250.png (deleted)
-
assets/icon-128x128.png (modified) (previous)
-
assets/icon-256x256.png (added)
-
assets/icon.svg (added)
-
tags/4.9.3 (copied) (copied from wp-slimstat/trunk)
-
tags/4.9.3/admin/view/addons.php (modified) (1 diff)
-
tags/4.9.3/admin/view/right-now.php (modified) (1 diff)
-
tags/4.9.3/admin/view/wp-slimstat-reports.php (modified) (1 diff)
-
tags/4.9.3/readme.txt (modified) (3 diffs)
-
tags/4.9.3/wp-slimstat.php (modified) (12 diffs)
-
trunk/admin/view/addons.php (modified) (1 diff)
-
trunk/admin/view/right-now.php (modified) (1 diff)
-
trunk/admin/view/wp-slimstat-reports.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-slimstat.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-slimstat/tags/4.9.3/admin/view/addons.php
r2158767 r2832242 42 42 if ( empty( $_GET[ 'force_refresh' ] ) ) { 43 43 echo ' '; 44 printf( __( 'This list is refreshed once daily: <a href="%s&force_refresh=true" class="noslimstat">click here</a> to clear the cache.', 'wp-slimstat' ), $_SERVER[ 'REQUEST_URI' ]);44 printf( __( 'This list is refreshed once daily: <a href="%s&force_refresh=true" class="noslimstat">click here</a> to clear the cache.', 'wp-slimstat' ), esc_url($_SERVER[ 'REQUEST_URI' ]) ); 45 45 } 46 46 -
wp-slimstat/tags/4.9.3/admin/view/right-now.php
r2173722 r2832242 191 191 } 192 192 193 $results[ $i ][ 'resource' ] = "<a class='slimstat-font-logout slimstat-tooltip-trigger' target='_blank' title='" . htmlentities( __( 'Open this URL in a new window', 'wp-slimstat' ), ENT_QUOTES, 'UTF-8' ) . "' href='" . htmlentities( $results[$i][ 'resource' ], ENT_QUOTES, 'UTF-8' ) . "'></a> <a class='slimstat-filter-link' href='" . wp_slimstat_reports::fs_url( 'resource equals ' . $results[ $i ][ 'resource' ] ) . "'>" . $resource_title. '</a>';193 $results[ $i ][ 'resource' ] = "<a class='slimstat-font-logout slimstat-tooltip-trigger' target='_blank' title='" . htmlentities( __( 'Open this URL in a new window', 'wp-slimstat' ), ENT_QUOTES, 'UTF-8' ) . "' href='" . htmlentities( $results[$i][ 'resource' ], ENT_QUOTES, 'UTF-8' ) . "'></a> <a class='slimstat-filter-link' href='" . wp_slimstat_reports::fs_url( 'resource equals ' . esc_url($results[ $i ][ 'resource' ]) ) . "'>" . esc_html($resource_title) . '</a>'; 194 194 } 195 195 else { -
wp-slimstat/tags/4.9.3/admin/view/wp-slimstat-reports.php
r2695016 r2832242 1738 1738 } 1739 1739 1740 return $request_uri;1740 return esc_url($request_uri); 1741 1741 } 1742 1742 -
wp-slimstat/tags/4.9.3/readme.txt
r2818802 r2832242 6 6 Requires PHP: 7.4+ 7 7 Tested up to: 6.1 8 Stable tag: 4.9. 28 Stable tag: 4.9.3 9 9 10 10 == Description == … … 32 32 == Installation == 33 33 1. In your WordPress admin, go to Plugins > Add New 34 2. Search for limstat Analytics34 2. Search for Slimstat Analytics 35 35 3. Click on **Install Now** next to Slimstat Analytics and then activate the plugin 36 36 4. Make sure your template calls `wp_footer()` or the equivalent hook somewhere (possibly just before the `</body>` tag) … … 50 50 51 51 == Changelog == 52 = 4.9.3 = 53 * [Update] New logo and icon for the plugin! 54 * [Fix] Hardened plugin security and sanitization of user input and escaped output 55 52 56 = 4.9.2 = 53 57 * [Fix] Fixed tweak notice errors while activating the plugin in fresh installation -
wp-slimstat/tags/4.9.3/wp-slimstat.php
r2818802 r2832242 4 4 Plugin URI: https://wp-slimstat.com/ 5 5 Description: The leading web analytics plugin for WordPress 6 Version: 4.9. 26 Version: 4.9.3 7 7 Author: Jason Crouse, VeronaLabs 8 8 Text Domain: wp-slimstat 9 9 Domain Path: /languages 10 Author URI: https://wp-slimstat.com/ 10 11 Requires PHP: 7.4 11 12 */ … … 361 362 } 362 363 } 363 364 364 365 $cookie_found = false; 365 366 foreach ( $cookie_names as $a_name => $a_value ) { … … 570 571 } 571 572 572 // Geolocation 573 // Geolocation 573 574 include_once( plugin_dir_path( __FILE__ ) . 'vendor/maxmind.php' ); 574 575 try { … … 705 706 706 707 if ( isset( $_SERVER[ 'REQUEST_URI' ] ) ) { 707 return urldecode( $_SERVER[ 'REQUEST_URI' ]);708 return urldecode( sanitize_url(wp_unslash($_SERVER['REQUEST_URI'])) ); 708 709 } 709 710 else if ( isset( $_SERVER[ 'SCRIPT_NAME' ] ) ) { … … 854 855 $output[ $result_idx ][ $a_column ] .= $a_result[ 'username' ]; 855 856 } 856 857 857 858 break; 858 859 … … 1353 1354 1354 1355 $update_checker_objects = array(); 1355 1356 1356 1357 // This is only included if add-ons are installed 1357 1358 include_once( plugin_dir_path( __FILE__ ) . 'vendor/update-checker/plugin-update-checker.php' ); … … 1359 1360 foreach ( self::$update_checker as $a_slug ) { 1360 1361 $a_clean_slug = str_replace( array( 'wp_slimstat_', '_' ), array( '', '-' ), $a_slug ); 1361 1362 1362 1363 if ( !empty( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ) ) { 1363 1364 $update_checker_objects[ $a_clean_slug ] = Puc_v4_Factory::buildUpdateChecker( 'https://www.wp-slimstat.com/update-checker/?slug=' . $a_clean_slug . '&key=' . urlencode( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ), dirname( dirname( __FILE__ ) ) . '/wp-slimstat-' . $a_clean_slug . '/index.php', 'wp-slimstat-' . $a_clean_slug ); … … 1458 1459 } 1459 1460 1460 // Remove unwanted characters (SQL injections, anyone?)1461 // Remove unwanted characters from keys (SQL injections, anyone?) 1461 1462 $data_keys = array(); 1462 1463 foreach ( array_keys( $_data ) as $a_key ) { 1463 1464 $data_keys[] = sanitize_key( $a_key ); 1464 1465 } 1466 1467 // Remove unwanted characters from data (SQL injections, anyone?) 1468 foreach ($_data as $key => $value) { 1469 $_data[$key] = sanitize_text_field($value); 1470 } 1465 1471 1466 1472 self::$wpdb->query( self::$wpdb->prepare( " … … 1951 1957 */ 1952 1958 protected static function _base64_url_encode( $_input = '' ) { 1953 return strtr( base64_encode( $_input ), '+/=', '._-' ); 1954 } 1959 return strtr( base64_encode( $_input ), '+/=', '._-' ); 1960 } 1955 1961 protected static function _base64_url_decode( $_input = '' ) { 1956 1962 return strip_tags( trim( base64_decode( strtr( $_input, '._-', '+/=' ) ) ) ); … … 1965 1971 */ 1966 1972 public function __construct() { 1967 parent::__construct( 'slimstat_widget', 'Slimstat', array( 1973 parent::__construct( 'slimstat_widget', 'Slimstat', array( 1968 1974 'classname' => 'slimstat_widget', 1969 1975 'description' => 'Add a Slimstat report to your sidebar', … … 2018 2024 2019 2025 <p> 2020 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>"><?php _e( 'Report', 'wp-slimstat' ) ?></label> 2026 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>"><?php _e( 'Report', 'wp-slimstat' ) ?></label> 2021 2027 <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_id' ) ); ?>"> 2022 2028 <option value="">Select a widget</option> … … 2026 2032 2027 2033 <p> 2028 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>"><?php _e( 'Title', 'wp-slimstat' ) ?></label> 2034 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>"><?php _e( 'Title', 'wp-slimstat' ) ?></label> 2029 2035 <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_title' ) ); ?>" value="<?php echo trim( strip_tags( $slimstat_widget_title ) ) ?>"> 2030 2036 </p> 2031 2037 2032 2038 <p> 2033 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>"><?php _e( 'Optional filters', 'wp-slimstat' ); ?></label> 2039 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>"><?php _e( 'Optional filters', 'wp-slimstat' ); ?></label> 2034 2040 <a href="https://slimstat.freshdesk.com/solution/articles/5000631833-what-is-the-syntax-of-a-slimstat-shortcode-#slimstat-operators" target="_blank">[?]</a> 2035 2041 <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_filters' ) ); ?>"><?php echo trim( strip_tags( $slimstat_widget_filters ) ) ?></textarea> -
wp-slimstat/trunk/admin/view/addons.php
r2158767 r2832242 42 42 if ( empty( $_GET[ 'force_refresh' ] ) ) { 43 43 echo ' '; 44 printf( __( 'This list is refreshed once daily: <a href="%s&force_refresh=true" class="noslimstat">click here</a> to clear the cache.', 'wp-slimstat' ), $_SERVER[ 'REQUEST_URI' ]);44 printf( __( 'This list is refreshed once daily: <a href="%s&force_refresh=true" class="noslimstat">click here</a> to clear the cache.', 'wp-slimstat' ), esc_url($_SERVER[ 'REQUEST_URI' ]) ); 45 45 } 46 46 -
wp-slimstat/trunk/admin/view/right-now.php
r2173722 r2832242 191 191 } 192 192 193 $results[ $i ][ 'resource' ] = "<a class='slimstat-font-logout slimstat-tooltip-trigger' target='_blank' title='" . htmlentities( __( 'Open this URL in a new window', 'wp-slimstat' ), ENT_QUOTES, 'UTF-8' ) . "' href='" . htmlentities( $results[$i][ 'resource' ], ENT_QUOTES, 'UTF-8' ) . "'></a> <a class='slimstat-filter-link' href='" . wp_slimstat_reports::fs_url( 'resource equals ' . $results[ $i ][ 'resource' ] ) . "'>" . $resource_title. '</a>';193 $results[ $i ][ 'resource' ] = "<a class='slimstat-font-logout slimstat-tooltip-trigger' target='_blank' title='" . htmlentities( __( 'Open this URL in a new window', 'wp-slimstat' ), ENT_QUOTES, 'UTF-8' ) . "' href='" . htmlentities( $results[$i][ 'resource' ], ENT_QUOTES, 'UTF-8' ) . "'></a> <a class='slimstat-filter-link' href='" . wp_slimstat_reports::fs_url( 'resource equals ' . esc_url($results[ $i ][ 'resource' ]) ) . "'>" . esc_html($resource_title) . '</a>'; 194 194 } 195 195 else { -
wp-slimstat/trunk/admin/view/wp-slimstat-reports.php
r2695016 r2832242 1738 1738 } 1739 1739 1740 return $request_uri;1740 return esc_url($request_uri); 1741 1741 } 1742 1742 -
wp-slimstat/trunk/readme.txt
r2818802 r2832242 6 6 Requires PHP: 7.4+ 7 7 Tested up to: 6.1 8 Stable tag: 4.9. 28 Stable tag: 4.9.3 9 9 10 10 == Description == … … 32 32 == Installation == 33 33 1. In your WordPress admin, go to Plugins > Add New 34 2. Search for limstat Analytics34 2. Search for Slimstat Analytics 35 35 3. Click on **Install Now** next to Slimstat Analytics and then activate the plugin 36 36 4. Make sure your template calls `wp_footer()` or the equivalent hook somewhere (possibly just before the `</body>` tag) … … 50 50 51 51 == Changelog == 52 = 4.9.3 = 53 * [Update] New logo and icon for the plugin! 54 * [Fix] Hardened plugin security and sanitization of user input and escaped output 55 52 56 = 4.9.2 = 53 57 * [Fix] Fixed tweak notice errors while activating the plugin in fresh installation -
wp-slimstat/trunk/wp-slimstat.php
r2818802 r2832242 4 4 Plugin URI: https://wp-slimstat.com/ 5 5 Description: The leading web analytics plugin for WordPress 6 Version: 4.9. 26 Version: 4.9.3 7 7 Author: Jason Crouse, VeronaLabs 8 8 Text Domain: wp-slimstat 9 9 Domain Path: /languages 10 Author URI: https://wp-slimstat.com/ 10 11 Requires PHP: 7.4 11 12 */ … … 361 362 } 362 363 } 363 364 364 365 $cookie_found = false; 365 366 foreach ( $cookie_names as $a_name => $a_value ) { … … 570 571 } 571 572 572 // Geolocation 573 // Geolocation 573 574 include_once( plugin_dir_path( __FILE__ ) . 'vendor/maxmind.php' ); 574 575 try { … … 705 706 706 707 if ( isset( $_SERVER[ 'REQUEST_URI' ] ) ) { 707 return urldecode( $_SERVER[ 'REQUEST_URI' ]);708 return urldecode( sanitize_url(wp_unslash($_SERVER['REQUEST_URI'])) ); 708 709 } 709 710 else if ( isset( $_SERVER[ 'SCRIPT_NAME' ] ) ) { … … 854 855 $output[ $result_idx ][ $a_column ] .= $a_result[ 'username' ]; 855 856 } 856 857 857 858 break; 858 859 … … 1353 1354 1354 1355 $update_checker_objects = array(); 1355 1356 1356 1357 // This is only included if add-ons are installed 1357 1358 include_once( plugin_dir_path( __FILE__ ) . 'vendor/update-checker/plugin-update-checker.php' ); … … 1359 1360 foreach ( self::$update_checker as $a_slug ) { 1360 1361 $a_clean_slug = str_replace( array( 'wp_slimstat_', '_' ), array( '', '-' ), $a_slug ); 1361 1362 1362 1363 if ( !empty( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ) ) { 1363 1364 $update_checker_objects[ $a_clean_slug ] = Puc_v4_Factory::buildUpdateChecker( 'https://www.wp-slimstat.com/update-checker/?slug=' . $a_clean_slug . '&key=' . urlencode( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ), dirname( dirname( __FILE__ ) ) . '/wp-slimstat-' . $a_clean_slug . '/index.php', 'wp-slimstat-' . $a_clean_slug ); … … 1458 1459 } 1459 1460 1460 // Remove unwanted characters (SQL injections, anyone?)1461 // Remove unwanted characters from keys (SQL injections, anyone?) 1461 1462 $data_keys = array(); 1462 1463 foreach ( array_keys( $_data ) as $a_key ) { 1463 1464 $data_keys[] = sanitize_key( $a_key ); 1464 1465 } 1466 1467 // Remove unwanted characters from data (SQL injections, anyone?) 1468 foreach ($_data as $key => $value) { 1469 $_data[$key] = sanitize_text_field($value); 1470 } 1465 1471 1466 1472 self::$wpdb->query( self::$wpdb->prepare( " … … 1951 1957 */ 1952 1958 protected static function _base64_url_encode( $_input = '' ) { 1953 return strtr( base64_encode( $_input ), '+/=', '._-' ); 1954 } 1959 return strtr( base64_encode( $_input ), '+/=', '._-' ); 1960 } 1955 1961 protected static function _base64_url_decode( $_input = '' ) { 1956 1962 return strip_tags( trim( base64_decode( strtr( $_input, '._-', '+/=' ) ) ) ); … … 1965 1971 */ 1966 1972 public function __construct() { 1967 parent::__construct( 'slimstat_widget', 'Slimstat', array( 1973 parent::__construct( 'slimstat_widget', 'Slimstat', array( 1968 1974 'classname' => 'slimstat_widget', 1969 1975 'description' => 'Add a Slimstat report to your sidebar', … … 2018 2024 2019 2025 <p> 2020 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>"><?php _e( 'Report', 'wp-slimstat' ) ?></label> 2026 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>"><?php _e( 'Report', 'wp-slimstat' ) ?></label> 2021 2027 <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_id' ) ); ?>"> 2022 2028 <option value="">Select a widget</option> … … 2026 2032 2027 2033 <p> 2028 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>"><?php _e( 'Title', 'wp-slimstat' ) ?></label> 2034 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>"><?php _e( 'Title', 'wp-slimstat' ) ?></label> 2029 2035 <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_title' ) ); ?>" value="<?php echo trim( strip_tags( $slimstat_widget_title ) ) ?>"> 2030 2036 </p> 2031 2037 2032 2038 <p> 2033 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>"><?php _e( 'Optional filters', 'wp-slimstat' ); ?></label> 2039 <label for="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>"><?php _e( 'Optional filters', 'wp-slimstat' ); ?></label> 2034 2040 <a href="https://slimstat.freshdesk.com/solution/articles/5000631833-what-is-the-syntax-of-a-slimstat-shortcode-#slimstat-operators" target="_blank">[?]</a> 2035 2041 <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'slimstat_widget_filters' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slimstat_widget_filters' ) ); ?>"><?php echo trim( strip_tags( $slimstat_widget_filters ) ) ?></textarea>
Note: See TracChangeset
for help on using the changeset viewer.