HEX
Server: LiteSpeed
System: Linux premium263.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: eastcjee (525)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/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;
    }
}