PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.85
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.85
5.5.85 5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 All 161 releases
← All changes | WPDataAccess/Simple_Form/WPDA_Simple_Form.php +11 -2 5.5.775.5.85 View file →
@@ -464,10 +464,11 @@
464 464 }
465 465 // Add search arguments to link to return to same page
466 466 foreach ( $_REQUEST as $key => $value ) {
467 467 if ( substr( $key, 0, 19 ) === 'wpda_search_column_' ) {
468 - $this->page_number_link .= "&{$key}={$value}";
469 - $this->page_number_item .= "<input type='hidden' name='{$key}' value='{$value}' />";
468 + $esc_attr = 'esc_attr';
469 + $this->page_number_link .= "&{$esc_attr( $key )}={$esc_attr( $value )}";
470 + $this->page_number_item .= "<input type='hidden' name='{$esc_attr( $key )}' value='{$esc_attr( $value )}' />";
470 471 }
471 472 }
472 473 // Check if button text "back to list" should be changed
473 474 if ( isset( $args['back_to_list_text'] ) && '' !== $args['back_to_list_text'] ) {
@@ -540,8 +541,12 @@
540 541 if ( !wp_verify_nonce( $wp_nonce, $this->get_nonce_action() ) ) {
541 542 wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
542 543 }
543 544 if ( 'new' === $this->action ) {
545 + global $wpda_project_mode;
546 + if ( 'on' !== WPDA::get_option( WPDA::OPTION_BE_ALLOW_INSERT ) || isset( $wpda_project_mode['allow_insert'] ) && ('off' === $wpda_project_mode['allow_insert'] || 'only' === $wpda_project_mode['allow_insert']) ) {
547 + wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
548 + }
544 549 // Prepare row and items for validation
545 550 $this->row = $this->row_data->new_row();
546 551 $this->prepare_items( true );
547 552 // Save new record.
@@ -567,8 +572,12 @@
567 572 $set_back_form_values = true;
568 573 }
569 574 }
570 575 } else {
576 + global $wpda_project_mode;
577 + if ( 'on' !== WPDA::get_option( WPDA::OPTION_BE_ALLOW_UPDATE ) && (isset( $wpda_project_mode['mode'] ) && 'edit' === $wpda_project_mode['mode']) ) {
578 + wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
579 + }
571 580 // Prepare row and items for validation
572 581 $this->row = $this->row_data->get_row( $this->auto_increment_value, $this->wpda_err );
573 582 $this->prepare_items( true );
574 583 // Update existing record.