HEX
Server: Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
System: Linux server.mediaphic.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: bakeerca (1316)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system,show_source,mail,sendmail,popen,symlink,phpinfo
Upload Files
File: /home/bakeerca/public_html/wp-content/plugins/ninja-forms/includes/Admin/RestControllerSafeList.php
<?php

namespace NinjaForms\Includes\Admin;

/**
 * Configuration of what can be called and extended by NF_AJAX_REST_Controller
 */
class RestControllerSafeList
{

    const   ALLOWED_METHOD_CALLS = [
        'NF_AJAX_Controllers_Form' => [
            'delete'
        ],
        'NF_AJAX_REST_Forms' => [
            'delete'
        ]
    ];

    public static function isClassMethodAllowed(string $fqcn, string $method): bool
    {
        $return = false;

        if(isset(self::ALLOWED_METHOD_CALLS[$fqcn])
        && in_array($method,self::ALLOWED_METHOD_CALLS[$fqcn])
        ){
            $return = true;
        } 

        return $return;
    }
}