File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -606,6 +606,8 @@ public function cloneChart() {
606
606
* @access public
607
607
*/
608
608
public function exportData () {
609
+ check_ajax_referer (Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION , "security " );
610
+
609
611
$ chart_id = $ success = false ;
610
612
$ capable = current_user_can ( 'edit_posts ' );
611
613
if ( $ capable ) {
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ protected function _renderSidebarContent() {
114
114
$ export_link = add_query_arg ( array (
115
115
'action ' => Visualizer_Plugin::ACTION_EXPORT_DATA ,
116
116
'chart ' => $ this ->chart ->ID ,
117
+ 'security ' => wp_create_nonce (Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION ),
117
118
), admin_url ( 'admin-ajax.php ' ) );
118
119
?>
119
120
<input type="button" class="button" id="export-data" value="<?php esc_attr_e ( 'Export Data ' , Visualizer_Plugin::NAME );?> " data-url="<?php echo $ export_link ;?> ">
You can’t perform that action at this time.
0 commit comments