HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/the-moneytizer/core/core_form.php
<?php
if(isset($_POST['themoneytizer_setting_token'])){
    $token = sanitize_text_field( wp_unslash( $_POST['themoneytizer_setting_token'] ) );

    $body = ['version' => get_option('themoneytizer_plugin_version')];
    $url = "https://www.themoneytizer.com/plugin/tokenValidation?token=$token";
    $res = (array) json_decode(post_req($url, $body));
    if($res['msg'] == 1){
        update_option("themoneytizer_user_logged","1");
        update_option("themoneytizer_setting_token",$token);
    } else {
        update_option("themoneytizer_user_logged","0");
        update_option("themoneytizer_setting_token","");
    }
    
    if(get_option("themoneytizer_user_logged")==1){
        if(get_option("themoneytizer_site_id")==''){
            /*
            * Init
            */
            $body = ['version' => get_option('themoneytizer_plugin_version'), 'action' => 'init'];
            $url = "https://www.themoneytizer.com/plugin/setWebsiteInformations?token=$token";
            post_req($url, $body);
        }
        $url = "https://www.themoneytizer.com/plugin/getSiteID?token=$token";
        $res = get_req($url);
        if($res['response']['code'] == 200){
            $res = (array) json_decode($res['body']);
            if($res['status'] == 'success'){
                update_option("themoneytizer_site_id", $res['message']);
            } else {
                update_option("themoneytizer_site_id", "");
            }
        }
    }
}