Skip to content

Commit 84faaf1

Browse files
Fix chart creation nonce verification mismatch
The security PR that was merged to development added nonce action parameters to nonce creation and uploadData verification, but forgot to update _handleTypesPage verification. This caused a mismatch where: - Nonces were created WITH action: wp_create_nonce('visualizer-upload-data') - But _handleTypesPage verified WITHOUT action: wp_verify_nonce($nonce) - Result: Nonce verification failed, chart creation broken This fix updates _handleTypesPage to verify WITH the action parameter to match the nonce creation, allowing charts to be created successfully while maintaining all security improvements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7421bf5 commit 84faaf1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/Visualizer/Module/Chart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ private function _handleDataAndSettingsPage() {
955955
*/
956956
private function _handleTypesPage() {
957957
// process post request
958-
if ( $_SERVER['REQUEST_METHOD'] === 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ) ) ) {
958+
if ( $_SERVER['REQUEST_METHOD'] === 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ), 'visualizer-upload-data' ) ) {
959959
$type = filter_input( INPUT_POST, 'type' );
960960
$library = filter_input( INPUT_POST, 'chart-library' );
961961
if ( Visualizer_Module_Admin::checkChartStatus( $type ) ) {

0 commit comments

Comments
 (0)