public function exportAll($get, $post) { if (isset($get['all']) && isset($get['_wpnonce'])) { if (wp_verify_nonce($get['_wpnonce'], 'cred-export-all')) { CRED_Loader::load('CLASS/XML_Processor'); $filename = isset($get['filename']) ? urldecode($get['filename']) : ''; CRED_XML_Processor::exportToXML('all', isset($get['ajax']), $filename); die; } } die; }
public function exportAll($get, $post) { if (!current_user_can(CRED_CAPABILITY)) { wp_die(); } if (isset($get['all']) && isset($get['_wpnonce'])) { if (wp_verify_nonce($get['_wpnonce'], 'cred-export-all')) { CRED_Loader::load('CLASS/XML_Processor'); //https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/196173458/comments //Security Fix added validate_file and sanitize $filename = isset($get['filename']) && validate_file($get['filename']) ? urldecode($get['filename']) : ''; if (isset($get['type']) && $get['type'] == 'user') { CRED_XML_Processor::exportUsersToXML('all', isset($get['ajax']), $filename); } else { CRED_XML_Processor::exportToXML('all', isset($get['ajax']), $filename); } die; } } die; }