Plugin Directory

Changeset 3483168


Ignore:
Timestamp:
03/15/2026 03:11:45 PM (2 weeks ago)
Author:
assafadscale
Message:

HotFix

Location:
adscale-ai/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • adscale-ai/trunk/adscale-ai.php

    r3482917 r3483168  
    2323defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
    2424use AdScale\App;
    25 define( 'ADSCALE_INTERNAL_MODULE_VERSION', 'v20260311-M' );
     25define( 'ADSCALE_INTERNAL_MODULE_VERSION', 'v20260315-M' );
    2626define( 'ADSCALE_PLUGIN_DIR', __DIR__ );
    2727define( 'ADSCALE_PLUGIN_FILE', __FILE__ );
  • adscale-ai/trunk/src/PluginApi/Order.php

    r3482917 r3483168  
    5353   
    5454    public static function checkRequest() {
    55         // nosemgrep: scanner.php.wp.security.csrf.nonce-check-not-dying
     55
    5656        parent::checkRequest();
    57         // Nonce verification (accepts both query/body and two common names)
    58         $nonce = '';
    59         if ( isset( $_REQUEST['_wpnonce'] ) ) {
    60             $nonce = sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) );
    61         } elseif ( isset( $_REQUEST['adscale_nonce'] ) ) {
    62             $nonce = sanitize_text_field( wp_unslash( $_REQUEST['adscale_nonce'] ) );
    63         }
    64         if ( empty( $nonce ) ) {
    65             $nonce = (string) Helper::get_post_body_data_value( '_wpnonce', 'sanitize_text_field', '' );
    66         }
    67         if ( empty( $nonce ) ) {
    68             $nonce = (string) Helper::get_post_body_data_value( 'adscale_nonce', 'sanitize_text_field', '' );
    69         }
    70         if ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'adscale_order' ) ) {
    71             Helper::send_response_formatted_error(
    72                 self::makeErrorBody( 'N001', __( 'Invalid request', 'adscale-ai' ), 'Nonce verification failed' )
    73             );
    74         }
    7557        self::initParams();
    7658       
     
    11294     * Handle API request
    11395     *
     96     * @throws PluginApiException
    11497     */
    11598    public static function handleRequest() {
     
    168151     *
    169152     * @return array
     153     * @throws PluginApiException
    170154     */
    171155    public static function getOrderData( $order ) {
     
    327311     *
    328312     * @return array
     313     * @throws PluginApiException
    329314     */
    330315    public static function getOrderItemData( $order_item ) {
Note: See TracChangeset for help on using the changeset viewer.