WordPress Charts and Graphs Lite - Version 1.4.2.1

Version Description

  • Fixed issue with download_url function which not exists at front end
  • Added functionality which prevents direct access to the plugin folder
Download this release

Release Info

Developer madpixels
Plugin Icon WordPress Charts and Graphs Lite
Version 1.4.2.1
Comparing to
See all releases

Code changes from version 1.4.2 to 1.4.2.1

classes/Visualizer/Plugin.php CHANGED
@@ -30,7 +30,7 @@
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
- const VERSION = '1.4.2';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
+ const VERSION = '1.4.2.1';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
classes/Visualizer/Security.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- // +----------------------------------------------------------------------+
4
- // | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
5
- // +----------------------------------------------------------------------+
6
- // | This program is free software; you can redistribute it and/or modify |
7
- // | it under the terms of the GNU General Public License, version 2, as |
8
- // | published by the Free Software Foundation. |
9
- // | |
10
- // | This program is distributed in the hope that it will be useful, |
11
- // | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12
- // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13
- // | GNU General Public License for more details. |
14
- // | |
15
- // | You should have received a copy of the GNU General Public License |
16
- // | along with this program; if not, write to the Free Software |
17
- // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
18
- // | MA 02110-1301 USA |
19
- // +----------------------------------------------------------------------+
20
- // | Author: Eugene Manuilov <eugene@manuilov.org> |
21
- // +----------------------------------------------------------------------+
22
-
23
- /**
24
- * Security helper class responsible for creation and verification nonce values.
25
- *
26
- * @category Visualizer
27
- * @package Security
28
- *
29
- * @since 1.0.0
30
- */
31
- class Visualizer_Security {
32
-
33
- /**
34
- * Returns nonce salt.
35
- *
36
- * @since 1.0.0
37
- *
38
- * @static
39
- * @access private
40
- * @param string $action The action what requires the nonce.
41
- * @return array
42
- */
43
- private static function _getSalt( $action = '' ) {
44
- return array(
45
- '__ip' => @$_SERVER['REMOTE_ADDR'],
46
- '__agent' => urlencode( @$_SERVER['HTTP_USER_AGENT'] ),
47
- '__userid' => get_current_user_id(),
48
- '__action' => $action,
49
- );
50
- }
51
-
52
- /**
53
- * Creates nonce.
54
- *
55
- * @since 1.0.0
56
- *
57
- * @static
58
- * @access public
59
- * @param string $action The action what requires the nonce.
60
- * @return string
61
- */
62
- public static function createNonce( $action = '' ) {
63
- return wp_create_nonce( implode( '/', array_slice( explode( '/', home_url() ), 0, 3 ) ) . add_query_arg( self::_getSalt( $action ) ) );
64
- }
65
-
66
- /**
67
- * Returns TRUE if nonce correct. Otherwise FALSE.
68
- *
69
- * @since 1.0.0
70
- *
71
- * @static
72
- * @access public
73
- * @param string $nonce The nonce to verify.
74
- * @param string $action The action what requires the nonce.
75
- * @return boolean TRUE if nonce is correct. Otherwise FALSE.
76
- */
77
- public static function verifyNonce( $nonce, $action = '' ) {
78
- return wp_verify_nonce( $nonce, add_query_arg( self::_getSalt( $action ), $_SERVER['HTTP_REFERER'] ) );
79
- }
80
-
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/Visualizer/Source/Csv/Remote.php CHANGED
@@ -151,6 +151,8 @@ class Visualizer_Source_Csv_Remote extends Visualizer_Source_Csv {
151
  return parent::_get_file_handle( $filename );
152
  }
153
 
 
 
154
  $this->_tmpfile = download_url( $this->_filename );
155
 
156
  return !is_wp_error( $this->_tmpfile ) ? parent::_get_file_handle( $this->_tmpfile ) : false;
151
  return parent::_get_file_handle( $filename );
152
  }
153
 
154
+ require_once ABSPATH . 'wp-admin/includes/file.php';
155
+
156
  $this->_tmpfile = download_url( $this->_filename );
157
 
158
  return !is_wp_error( $this->_tmpfile ) ? parent::_get_file_handle( $this->_tmpfile ) : false;
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WordPress Visualizer
4
  Plugin URI: https://github.com/madpixelslabs/visualizer
5
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
6
- Version: 1.4.2
7
  Author: Madpixels
8
  Author URI: http://madpixels.net
9
  Donate link: http://flattr.com/thing/2574985/WordPress-Visualizer
@@ -31,6 +31,12 @@ License URI: http://www.opensource.org/licenses/gpl-license.php
31
  // | Author: Eugene Manuilov <eugene@manuilov.org> |
32
  // +----------------------------------------------------------------------+
33
 
 
 
 
 
 
 
34
  // don't load the plugin, if it has been already loaded
35
  if ( class_exists( 'Visualizer_Plugin', false ) ) {
36
  return;
3
  Plugin Name: WordPress Visualizer
4
  Plugin URI: https://github.com/madpixelslabs/visualizer
5
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
6
+ Version: 1.4.2.1
7
  Author: Madpixels
8
  Author URI: http://madpixels.net
9
  Donate link: http://flattr.com/thing/2574985/WordPress-Visualizer
31
  // | Author: Eugene Manuilov <eugene@manuilov.org> |
32
  // +----------------------------------------------------------------------+
33
 
34
+ // prevent direct access to the plugin folder
35
+ if ( !defined( 'ABSPATH' ) ) {
36
+ header( 'HTTP/1.0 404 Not Found', true, 404 );
37
+ exit;
38
+ }
39
+
40
  // don't load the plugin, if it has been already loaded
41
  if ( class_exists( 'Visualizer_Plugin', false ) ) {
42
  return;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://flattr.com/thing/2574985/WordPress-Visualizer
4
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
5
  Requires at least: 3.5
6
  Tested up to: 3.8.1
7
- Stable tag: 1.4.2
8
  License: GPL v2.0 or later
9
  License URI: http://www.opensource.org/licenses/gpl-license.php
10
 
@@ -58,6 +58,10 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 1.4.2 =
62
  * Fixed remote CSV uploading issue when allow_url_fopen option is disabled in php.ini
63
  * Replaced flattr image on widget and added donate link to plugin meta data
4
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
5
  Requires at least: 3.5
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.4.2.1
8
  License: GPL v2.0 or later
9
  License URI: http://www.opensource.org/licenses/gpl-license.php
10
 
58
 
59
  == Changelog ==
60
 
61
+ = 1.4.2.1 =
62
+ * Fixed issue with download_url function which not exists at front end
63
+ * Added functionality which prevents direct access to the plugin folder
64
+
65
  = 1.4.2 =
66
  * Fixed remote CSV uploading issue when allow_url_fopen option is disabled in php.ini
67
  * Replaced flattr image on widget and added donate link to plugin meta data