Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * This file is a part of the miniorange-saml-20-single-sign-on plugin. * ..

Decoded Output download

<?php 
/** 
 * This file is a part of the miniorange-saml-20-single-sign-on plugin. 
 * 
 * @link https://plugins.miniorange.com/ 
 * @author miniOrange 
 * @package miniorange-saml-20-single-sign-on 
 */ 
/* 
 * Plugin Name: miniOrange SAML SSO Multiple IDP 
 * Plugin URI: https://miniorange.com/ 
 * Description: (Single Site Multiple IdP)miniOrange SAML 2.0 SSO enables user to perform Single Sign On with any SAML 2.0 enabled Identity Provider. 
 * Version: 25.2.0 
 * Author: miniOrange 
 * Author URI: https://miniorange.com/ 
 */ 
 
 
define("MO_SAML_PLUGIN_DIR", dirname(__FILE__)); 
define("MO_SAML_OPTIONS_ENUM", "/includes/lib/mo-options-enum.php"); 
require_once MO_SAML_PLUGIN_DIR . MO_SAML_OPTIONS_ENUM; 
require Mo_Saml_Plugin_Files::MO_SAML_CLASS_CUSTOMER; 
require Mo_Saml_Plugin_Files::MO_SAML_SETTINGS_PAGE; 
require Mo_Saml_Plugin_Files::MO_SAML_METADATA_READER; 
require_once Mo_Saml_Plugin_Files::MO_SAML_PLUGIN_VERSION_UPDATE; 
require_once Mo_Saml_Plugin_Files::MO_SAML_ENVIRONMENT_UTILS; 
require_once Mo_Saml_Plugin_Files::MO_SAML_ENVIRONMENT_DAO; 
require_once Mo_Saml_Plugin_Files::MO_SAML_SSO_WIDGET; 
require_once Mo_Saml_Plugin_Files::MO_SAML_LICENSE_LIB_AUTOLOADER; 
require_once Mo_Saml_Plugin_Files::MO_SAML_XML_SEC_LIBS; 
require_once Mo_Saml_Plugin_Files::MO_SAML_USER_LOGOUT_HANDLER; 
require_once Mo_Saml_Plugin_Files::MO_SAML_METADATA_IMPORT_HANDLER; 
require_once Mo_Saml_Plugin_Files::MO_SAML_REDIRECTION_SSO_HANDLER; 
use RobRichards\XMLSecLibs\XMLSecurityKey; 
use RobRichards\XMLSecLibs\XMLSecurityDSig; 
use RobRichards\XMLSecLibs\XMLSecEnc; 
use MOSAML\LicenseLibrary\Classes\Mo_License_Library; 
use MOSAML\LicenseLibrary\Mo_License_Service; 
class Mo_SAML_Plugin 
{ 
    private $mo_saml_user_logout_handler; 
    private static $instance; 
    public static function mo_saml_get_object() 
    { 
        if (isset(self::$instance)) { 
            goto Jq; 
        } 
        $yS = __CLASS__; 
        self::$instance = new $yS(); 
        Jq: 
        return self::$instance; 
    } 
    function __construct() 
    { 
        if (!mo_saml_is_extension_installed("openssl")) { 
            goto hi; 
        } 
        new Mo_License_Library(); 
        hi: 
        add_action("admin_menu", array($this, "miniorange_sso_menu")); 
        add_action("admin_init", array($this, "mo_saml_do_plugin_extension_checks")); 
        add_action("admin_init", array($this, "miniorange_login_widget_saml_save_settings")); 
        add_action("admin_enqueue_scripts", array($this, "plugin_settings_style")); 
        register_activation_hook(__FILE__, array($this, "mo_sso_saml_activate")); 
        register_deactivation_hook(__FILE__, array($this, "mo_sso_saml_deactivate")); 
        add_action("admin_enqueue_scripts", array($this, "plugin_settings_script")); 
        remove_action("admin_notices", array($this, "mo_saml_success_message")); 
        remove_action("admin_notices", array($this, "mo_saml_error_message")); 
        add_filter("authenticate", array($this, "mo_saml_authenticate"), 30, 3); 
        add_action("wp_authenticate", array($this, "mo_saml_redirect_to_idp_list_page_from_login_page")); 
        add_action("wp", array($this, "mo_saml_auto_redirect")); 
        $vP = Mo_SAML_Login_Widget::mo_saml_get_object(); 
        add_action("init", array($vP, "mo_saml_widget_init")); 
        add_action("login_form", array($this, "mo_saml_modify_login_form"), 10, 1); 
        add_action("login_form", array($this, "mo_saml_add_login_links"), 15, 1); 
        add_shortcode("MO_SAML_LOGIN", array($this, "mo_get_saml_login_shortcode")); 
        add_shortcode("MO_SAML_IDP_LIST", array($this, "mo_get_saml_idp_list_shortcode")); 
        add_shortcode("MO_SAML_FORM", array($this, "mo_saml_get_idp_shortcode")); 
        add_action("init", array($this, "mo_saml_init_login_form")); 
        add_action("login_footer", array($this, "mo_saml_footer_form")); 
        add_action("login_enqueue_scripts", array($this, "mo_saml_jquery_default_login")); 
        add_filter("cron_schedules", array($this, "myprefix_add_cron_schedule")); 
        add_action("metadata_sync_cron_action", array($this, "metadata_sync_cron_action"), 10, 1); 
        add_action("admin_init", array($this, "default_certificate")); 
        add_filter("manage_users_columns", array($this, "mo_saml_custom_attr_column")); 
        add_filter("manage_users_custom_column", array($this, "mo_saml_attr_column_content"), 1, 3); 
        add_action("admin_init", "mo_saml_download"); 
        global $wp_version; 
        $this->mo_saml_user_logout_handler = Mo_Saml_User_Logout_Handler::mo_saml_get_object(); 
        if ((float) $wp_version < 5.5 && (float) $wp_version > 5.2) { 
            goto EP; 
        } 
        add_action("wp_logout", array($this->mo_saml_user_logout_handler, "mo_saml_logout_user"), 1, 1); 
        goto Q0; 
        EP: 
        add_filter("logout_redirect", array($this, "mo_saml_logout_broker_with_filter"), 10, 3); 
        Q0: 
        add_filter("login_errors", array($this, "mo_saml_custom_login_error_message")); 
        add_action("wp_ajax_mo_saml_change_environment", array($this, "mo_saml_ajax_call_handler")); 
        add_action("init", array("Migrate_Environment_Settings", "mo_saml_migrate_environment_settings")); 
        add_filter("safe_style_css", array($this, "mo_saml_load_safe_css")); 
    } 
    function mo_saml_load_safe_css($cw) 
    { 
        $cw[] = "display"; 
        return $cw; 
    } 
    public function mo_saml_do_plugin_extension_checks() 
    { 
        $Gr = Mo_Saml_Plugin_Pages::PLUGIN_PAGES; 
        if (!(!(!empty($_GET["page"]) && in_array($_GET["page"], $Gr)) && current_user_can("manage_options"))) { 
            goto f3; 
        } 
        add_action("admin_notices", array($this, "show_disabled_extension_notice")); 
        f3: 
    } 
    function mo_saml_ajax_call_handler() 
    { 
        if (!(current_user_can("manage_options") && Mo_License_Service::is_customer_license_valid())) { 
            goto ym; 
        } 
        update_option("mo_saml_selected_environment", EnvironmentHelper::getCurrentEnvironment()); 
        wp_send_json_success(); 
        ym: 
        wp_send_json_error(); 
    } 
    function mo_saml_custom_login_error_message($NG) 
    { 
        global $errors; 
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_domain_mapping", false, EnvironmentHelper::getCurrentEnvironment()); 
        if (!("true" === $LM && !empty($errors) && (SAMLSPUtilities::mo_saml_in_array("invalid_email", $errors->get_error_codes()) || SAMLSPUtilities::mo_saml_in_array("incorrect_password", $errors->get_error_codes())))) { 
            goto oV; 
        } 
        $NG = " The entered email address or password is incorrect. Please enter a valid email address or password."; 
        oV: 
        return $NG; 
    } 
    function mo_saml_logout_broker_with_filter($B3, $Zb, $user) 
    { 
        $this->mo_saml_user_logout_handler->mo_saml_logout_user($user->ID, $B3); 
    } 
    function mo_sso_saml_activate() 
    { 
        $this->mo_saml_sso_fetch_exisitng_configuration(); 
        if (!(get_option("mo_saml_keep_settings_on_deletion") == false)) { 
            goto rv; 
        } 
        add_option("mo_saml_keep_settings_on_deletion", "true"); 
        rv: 
    } 
    function show_disabled_extension_notice() 
    { 
        $iA = SAMLSPUtilities::mo_saml_get_disabled_extensions(); 
        if (empty($iA)) { 
            goto Es; 
        } 
        $Oa = implode(", ", $iA); 
        echo "
\xa\x9\x9        <div class="notice notice-warning mo_saml_trial_notice_banner">
                    <div style="display: flex;justify-content: left;margin: 4px">\xd\xa\x9\x9	\x9\x9<img src="" . esc_attr(plugin_dir_url(__FILE__)) . "images/miniorange-logo.png" width="40px" height="40px">\xd
\x9	\x9\x9\x9<span style="padding: 6px;"><span style="color: red;font-weight: bold">Warning:</span> Following PHP extensions (<i style="font-weight: bold">" . esc_attr($Oa) . "</i>) are disabled which are important for SSO configuration. Please enable these extensions to continue using SSO on your site.</span></br>
                    </div>"; 
        echo "</span></div>"; 
        Es: 
    } 
    function mo_saml_sso_fetch_exisitng_configuration() 
    { 
        $eu = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, EnvironmentHelper::getCurrentEnvironment()); 
        if (!(empty($eu) && !empty(get_option("saml_identity_name")))) { 
            goto RZ; 
        } 
        $this->fetch_existing_saml_idp_config(); 
        RZ: 
    } 
    function fetch_existing_saml_idp_config() 
    { 
        $eu = array(); 
        $Le = get_option("saml_identity_name"); 
        $qC = get_option("saml_login_url"); 
        $gz = get_option("saml_issuer"); 
        $BZ = !empty(get_option("mo_saml_encoding_enabled")) ? get_option("mo_saml_encoding_enabled") : "checked"; 
        $UX = !empty(get_option("mo_saml_assertion_time_validity")) ? get_option("mo_saml_assertion_time_validity") : "checked"; 
        $x_ = get_option("saml_x509_certificate"); 
        $x6 = get_option("saml_login_binding_type"); 
        $pE = get_option("saml_logout_url"); 
        $QO = get_option("saml_logout_binding_type"); 
        $KR = get_option("saml_nameid_format"); 
        $Kt = !empty(get_option("saml_request_signed")) ? get_option("saml_request_signed") : "unchecked"; 
        $d9 = "Yes"; 
        $wh = "Yes"; 
        $ny = get_option("saml_am_default_user_role"); 
        $eu[$Le] = array("idp_name" => $Le, "idp_entity_id" => $gz, "sso_url" => $qC, "sso_binding_type" => $x6, "slo_url" => $pE, "slo_binding_type" => $QO, "x509_certificate" => $x_, "response_signed" => $d9, "assertion_signed" => $wh, "request_signed" => $Kt, "nameid_format" => $KR, "mo_saml_encoding_enabled" => $BZ, "mo_saml_assertion_time_validity" => $UX, "enable_idp" => true); 
        $hr[$Le]["default_role"] = $ny; 
        if (empty($eu[''])) { 
            goto wD; 
        } 
        unset($eu['']); 
        wD: 
        $vN = new EnvironmentDao(EnvironmentHelper::getCurrentEnvironment()); 
        $vN->mo_save_environment_settings("saml_identity_providers", $eu); 
        $vN->mo_save_environment_settings("saml_idp_role_mapping", $hr); 
        $vN->mo_save_environment_settings("saml_default_idp", $Le); 
        delete_option("saml_identity_name"); 
        delete_option("saml_login_url"); 
        delete_option("mo_saml_encoding_enabled"); 
        delete_option("saml_issuer"); 
        delete_option("saml_x509_certificate"); 
        delete_option("saml_login_binding_type"); 
        delete_option("saml_logout_url"); 
        delete_option("saml_logout_binding_type"); 
        delete_option("saml_nameid_format"); 
        delete_option("saml_am_default_user_role"); 
        delete_option("saml_request_signed"); 
    } 
    function handle_environment_migration() 
    { 
        $aQ = EnvironmentHelper::getPluginConfiguration(EnvironmentHelper::getCurrentEnvironment()); 
        if (!is_array($aQ)) { 
            goto e6; 
        } 
        foreach ($aQ as $ni => $SE) { 
            update_option($ni, $SE); 
            ae: 
        } 
        OJ: 
        e6: 
    } 
    function default_certificate() 
    { 
        $mF = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PUBLIC_CERT_FILE_NAME); 
        $Lu = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME); 
        if (!(!get_option("mo_saml_current_cert") && !get_option("mo_saml_current_cert_private_key"))) { 
            goto bF; 
        } 
        if (get_option("mo_saml_cert") && get_option("mo_saml_cert_private_key")) { 
            goto pf; 
        } 
        update_option("mo_saml_current_cert", $mF); 
        update_option("mo_saml_current_cert_private_key", $Lu); 
        goto dD; 
        pf: 
        update_option("mo_saml_current_cert", get_option("mo_saml_cert")); 
        update_option("mo_saml_current_cert_private_key", get_option("mo_saml_cert_private_key")); 
        dD: 
        bF: 
    } 
    function myprefix_add_cron_schedule($Pq) 
    { 
        $Pq["weekly"] = array("interval" => 604800, "display" => __("Once Weekly")); 
        $Pq["monthly"] = array("interval" => 2629746, "display" => __("Once Monthly")); 
        return $Pq; 
    } 
    function mo_saml_custom_attr_column($uU) 
    { 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $dY = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_custom_attrs_mapping", true, $ha); 
        $dY = maybe_unserialize($dY); 
        $p1 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_attrs_to_display_idp", true, $ha); 
        $BT = 0; 
        foreach ($dY as $ni => $SE) { 
            if (!is_array($SE)) { 
                goto TB; 
            } 
            foreach ($SE as $L_ => $ce) { 
                if (empty($L_)) { 
                    goto sh; 
                } 
                if (!(!empty($p1[$ni]) && SAMLSPUtilities::mo_saml_in_array($BT, $p1[$ni]))) { 
                    goto lN; 
                } 
                $uU[$L_] = $L_; 
                lN: 
                sh: 
                $BT++; 
                XB: 
            } 
            Nh: 
            TB: 
            xY: 
        } 
        gt: 
        return $uU; 
    } 
    function mo_saml_attr_column_content($qq, $ip, $xs) 
    { 
        $dY = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_custom_attrs_mapping", true, EnvironmentHelper::getCurrentEnvironment()); 
        foreach ($dY as $tX => $Wz) { 
            foreach ($Wz as $ni => $SE) { 
                if (!($ni === $ip)) { 
                    goto pg; 
                } 
                $cq = get_user_meta($xs, $ip, false); 
                if (empty($cq)) { 
                    goto Ii; 
                } 
                if (!is_array($cq[0])) { 
                    goto h_; 
                } 
                $Mp = ''; 
                foreach ($cq[0] as $ce) { 
                    $Mp = $Mp . $ce; 
                    if (!next($cq[0])) { 
                        goto zY; 
                    } 
                    $Mp = $Mp . " | "; 
                    zY: 
                    Ta: 
                } 
                zM: 
                $Mp = map_deep(wp_unslash($Mp), "esc_html"); 
                return $Mp; 
                goto FL; 
                h_: 
                return esc_html($cq[0]); 
                FL: 
                Ii: 
                pg: 
                Bm: 
            } 
            co: 
            YV: 
        } 
        nj: 
        return $qq; 
    } 
    function metadata_sync_cron_action($fx) 
    { 
        $SG = ini_get("max_execution_time"); 
        $SG = !empty($SG) ? intval($SG) : 30; 
        set_time_limit(0); 
        error_log("miniorange : RAN SYNC - " . time() . $fx); 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Zo = EnvironmentHelper::getOptionForSelectedEnvironment("saml_metadata_url_for_sync", true, $ha); 
        $ow = ''; 
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp", false, $ha); 
        $KI = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha)); 
        if (!empty($Zo)) { 
            goto Ge; 
        } 
        wp_unschedule_event(wp_next_scheduled("metadata_sync_cron_action"), "metadata_sync_cron_action"); 
        goto HU; 
        Ge: 
        if (!(!empty($Zo[$fx]) and !empty($KI[$fx]))) { 
            goto nF; 
        } 
        $ow = $Zo[$fx]["metadata_url"]; 
        $YD = $Zo[$fx]["sync_certificate_metadata"] === "checked" ? true : false; 
        $od = wp_remote_get($ow); 
        $od = is_wp_error($od) || empty($od["body"]) ? '' : $od["body"]; 
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object(); 
        $fS->mo_saml_upload_metadata($od, $fx, $YD); 
        nF: 
        HU: 
        $vN = new EnvironmentDao($ha); 
        $vN->mo_save_environment_settings("saml_default_idp", $vu); 
        set_time_limit($SG); 
    } 
    function mo_login_widget_saml_options() 
    { 
        global $wpdb; 
        update_option("mo_saml_host_name", "https://login.xecurify.com"); 
        $oN = get_option("mo_saml_host_name"); 
        mo_register_saml_sso(); 
    } 
    function mo_saml_success_message() 
    { 
        $yS = "error"; 
        $s8 = get_option("mo_saml_message"); 
        echo "<div class='" . $yS . "'> <p>" . $s8 . "</p></div>"; 
    } 
    function mo_saml_error_message() 
    { 
        $yS = "updated"; 
        $s8 = get_option("mo_saml_message"); 
        echo "<div class='" . $yS . "'> <p>" . $s8 . "</p></div>"; 
    } 
    public function mo_sso_saml_deactivate() 
    { 
        if (!is_multisite()) { 
            goto oZ; 
        } 
        global $wpdb; 
        $yR = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}"); 
        $eh = get_current_blog_id(); 
        foreach ($yR as $blog_id) { 
            switch_to_blog($blog_id); 
            if (!get_option("sml_lk")) { 
                goto Rt; 
            } 
            $V3 = new Customersaml(); 
            $V3->mo_saml_update_key_status($this); 
            Rt: 
            delete_option("mo_saml_new_registration"); 
            delete_option("mo_saml_admin_phone"); 
            delete_option("mo_saml_admin_password"); 
            delete_option("mo_saml_verify_customer"); 
            delete_option("mo_saml_admin_customer_key"); 
            delete_option("mo_saml_admin_api_key"); 
            delete_option("mo_saml_customer_token"); 
            delete_option("mo_saml_message"); 
            delete_option("mo_saml_registration_status"); 
            delete_option("mo_saml_idp_config_complete"); 
            delete_option("mo_saml_transactionId"); 
            delete_option("sml_lk"); 
            delete_option("no_of_sp"); 
            R_: 
        } 
        jb: 
        switch_to_blog($eh); 
        goto Jo; 
        oZ: 
        if (!get_option("sml_lk")) { 
            goto xX; 
        } 
        $V3 = new Customersaml(); 
        $V3->mo_saml_update_key_status($this); 
        xX: 
        delete_option("mo_saml_new_registration"); 
        delete_option("mo_saml_admin_phone"); 
        delete_option("mo_saml_admin_password"); 
        delete_option("mo_saml_verify_customer"); 
        delete_option("mo_saml_admin_customer_key"); 
        delete_option("mo_saml_admin_api_key"); 
        delete_option("mo_saml_customer_token"); 
        delete_option("mo_saml_message"); 
        delete_option("mo_saml_registration_status"); 
        delete_option("mo_saml_idp_config_complete"); 
        delete_option("mo_saml_transactionId"); 
        delete_option("sml_lk"); 
        delete_option("no_of_sp"); 
        Jo: 
    } 
    function plugin_settings_style($jy) 
    { 
        if (!("toplevel_page_mo_saml_settings" != $jy && "miniorange-saml-2-0-sso_page_mo_saml_federation_sso" != $jy && "miniorange-saml-2-0-sso_page_mo_error_codes" !== $jy && "miniorange-saml-2-0-sso_page_mo_multiple_environment" != $jy)) { 
            goto x2; 
        } 
        return; 
        x2: 
        if (!empty($_REQUEST["tab"]) && $_REQUEST["tab"] == "licensing") { 
            goto so; 
        } 
        wp_enqueue_style("mo_saml_bootstrap_css", plugins_url("includes/css/bootstrap/bootstrap-toggle.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_style("mo_saml_admin_settings_style_tracker", plugins_url("includes/css/progress-tracker.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_style("mo_saml_admin_settings_phone_style", plugins_url("includes/css/phone.min.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_style("mo_saml_manage_license_settings_style", plugins_url("EnvironmentUtils/views/EnvironmentView.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_style("mo_saml_wpb-fa", plugins_url("includes/css/font-awesome.min.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        goto tp; 
        so: 
        wp_enqueue_style("mo_saml_bootstrap_css_license", plugins_url("includes/css/bootstrap/bootstrap.min.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        tp: 
        wp_enqueue_style("mo_saml_admin_settings_style", plugins_url("includes/css/style_settings.min.css", __FILE__), array(), mo_options_plugin_constants::VERSION); 
    } 
    function plugin_settings_script($jy) 
    { 
        if (!("toplevel_page_mo_saml_settings" != $jy && "miniorange-saml-2-0-sso_page_mo_saml_federation_sso" != $jy && "miniorange-saml-2-0-sso_page_mo_error_codes" !== $jy && "miniorange-saml-2-0-sso_page_mo_multiple_environment" != $jy)) { 
            goto hQ; 
        } 
        return; 
        hQ: 
        wp_enqueue_script("mo_saml_admin_settings_color_script", plugins_url("includes/js/jscolor/jscolor.js", __FILE__), array(), mo_options_plugin_constants::VERSION, false); 
        if (!empty($_REQUEST["tab"]) && $_REQUEST["tab"] == "licensing") { 
            goto yl; 
        } 
        wp_enqueue_script("jquery"); 
        wp_enqueue_script("mo_saml_bootstrap_script", plugins_url("includes/js/bootstrap/bootstrap_toggle.min.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_script("mo_saml_admin_settings_phone_script", plugins_url("includes/js/phone.min.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        goto QX; 
        yl: 
        wp_enqueue_script("mo_saml_modernizr_script", plugins_url("includes/js/modernizr.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_script("mo_saml_popover_script", plugins_url("includes/js/bootstrap/popper.min.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        wp_enqueue_script("mo_saml_bootstrap_script", plugins_url("includes/js/bootstrap/bootstrap.min.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
        QX: 
        wp_enqueue_script("mo_saml_admin_settings_script", plugins_url("includes/js/settings.min.js", __FILE__), array(), mo_options_plugin_constants::VERSION); 
    } 
    static function mo_check_option_admin_referer($UG) 
    { 
        return !empty($_POST["option"]) and $_POST["option"] == $UG and check_admin_referer($UG); 
    } 
    function miniorange_login_widget_saml_save_settings() 
    { 
        if (!current_user_can("manage_options")) { 
            goto cH; 
        } 
        $vN = new EnvironmentDao(); 
        $vQ = call_user_func("Mo_Saml_Admin_Referer_Options::getConstants"); 
        if (!(!empty(EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_state)) && empty(EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_states, true)))) { 
            goto BO; 
        } 
        $SP = array(); 
        $SP["login_relay_state"]["DEFAULT"] = EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_state); 
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_states, $SP); 
        BO: 
        if (!(isset($_POST["option"]) && in_array($_POST["option"], $vQ) && !Mo_License_Service::is_customer_license_valid())) { 
            goto CL; 
        } 
        update_option("mo_saml_message", "Something went wrong while processing this request."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        CL: 
        if (!self::mo_check_option_admin_referer("mo_multiple_environment")) { 
            goto gW; 
        } 
        if (array_key_exists("mo_enable_multiple_licenses", $_POST)) { 
            goto re; 
        } 
        $this->handle_environment_migration(); 
        delete_option("mo_enable_multiple_licenses"); 
        update_option("mo_saml_message", "Multiple Environments disabled."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        goto UK; 
        re: 
        update_option("mo_enable_multiple_licenses", "checked"); 
        $pn = isset($_POST["copy_existing_configurations"]) ? $_POST["copy_existing_configurations"] : false; 
        if ("checked" === $pn) { 
            goto e5; 
        } 
        initializeEnvironmentObjectArray(); 
        goto R1; 
        e5: 
        Migrate_Environment_Settings::mo_saml_copy_existing_configurations(); 
        R1: 
        delete_option("mo_saml_environment_objects_premium"); 
        update_option("mo_saml_message", "Multiple Environments enabled."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        UK: 
        gW: 
        if (!self::mo_check_option_admin_referer("mo_adding_alternate_environments")) { 
            goto ZI; 
        } 
        if (updateEnvironmentObjects($_POST)) { 
            goto NJ; 
        } 
        update_option("mo_saml_message", "Your changes were not saved. Please provide unique values for your environments and don't remove the current environment"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto Cm; 
        NJ: 
        update_option("mo_saml_message", "Environments updated successfully"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Cm: 
        ZI: 
        if (!self::mo_check_option_admin_referer("mo_change_environment")) { 
            goto Pb; 
        } 
        update_option("mo_saml_selected_environment", $_POST["environment"]); 
        update_option("mo_saml_message", "Environment changed successfully"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Pb: 
        if (!self::mo_check_option_admin_referer("login_widget_saml_save_settings")) { 
            goto Hv; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto p5; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Save Identity Provider Configuration failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        p5: 
        $hh = $_POST["saml_save_settings_action"]; 
        $Le = ''; 
        $x6 = ''; 
        $qC = ''; 
        $QO = ''; 
        $pE = ''; 
        $gz = ''; 
        $x_ = ''; 
        $KR = ''; 
        $d9 = "Yes"; 
        $wh = "Yes"; 
        $JN = ''; 
        $Kt = "unchecked"; 
        $Re = "checked"; 
        $UX = "checked"; 
        if (empty($_POST["saml_edit_idp_name"])) { 
            goto Cv; 
        } 
        $JN = trim($_POST["saml_edit_idp_name"]); 
        Cv: 
        if (!(isset($_POST["saml_identity_name"]) && !preg_match("#^(?!^\d+$)[_a-zA-Z0-9]+$|^[_a-zA-Z][_a-zA-Z0-9]*$#", $_POST["saml_identity_name"]))) { 
            goto ZY; 
        } 
        update_option("mo_saml_message", "Please match the requested format for Identity Provider Name. Only alphabets, numbers and underscore is allowed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        ZY: 
        if ($hh != "delete" && $hh != "custom" && (empty($_POST["saml_identity_name"]) || empty($_POST["saml_login_url"]) || empty($_POST["saml_issuer"]))) { 
            goto xy; 
        } 
        if ($hh != "delete" && $hh != "custom") { 
            goto tW; 
        } 
        goto H9; 
        xy: 
        update_option("mo_saml_message", "All the fields are required. Please enter valid entries."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto H9; 
        tW: 
        $JN = sanitize_text_field($_POST["saml_edit_idp_name"]); 
        $Le = sanitize_text_field($_POST["saml_identity_name"]); 
        $qC = esc_url_raw(filter_var($_POST["saml_login_url"], FILTER_SANITIZE_URL)); 
        $xe = sanitize_text_field($_POST["saml_sp_entity_id"]); 
        $Yv = sanitize_text_field($_POST["saml_identity_provider_guide_name"]); 
        if (empty($_POST["saml_login_binding_type"])) { 
            goto qv; 
        } 
        $x6 = sanitize_text_field($_POST["saml_login_binding_type"]); 
        qv: 
        if (empty($_POST["saml_logout_binding_type"])) { 
            goto su; 
        } 
        $QO = sanitize_text_field($_POST["saml_logout_binding_type"]); 
        su: 
        $KR = sanitize_text_field($_POST["saml_nameid_format"]); 
        if (!empty($_POST["enable_iconv"])) { 
            goto YN; 
        } 
        $Re = ''; 
        goto T4; 
        YN: 
        $Re = "checked"; 
        T4: 
        if (!empty($_POST["mo_saml_assertion_time_validity"])) { 
            goto PG; 
        } 
        $UX = "unchecked"; 
        PG: 
        if (empty($_POST["saml_logout_url"])) { 
            goto Eu; 
        } 
        $pE = esc_url_raw(filter_var($_POST["saml_logout_url"], FILTER_SANITIZE_URL)); 
        Eu: 
        if (!array_key_exists("saml_pw_reset_url", $_POST)) { 
            goto sK; 
        } 
        $Fu = esc_url_raw(filter_var($_POST["saml_pw_reset_url"], FILTER_SANITIZE_URL)); 
        sK: 
        $gz = sanitize_text_field($_POST["saml_issuer"]); 
        $x_ = $_POST["saml_x509_certificate"]; 
        if (empty($_POST["saml_response_signed"])) { 
            goto X5; 
        } 
        $d9 = "checked"; 
        X5: 
        if (empty($_POST["saml_assertion_signed"])) { 
            goto pj; 
        } 
        $wh = "checked"; 
        pj: 
        if (empty($_POST["saml_request_signed"])) { 
            goto rG; 
        } 
        $Kt = "checked"; 
        rG: 
        H9: 
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        if ($hh == "add" && !empty($KI[$Le])) { 
            goto wZ; 
        } 
        if ($hh == "edit" && !empty($KI[$JN]) || $hh == "add") { 
            goto Oj; 
        } 
        if ($hh == "custom" && !empty($KI[$JN])) { 
            goto MV; 
        } 
        if (!($hh == "delete" && !empty($KI[$JN]))) { 
            goto w6; 
        } 
        $vu = isset($_POST["mo_saml_selected_default_idp"]) ? sanitize_text_field($_POST["mo_saml_selected_default_idp"]) : ''; 
        $Gm = isset($_GET["idp"]) ? sanitize_text_field($_GET["idp"]) : ''; 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp") === $Gm)) { 
            goto Wc; 
        } 
        if (!empty($vu) && array_key_exists($vu, $KI) && $KI[$vu]["enable_idp"]) { 
            goto GN; 
        } 
        if (!(count($KI) > 1)) { 
            goto dE; 
        } 
        update_option("mo_saml_message", "Select the default IDP from dropdown before deleting the IDP"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        dE: 
        goto Pn; 
        GN: 
        $vN->mo_save_environment_settings("saml_default_idp", $vu); 
        Pn: 
        Wc: 
        unset($KI[$JN]); 
        $KI = array_filter($KI, "filter_empty_values"); 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp") == $JN)) { 
            goto Ox; 
        } 
        $vN->mo_save_environment_settings("saml_default_idp", ''); 
        Ox: 
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_role_mapping", true); 
        $k1 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_attribute_mapping", true); 
        $Rx = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_custom_attrs_mapping", true); 
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_domain_mapping", true); 
        $H0 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("saml_sso_button_idp", true)); 
        if (!array_key_exists($JN, $H0)) { 
            goto jW; 
        } 
        unset($H0[$JN]); 
        $H0 = array_filter($H0, "filter_empty_values"); 
        jW: 
        $bK = EnvironmentHelper::getOptionForSelectedEnvironment("saml_button_idp_name"); 
        if (!(!empty($bK) && $bK == $JN)) { 
            goto o9; 
        } 
        $bK = "DEFAULT"; 
        o9: 
        if (empty($Tj[$JN])) { 
            goto P4; 
        } 
        unset($Tj[$JN]); 
        $Tj = array_filter($Tj, "filter_empty_values"); 
        P4: 
        if (empty($k1[$JN])) { 
            goto q6; 
        } 
        unset($k1[$JN]); 
        $k1 = array_filter($k1, "filter_empty_values"); 
        q6: 
        if (empty($Rx[$JN])) { 
            goto Bn; 
        } 
        unset($Rx[$JN]); 
        $Rx = array_filter($Rx, "filter_empty_values"); 
        Bn: 
        if (empty($LM[$JN])) { 
            goto E_; 
        } 
        unset($LM[$JN]); 
        $LM = array_filter($LM, "filter_empty_values"); 
        E_: 
        $vN->mo_save_environment_settings("saml_sso_button_idp", $H0); 
        $vN->mo_save_environment_settings("saml_button_idp_name", $bK); 
        $vN->mo_save_environment_settings("saml_identity_providers", $KI); 
        if (!empty($KI)) { 
            goto y9; 
        } 
        $vN->mo_save_environment_settings("mo_saml_enable_domain_mapping", "false"); 
        y9: 
        $vN->mo_save_environment_settings("saml_idp_role_mapping", $Tj); 
        $vN->mo_save_environment_settings("saml_idp_attribute_mapping", $k1); 
        $vN->mo_save_environment_settings("mo_saml_custom_attrs_mapping", $Rx); 
        $vN->mo_save_environment_settings("saml_idp_domain_mapping", $LM); 
        update_option("mo_saml_message", "<em>" . $JN . "</em> deleted successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        w6: 
        goto nc; 
        MV: 
        $Vz = sanitize_text_field($_POST["mo_saml_custom_login_text"]); 
        $yM = sanitize_text_field($_POST["mo_saml_custom_greeting_text"]); 
        $xU = sanitize_text_field($_POST["mo_saml_greeting_name"]); 
        $nf = sanitize_text_field($_POST["mo_saml_custom_logout_text"]); 
        $Uv = array("custom_login_text" => $Vz, "custom_greeting_text" => $yM, "greeting_name" => $xU, "custom_logout_text" => $nf); 
        $Bw = !empty($_POST["mo_saml_apply_widget_config_to_all_idps"]) ? "true" : "false"; 
        if ($Bw == "true") { 
            goto my; 
        } 
        $KI[$JN] = SAMLSPUtilities::mo_saml_array_merge($KI[$JN], $Uv); 
        goto y2; 
        my: 
        $KI[$JN]["custom_login_text"] = $Vz; 
        foreach ($KI as $ni => $SE) { 
            $KI[$ni]["custom_greeting_text"] = $yM; 
            $KI[$ni]["greeting_name"] = $xU; 
            $KI[$ni]["custom_logout_text"] = $nf; 
            Zr: 
        } 
        gG: 
        y2: 
        $KI = array_filter($KI, "filter_empty_values"); 
        $vN->mo_save_environment_settings("saml_identity_providers", $KI); 
        $vN->mo_save_environment_settings("mo_saml_apply_widget_config_to_all_idps", $Bw); 
        update_option("mo_saml_message", "Custom Widget details saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        nc: 
        goto AV; 
        Oj: 
        $Vz = !empty($KI[$Le]["custom_login_text"]) ? $KI[$Le]["custom_login_text"] : ''; 
        $yM = !empty($KI[$Le]["custom_greeting_text"]) ? $KI[$Le]["custom_greeting_text"] : ''; 
        $xU = !empty($KI[$Le]["greeting_name"]) ? $KI[$Le]["greeting_name"] : ''; 
        $nf = !empty($KI[$Le]["custom_logout_text"]) ? $KI[$Le]["custom_logout_text"] : ''; 
        $qV = !empty($KI[$Le]["saml_request"]) ? $KI[$Le]["saml_request"] : ''; 
        $gs = !empty($KI[$Le]["saml_response"]) ? $KI[$Le]["saml_response"] : ''; 
        $VI = !empty($KI[$Le]["test_status"]) ? $KI[$Le]["test_status"] : ''; 
        $Uv = array("custom_login_text" => sanitize_text_field($Vz), "custom_greeting_text" => sanitize_text_field($yM), "greeting_name" => sanitize_text_field($xU), "custom_logout_text" => sanitize_text_field($nf)); 
        $I_ = array("saml_request" => $qV, "saml_response" => $gs, "test_status" => $VI); 
        $Ij = isset($KI[$JN]) ? $KI[$JN]["enable_idp"] : true; 
        unset($KI[$JN]); 
        if (is_array($x_)) { 
            goto j0; 
        } 
        $x_ = trim($x_); 
        goto No; 
        j0: 
        foreach ($x_ as $ni => $SE) { 
            $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE); 
            if (@openssl_x509_read($x_[$ni])) { 
                goto Op; 
            } 
            update_option("mo_saml_message", "Invalid certificate: Please provide a valid certificate."); 
            SAMLSPUtilities::mo_saml_show_error_message(); 
            return; 
            Op: 
            by: 
        } 
        vt: 
        No: 
        if (!empty($x_)) { 
            goto Rl; 
        } 
        update_option("mo_saml_message", "Invalid certificate: Please provide a valid certificate."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Rl: 
        $KI[$Le] = array("idp_name" => sanitize_text_field($Le), "idp_entity_id" => sanitize_text_field($gz), "saml_sp_entity_id" => sanitize_text_field($xe), "sso_url" => esc_url_raw($qC), "sso_binding_type" => sanitize_text_field($x6), "slo_url" => esc_url_raw($pE), "slo_binding_type" => sanitize_text_field($QO), "x509_certificate" => $x_, "response_signed" => sanitize_text_field($d9), "assertion_signed" => sanitize_text_field($wh), "request_signed" => sanitize_text_field($Kt), "nameid_format" => sanitize_text_field($KR), "mo_saml_encoding_enabled" => sanitize_text_field($Re), "mo_saml_assertion_time_validity" => sanitize_text_field($UX), "saml_identity_provider_guide_name" => sanitize_text_field($Yv), "saml_pw_reset_url" => esc_url_raw($Fu), "enable_idp" => $Ij); 
        $KI[$Le] = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $Uv); 
        $KI[$Le] = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $I_); 
        $KI = array_filter($KI, "filter_empty_values"); 
        $vN->mo_save_environment_settings("saml_identity_providers", $KI); 
        if (!(count($KI) == 1)) { 
            goto H3; 
        } 
        $vN->mo_save_environment_settings("saml_default_idp", $Le); 
        H3: 
        update_option("mo_saml_message", "Identity Provider details saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        AV: 
        goto qm; 
        wZ: 
        update_option("mo_saml_message", "Identity Provider with <em>" . $Le . "</em> already exits. Try another name."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        qm: 
        Hv: 
        if (!self::mo_check_option_admin_referer("mo_attr_mapping_idp_name")) { 
            goto XV; 
        } 
        if (empty($_REQUEST["attribute_mapping_idp_name"])) { 
            goto Ij; 
        } 
        $fx = $_REQUEST["attribute_mapping_idp_name"]; 
        $vN->mo_save_environment_settings("mo_saml_attr_mapping_idp_name", $fx); 
        Ij: 
        XV: 
        if (!self::mo_check_option_admin_referer("login_widget_saml_attribute_mapping")) { 
            goto v2; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto DW; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Save Attribute Mapping failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        DW: 
        $KI = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true)); 
        $KI = maybe_unserialize($KI); 
        $k1 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_attribute_mapping", true); 
        $k1 = maybe_unserialize($k1); 
        $fx = $_POST["attribute_mapping_idp_name"]; 
        if (!empty($k1["DEFAULT"])) { 
            goto zd; 
        } 
        $k1["DEFAULT"] = array(); 
        zd: 
        $eL = $k1; 
        if (!(!empty($KI[$fx]) || $fx == "DEFAULT")) { 
            goto lA; 
        } 
        if (!empty(trim($_POST["saml_am_username"])) && !empty(trim($_POST["saml_am_email"]))) { 
            goto oA; 
        } 
        update_option("mo_saml_message", "Please provide a valid value for username and email."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto vg; 
        oA: 
        $k1[$fx]["username"] = trim(stripslashes($_POST["saml_am_username"])); 
        $k1[$fx]["email"] = trim(stripslashes($_POST["saml_am_email"])); 
        $k1[$fx]["first_name"] = trim(stripslashes($_POST["saml_am_first_name"])); 
        $k1[$fx]["last_name"] = trim(stripslashes($_POST["saml_am_last_name"])); 
        $k1[$fx]["group_name"] = trim(stripslashes($_POST["saml_am_group_name"])); 
        $k1[$fx]["display_name"] = stripslashes($_POST["saml_am_display_name"]); 
        vg: 
        lA: 
        if (!($fx == "DEFAULT")) { 
            goto j2; 
        } 
        if (!(!empty($KI) and is_array($KI))) { 
            goto Ss; 
        } 
        foreach ($KI as $bh) { 
            $tX = $bh["idp_name"]; 
            if (!(empty($k1[$tX]) || $k1[$tX] === $eL["DEFAULT"])) { 
                goto U1; 
            } 
            $k1[$tX] = $k1["DEFAULT"]; 
            U1: 
            Hh: 
        } 
        jz: 
        Ss: 
        j2: 
        $vN->mo_save_environment_settings("saml_idp_attribute_mapping", $k1); 
        $Lw = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_custom_attrs_mapping", true); 
        $Lw = maybe_unserialize($Lw); 
        if (!empty($Lw["DEFAULT"])) { 
            goto f_; 
        } 
        $Lw["DEFAULT"] = array(); 
        f_: 
        $X9 = $Lw; 
        $dY = array(); 
        $dg = array(); 
        $Wz = array(); 
        $KD = array(); 
        if (empty($_POST["mo_saml_custom_attribute_keys"])) { 
            goto up; 
        } 
        $dg = array_map("trim", $_POST["mo_saml_custom_attribute_keys"]); 
        up: 
        if (empty($_POST["mo_saml_custom_attribute_values"])) { 
            goto Pm; 
        } 
        $Wz = array_map("trim", $_POST["mo_saml_custom_attribute_values"]); 
        Pm: 
        $J4 = count($dg); 
        if (!($J4 > 0)) { 
            goto Wy; 
        } 
        $dg = array_map("htmlspecialchars", $dg); 
        $Wz = array_map("htmlspecialchars", $Wz); 
        $kP = 0; 
        pa: 
        if (!($kP < $J4)) { 
            goto Ai; 
        } 
        if (empty($_POST["mo_saml_display_attribute_" . $kP])) { 
            goto LN; 
        } 
        $KD = SAMLSPUtilities::mo_saml_array_push($KD, $kP); 
        LN: 
        $kP++; 
        goto pa; 
        Ai: 
        Wy: 
        $mN = EnvironmentHelper::getOptionForSelectedEnvironment("saml_attrs_to_display_idp", true); 
        $ds = $mN; 
        $mN[$fx] = $KD; 
        if (!($fx == "DEFAULT")) { 
            goto U2; 
        } 
        if (empty($KI)) { 
            goto oY; 
        } 
        foreach ($KI as $bh) { 
            $tX = $bh["idp_name"]; 
            if (!(!empty($mN["DEFAULT"]) && (empty($mN[$tX]) || $mN[$tX] === $ds["DEFAULT"]))) { 
                goto ep; 
            } 
            $mN[$tX] = $mN["DEFAULT"]; 
            ep: 
            eM: 
        } 
        p9: 
        oY: 
        U2: 
        $vN->mo_save_environment_settings("saml_attrs_to_display_idp", $mN); 
        $dY = array_combine($dg, $Wz); 
        $dY = array_filter($dY); 
        if (!empty($Lw)) { 
            goto iL; 
        } 
        $Lw = array(); 
        iL: 
        if (!empty($dY)) { 
            goto oH; 
        } 
        if (empty($Lw[$fx])) { 
            goto JL; 
        } 
        unset($Lw[$fx]); 
        JL: 
        goto XE; 
        oH: 
        $Lw[$fx] = $dY; 
        XE: 
        if (!($fx == "DEFAULT")) { 
            goto GD; 
        } 
        if (!(!empty($KI) and is_array($KI))) { 
            goto Yk; 
        } 
        foreach ($KI as $bh) { 
            $tX = $bh["idp_name"]; 
            if (!(!empty($Lw["DEFAULT"]) && (empty($Lw[$tX]) || $Lw[$tX] === $X9["DEFAULT"]))) { 
                goto AB; 
            } 
            $Lw[$tX] = $Lw["DEFAULT"]; 
            AB: 
            rY: 
        } 
        xU: 
        Yk: 
        GD: 
        $vN->mo_save_environment_settings("mo_saml_custom_attrs_mapping", $Lw); 
        $s8 = "Attribute Mapping saved successfully."; 
        update_option("mo_saml_message", $s8); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        v2: 
        if (!self::mo_check_option_admin_referer("reset_attr_mapping")) { 
            goto tm; 
        } 
        if (empty($_POST["reset_idp_name"])) { 
            goto kQ; 
        } 
        $fx = htmlspecialchars($_POST["reset_idp_name"]); 
        $k1 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_attribute_mapping", true)); 
        $Rx = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_custom_attrs_mapping", true)); 
        $KD = EnvironmentHelper::getOptionForSelectedEnvironment("saml_attrs_to_display_idp", true); 
        if (empty($k1[$fx])) { 
            goto tt; 
        } 
        unset($k1[$fx]); 
        $vN->mo_save_environment_settings("saml_idp_attribute_mapping", $k1); 
        tt: 
        if (empty($Rx[$fx])) { 
            goto P5; 
        } 
        unset($Rx[$fx]); 
        $vN->mo_save_environment_settings("mo_saml_custom_attrs_mapping", $Rx); 
        P5: 
        if (empty($KD[$fx])) { 
            goto rs; 
        } 
        unset($KD[$fx]); 
        $vN->mo_save_environment_settings("saml_attrs_to_display_idp", $KD); 
        rs: 
        update_option("mo_saml_message", "Attribute Mapping has been reset for " . $fx . "."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        kQ: 
        tm: 
        if (!self::mo_check_option_admin_referer("mo_saml_enable_login_redirect_option")) { 
            goto iN; 
        } 
        if (mo_saml_is_sp_configured()) { 
            goto Zb; 
        } 
        update_option("mo_saml_message", "Please complete " . addLink("Service Provider", add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"])) . " configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto h7; 
        Zb: 
        if (!empty($_POST["mo_saml_enable_login_redirect"])) { 
            goto O8; 
        } 
        $Sb = "false"; 
        goto Tc; 
        O8: 
        $Sb = htmlspecialchars($_POST["mo_saml_enable_login_redirect"]); 
        Tc: 
        if ($Sb == "true") { 
            goto cc; 
        } 
        $vN->mo_save_environment_settings("mo_saml_enable_login_redirect", ''); 
        goto zD; 
        cc: 
        $vN->mo_save_environment_settings("mo_saml_enable_login_redirect", "true"); 
        $vN->mo_save_environment_settings("mo_saml_allow_wp_signin", "true"); 
        zD: 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        h7: 
        iN: 
        if (!self::mo_check_option_admin_referer("reset_domain_restriction")) { 
            goto wV; 
        } 
        if (empty($_POST["reset_idp_name"])) { 
            goto xP; 
        } 
        $fx = htmlspecialchars($_POST["reset_idp_name"]); 
        $P9 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("saml_domain_restriction", true)); 
        if (empty($P9[$fx])) { 
            goto WU; 
        } 
        unset($P9[$fx]); 
        $vN->mo_save_environment_settings("saml_domain_restriction", $P9); 
        WU: 
        update_option("mo_saml_message", "Domain Restriction has been reset for " . $fx . "."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        xP: 
        wV: 
        if (!self::mo_check_option_admin_referer("reset_role_mapping")) { 
            goto W8; 
        } 
        if (empty($_POST["reset_idp_name"])) { 
            goto RY; 
        } 
        $fx = htmlspecialchars($_POST["reset_idp_name"]); 
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_role_mapping", true); 
        if (empty($Tj[$fx])) { 
            goto at; 
        } 
        unset($Tj[$fx]); 
        $vN->mo_save_environment_settings("saml_idp_role_mapping", $Tj); 
        at: 
        update_option("mo_saml_message", "Role Mapping has been reset for " . $fx . "."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        RY: 
        W8: 
        if (!self::mo_check_option_admin_referer("domain_restriction_idp")) { 
            goto u1; 
        } 
        if (empty($_POST["domain_restriction_idp_name"])) { 
            goto OD; 
        } 
        $P9 = htmlspecialchars($_POST["domain_restriction_idp_name"]); 
        OD: 
        $vN->mo_save_environment_settings("saml_domain_restriction_idp", $P9); 
        u1: 
        if (!self::mo_check_option_admin_referer("saml_form_domain_restriction_option")) { 
            goto JA; 
        } 
        if (empty($_POST["domain_restriction_idp_name"])) { 
            goto Y9; 
        } 
        $P9 = htmlspecialchars($_POST["domain_restriction_idp_name"]); 
        Y9: 
        if (!empty($P9)) { 
            goto rx; 
        } 
        $P9 = "DEFAULT"; 
        rx: 
        $n8 = !empty($_POST["mo_saml_enable_domain_restriction_login"]) ? htmlspecialchars($_POST["mo_saml_enable_domain_restriction_login"]) : ''; 
        $su = !empty($_POST["mo_saml_allow_deny_user_with_domain"]) ? htmlspecialchars($_POST["mo_saml_allow_deny_user_with_domain"]) : "allow"; 
        $AX = !empty($_POST["saml_am_email_domains"]) ? htmlspecialchars($_POST["saml_am_email_domains"]) : ''; 
        $AX = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($AX); 
        $n_ = EnvironmentHelper::getOptionForSelectedEnvironment("saml_domain_restriction", true); 
        $n_[$P9] = array("enable_domain_restriction" => $n8, "allow_deny_login" => $su, "email_domains" => $AX); 
        $vN->mo_save_environment_settings("saml_domain_restriction", $n_); 
        $vN->mo_save_environment_settings("saml_domain_restriction_idp", $P9); 
        update_option("mo_saml_message", "Domain Restriction has been saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        JA: 
        if (!self::mo_check_option_admin_referer("role_mapping_idp_name_form")) { 
            goto ZA; 
        } 
        if (empty($_REQUEST[mo_options_enum_role_mapping::ROLE_IDP_NAME])) { 
            goto mF; 
        } 
        $vN->mo_save_environment_settings(mo_options_enum_role_mapping::ROLE_IDP_NAME, $_REQUEST[mo_options_enum_role_mapping::ROLE_IDP_NAME]); 
        mF: 
        ZA: 
        if (!self::mo_check_option_admin_referer("login_widget_saml_role_mapping")) { 
            goto J9; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto WC; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Save Role Mapping failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        WC: 
        $pj = ''; 
        if (!empty($_POST["mo_saml_dont_create_user_if_role_not_mapped"])) { 
            goto D_; 
        } 
        if (!empty($_POST["saml_am_dont_allow_unlisted_user_role"])) { 
            goto lD; 
        } 
        $sx = "unchecked"; 
        $pj = $_POST["saml_am_default_user_role"]; 
        $qL = "unchecked"; 
        goto YP; 
        D_: 
        $sx = "checked"; 
        $pj = false; 
        $qL = "unchecked"; 
        goto YP; 
        lD: 
        $sx = "unchecked"; 
        $pj = false; 
        $qL = "checked"; 
        YP: 
        if (!empty($_POST["mo_saml_keep_existing_users_role"])) { 
            goto pp; 
        } 
        $C5 = "unchecked"; 
        goto Mr; 
        pp: 
        $C5 = "checked"; 
        Mr: 
        if (!empty($_POST["mo_saml_dont_allow_user_tologin_create_with_given_groups"])) { 
            goto l3; 
        } 
        $TB = "unchecked"; 
        goto KZ; 
        l3: 
        $TB = "checked"; 
        KZ: 
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_role_mapping", true); 
        if (!empty($Tj["DEFAULT"])) { 
            goto BV; 
        } 
        $Tj["DEFAULT"] = array(); 
        BV: 
        $PU = $Tj; 
        $fx = $_POST[mo_options_enum_role_mapping::ROLE_IDP_NAME]; 
        if (!(!empty($KI[$fx]) || $fx == "DEFAULT")) { 
            goto SW; 
        } 
        if (!empty($_POST["mo_saml_restrict_users_with_groups"])) { 
            goto jp; 
        } 
        $Tj[$fx]["mo_saml_restrict_users_with_groups"] = ''; 
        goto hN; 
        jp: 
        $tV = sanitize_text_field($_POST["mo_saml_restrict_users_with_groups"]); 
        $Tj[$fx]["mo_saml_restrict_users_with_groups"] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($tV); 
        hN: 
        $wp_roles = new WP_Roles(); 
        $i4 = $wp_roles->get_names(); 
        foreach ($i4 as $ld => $Ye) { 
            $a1 = "saml_am_group_attr_values_" . $ld; 
            $jw = !empty($_POST[$a1]) ? sanitize_text_field($_POST[$a1]) : ''; 
            $Tj[$fx][$ld] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($jw); 
            rb: 
        } 
        hl: 
        $Tj[$fx]["default_role"] = $pj; 
        $Tj[$fx]["dont_create_user"] = $sx; 
        $Tj[$fx]["dont_allow_unlisted_user"] = $qL; 
        $Tj[$fx]["keep_existing_users_role"] = $C5; 
        $Tj[$fx]["dont_allow_user_tologin_create_with_given_groups"] = $TB; 
        SW: 
        $Tj = array_filter($Tj, "filter_empty_values"); 
        if (!($fx == "DEFAULT")) { 
            goto V5; 
        } 
        if (!(!empty($KI) and is_array($KI))) { 
            goto Mt; 
        } 
        foreach ($KI as $bh) { 
            $tX = $bh["idp_name"]; 
            if (!(empty($Tj[$tX]) || $Tj[$tX] === $PU["DEFAULT"])) { 
                goto At; 
            } 
            $Tj[$tX] = $Tj["DEFAULT"]; 
            At: 
            JN: 
        } 
        My: 
        Mt: 
        V5: 
        $vN->mo_save_environment_settings("saml_idp_role_mapping", $Tj); 
        update_option("mo_saml_message", "Role Mapping details saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        J9: 
        if (!self::mo_check_option_admin_referer("mo_saml_update_idp_settings_option")) { 
            goto Kc; 
        } 
        if (!(!empty($_POST["mo_saml_sp_base_url"]) && !empty($_POST["mo_saml_sp_entity_id"]))) { 
            goto VC; 
        } 
        $bg = esc_url_raw(filter_var($_POST["mo_saml_sp_base_url"], FILTER_SANITIZE_URL)); 
        $O5 = sanitize_text_field($_POST["mo_saml_sp_entity_id"]); 
        if (!(substr($bg, -1) == "/")) { 
            goto BY; 
        } 
        $bg = substr($bg, 0, -1); 
        BY: 
        $vN->mo_save_environment_settings("mo_saml_sp_base_url", $bg); 
        $vN->mo_save_environment_settings("mo_saml_sp_entity_id", $O5); 
        VC: 
        update_option("mo_saml_message", "Settings updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Kc: 
        if (!self::mo_check_option_admin_referer("mo_saml_update_xml_organization_metadata")) { 
            goto W2; 
        } 
        if (!empty($_POST["mo_saml_org_name"]) && !empty($_POST["mo_saml_org_url"]) && !empty($_POST["mo_saml_org_display_name"]) && !empty($_POST["mo_saml_tech_name"]) && !empty($_POST["mo_saml_tech_email"]) && !empty($_POST["mo_saml_support_name"]) && !empty($_POST["mo_saml_support_email"])) { 
            goto po; 
        } 
        update_option("mo_saml_message", "All fields are required."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto Lu; 
        po: 
        $WI = sanitize_text_field(wp_unslash($_POST["mo_saml_org_name"])); 
        $aO = sanitize_text_field(wp_unslash($_POST["mo_saml_org_display_name"])); 
        $sR = filter_var($_POST["mo_saml_org_url"], FILTER_SANITIZE_URL); 
        $Al = sanitize_text_field(wp_unslash($_POST["mo_saml_tech_name"])); 
        $W_ = sanitize_text_field(wp_unslash($_POST["mo_saml_support_name"])); 
        $iB = filter_var($_POST["mo_saml_support_email"], FILTER_SANITIZE_EMAIL); 
        $kz = filter_var($_POST["mo_saml_tech_email"], FILTER_SANITIZE_EMAIL); 
        if (!is_email($iB) || !is_email($kz)) { 
            goto o4; 
        } 
        if (!filter_var($sR, FILTER_VALIDATE_URL)) { 
            goto HG; 
        } 
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_NAME_OPTION, $WI); 
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_URL_OPTION, $sR); 
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_DISPLAY_NAME_OPTION, $aO); 
        update_option(Mo_Saml_Organization_Metatadata_Options::TECHNICAL_PERSON_NAME_OPTION, $Al); 
        update_option(Mo_Saml_Organization_Metatadata_Options::TECHNICAL_PERSON_EMAIL_OPTION, $kz); 
        update_option(Mo_Saml_Organization_Metatadata_Options::SUPPORT_PERSON_NAME_OPTION, $W_); 
        update_option(Mo_Saml_Organization_Metatadata_Options::SUPPORT_PERSON_EMAIL_OPTION, $iB); 
        update_option("mo_saml_message", "Settings updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        goto Px; 
        HG: 
        update_option("mo_saml_message", "Please enter valid url."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        Px: 
        goto rX; 
        o4: 
        update_option("mo_saml_message", "Please enter valid email."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        rX: 
        Lu: 
        W2: 
        if (!self::mo_check_option_admin_referer("saml_upload_metadata")) { 
            goto kA; 
        } 
        if (!function_exists("wp_handle_upload")) { 
            require_once Mo_Saml_WordPress_Files::MO_SAML_WP_ADMIN_FILE; 
        } 
        if (!(isset($_POST["saml_identity_metadata_provider"]) && !preg_match("#^(?!^\d+$)[_a-zA-Z0-9]+$|^[_a-zA-Z][_a-zA-Z0-9]*$#", $_POST["saml_identity_metadata_provider"]))) { 
            goto IX; 
        } 
        update_option("mo_saml_message", "Please match the requested format for Identity Provider Name. Only alphabets, numbers and underscore is allowed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        IX: 
        $vN->mo_save_environment_settings("current_idp_details", array()); 
        $SG = ini_get("max_execution_time"); 
        $SG = !empty($SG) ? intval($SG) : 30; 
        set_time_limit(0); 
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object(); 
        $fS->mo_saml_handle_upload_metadata(); 
        set_time_limit($SG); 
        kA: 
        if (!self::mo_check_option_admin_referer("mp_saml_cert_idp_option")) { 
            goto oS; 
        } 
        if (!empty($_POST["saml_cert_idp"])) { 
            goto JP; 
        } 
        update_option("mo_saml_cert_idp_name", "DEFAULT"); 
        goto BQ; 
        JP: 
        update_option("mo_saml_cert_idp_name", htmlspecialchars($_POST["saml_cert_idp"])); 
        BQ: 
        oS: 
        if (!self::mo_check_option_admin_referer("upgrade_cert")) { 
            goto R5; 
        } 
        $mF = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PUBLIC_CERT_FILE_NAME); 
        $Lu = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME); 
        $tX = "DEFAULT"; 
        if (empty($_POST["idp_name"])) { 
            goto WX; 
        } 
        $tX = htmlspecialchars($_POST["idp_name"]); 
        WX: 
        $eu = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, EnvironmentHelper::getCurrentEnvironment()); 
        if ($tX == "DEFAULT") { 
            goto NB; 
        } 
        $eu[$tX]["sp_cert"] = $mF; 
        $eu[$tX]["sp_priv_key"] = $Lu; 
        goto QM; 
        NB: 
        update_option("mo_saml_current_cert", $mF); 
        update_option("mo_saml_current_cert_private_key", $Lu); 
        foreach ($eu as $bh) { 
            unset($bh["sp_cert"]); 
            unset($bh["sp_priv_key"]); 
            Vp: 
        } 
        h5: 
        QM: 
        $vN->mo_save_environment_settings("saml_identity_providers", $eu); 
        update_option("mo_saml_message", "Certificate Upgraded successfully"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        R5: 
        if (self::mo_check_option_admin_referer("add_custom_certificate")) { 
            goto hF; 
        } 
        if (!self::mo_check_option_admin_referer("add_custom_messages")) { 
            goto cb; 
        } 
        $vN->mo_save_environment_settings("mo_saml_account_creation_disabled_msg", sanitize_text_field($_POST["mo_saml_account_creation_disabled_msg"])); 
        $vN->mo_save_environment_settings("mo_saml_restricted_domain_error_msg", sanitize_text_field($_POST["mo_saml_restricted_domain_error_msg"])); 
        update_option("mo_saml_message", "Configuration has been saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        cb: 
        goto Q2; 
        hF: 
        if (!empty($_POST["submit"]) and $_POST["submit"] == "Upload") { 
            goto HW; 
        } 
        if (!(!empty($_POST["submit"]) and $_POST["submit"] == "Reset")) { 
            goto qQ; 
        } 
        delete_option("mo_saml_custom_cert"); 
        delete_option("mo_saml_custom_cert_private_key"); 
        update_option("mo_saml_current_cert", !empty($mF)); 
        update_option("mo_saml_current_cert_private_key", !empty($Lu)); 
        update_option("mo_saml_message", "Reset Certificate successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        qQ: 
        goto Me; 
        HW: 
        if (!@openssl_x509_read($_POST["saml_public_x509_certificate"])) { 
            goto r1; 
        } 
        if (!@openssl_x509_check_private_key($_POST["saml_public_x509_certificate"], $_POST["saml_private_x509_certificate"])) { 
            goto mD; 
        } 
        if (openssl_x509_read($_POST["saml_public_x509_certificate"]) && openssl_x509_check_private_key($_POST["saml_public_x509_certificate"], $_POST["saml_private_x509_certificate"])) { 
            goto PT; 
        } 
        goto u9; 
        r1: 
        update_option("mo_saml_message", "Invalid Certificate format. Please enter a valid certificate."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto u9; 
        mD: 
        update_option("mo_saml_message", "Invalid Private Key."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto u9; 
        PT: 
        $e_ = $_POST["saml_public_x509_certificate"]; 
        $eq = $_POST["saml_private_x509_certificate"]; 
        update_option("mo_saml_custom_cert", $e_); 
        update_option("mo_saml_custom_cert_private_key", $eq); 
        update_option("mo_saml_current_cert", $e_); 
        update_option("mo_saml_current_cert_private_key", $eq); 
        update_option("mo_saml_message", "Custom Certificate updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        u9: 
        Me: 
        Q2: 
        if (!self::mo_check_option_admin_referer("mo_relay_state_idp_name")) { 
            goto mB; 
        } 
        if (empty($_REQUEST["mo_saml_relay_state_idp_name"])) { 
            goto ZT; 
        } 
        $fx = sanitize_text_field(wp_unslash($_REQUEST["mo_saml_relay_state_idp_name"])); 
        $vN->mo_save_environment_settings(Mo_Saml_Admin_Referer_Options::RELAY_STATE_IDP_NAME, $fx); 
        ZT: 
        mB: 
        if (!self::mo_check_option_admin_referer("mo_saml_relay_state_option")) { 
            goto I4; 
        } 
        $fx = !empty($_POST["mo_saml_relay_state_idp_name"]) ? sanitize_text_field(wp_unslash($_POST["mo_saml_relay_state_idp_name"])) : "DEFAULT"; 
        $LC = EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_states, true); 
        $aw = !empty($LC["login_relay_state"]) ? $LC["login_relay_state"] : array(); 
        $Sm = !empty($LC["logout_relay_state"]) ? $LC["logout_relay_state"] : array(); 
        $Qp = ''; 
        $cZ = ''; 
        if (!empty(trim($_POST["mo_saml_login_relay_state"])) && filter_var($_POST["mo_saml_login_relay_state"], FILTER_VALIDATE_URL) === false || !empty(trim($_POST["mo_saml_logout_relay_state"])) && filter_var($_POST["mo_saml_logout_relay_state"], FILTER_VALIDATE_URL) === false) { 
            goto Tg; 
        } 
        $Qp = !empty($_POST["mo_saml_login_relay_state"]) ? esc_url_raw(filter_var($_POST["mo_saml_login_relay_state"], FILTER_SANITIZE_URL)) : ''; 
        $aw[$fx] = $Qp; 
        $cZ = !empty($_POST["mo_saml_logout_relay_state"]) ? esc_url_raw(filter_var($_POST["mo_saml_logout_relay_state"], FILTER_SANITIZE_URL)) : ''; 
        $Sm[$fx] = $cZ; 
        goto pL; 
        Tg: 
        update_option("mo_saml_message", "Invalid Relay State(s) found."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        pL: 
        $LC["login_relay_state"] = $aw; 
        $LC["logout_relay_state"] = $Sm; 
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_state, $Qp); 
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_states, $LC); 
        update_option("mo_saml_message", "Relay State updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        I4: 
        if (!(self::mo_check_option_admin_referer("mo_saml_idp_list_option") && isset($_POST["mo_saml_idp_list_url"]))) { 
            goto s1; 
        } 
        $Ps = sanitize_text_field($_POST["mo_saml_idp_list_url"]); 
        if (!(substr($Ps, -1) != "/" && strpos($Ps, "?") == false && strpos($Ps, "#") == false)) { 
            goto Fw; 
        } 
        $Ps = $Ps . "/"; 
        Fw: 
        try { 
            SAMLSPUtilities::mo_saml_validate_public_page_url($Ps); 
        } catch (Exception $Uc) { 
            $y3 = $Uc->getMessage(); 
            update_option(Mo_Saml_Options_Plugin_Admin::ADMIN_NOTICES_MESSAGE, $y3); 
            SAMLSPUtilities::mo_saml_show_error_message(); 
            return; 
        } 
        $vN->mo_save_environment_settings("mo_saml_idp_list_url", $Ps); 
        update_option("mo_saml_message", "Public Page Url updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        s1: 
        if (!self::mo_check_option_admin_referer("mo_saml_shortcode_option")) { 
            goto cM; 
        } 
        $bM = empty($_POST["mo_saml_shortcode_login_text"]) ? "Login with " : sanitize_text_field($_POST["mo_saml_shortcode_login_text"]); 
        $vN->mo_save_environment_settings("mo_saml_shortcode_login_text", $bM); 
        update_option("mo_saml_message", "Shortcode Login text updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        cM: 
        if (!self::mo_check_option_admin_referer("mo_saml_idp_shortcode_option")) { 
            goto wg; 
        } 
        $bM = empty($_POST["mo_saml_idp_shortcode_login_text"]) ? "Login with ##IDP##" : sanitize_text_field($_POST["mo_saml_idp_shortcode_login_text"]); 
        $vN->mo_save_environment_settings("mo_saml_idp_shortcode_login_text", $bM); 
        update_option("mo_saml_message", "Shortcode Login text updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        wg: 
        if (!self::mo_check_option_admin_referer("sso_button_option")) { 
            goto Xb; 
        } 
        if (empty($_POST["sso_button_idp_name"])) { 
            goto Ug; 
        } 
        $bK = htmlspecialchars($_POST["sso_button_idp_name"]); 
        Ug: 
        if (!empty($bK)) { 
            goto hK; 
        } 
        $bK = "DEFAULT"; 
        hK: 
        if (!empty($_POST["mo_saml_add_sso_button_wp"])) { 
            goto EF; 
        } 
        $Ld = "false"; 
        goto pt; 
        EF: 
        $Ld = htmlspecialchars($_POST["mo_saml_add_sso_button_wp"]); 
        pt: 
        if (!empty($_POST["mo_saml_use_button_as_shortcode"])) { 
            goto BR; 
        } 
        $bT = "false"; 
        goto Vo; 
        BR: 
        $bT = htmlspecialchars($_POST["mo_saml_use_button_as_shortcode"]); 
        Vo: 
        if (!empty($_POST["mo_saml_use_button_as_widget"])) { 
            goto Gz; 
        } 
        $XZ = "false"; 
        goto za; 
        Gz: 
        $XZ = htmlspecialchars($_POST["mo_saml_use_button_as_widget"]); 
        za: 
        $LP = ''; 
        $YP = ''; 
        $sz = ''; 
        $M8 = ''; 
        $WU = ''; 
        $ym = ''; 
        $cU = ''; 
        $ue = ''; 
        $se = ''; 
        $Wy = "above"; 
        if (empty($_POST["mo_saml_button_size"])) { 
            goto xg; 
        } 
        $YP = htmlspecialchars($_POST["mo_saml_button_size"]); 
        xg: 
        if (empty($_POST["mo_saml_button_width"])) { 
            goto UO; 
        } 
        $sz = htmlspecialchars($_POST["mo_saml_button_width"]); 
        UO: 
        if (empty($_POST["mo_saml_button_height"])) { 
            goto vR; 
        } 
        $M8 = htmlspecialchars($_POST["mo_saml_button_height"]); 
        vR: 
        if (empty($_POST["mo_saml_button_curve"])) { 
            goto b_; 
        } 
        $WU = htmlspecialchars($_POST["mo_saml_button_curve"]); 
        b_: 
        if (empty($_POST["mo_saml_button_color"])) { 
            goto ni; 
        } 
        $ym = htmlspecialchars($_POST["mo_saml_button_color"]); 
        ni: 
        if (empty($_POST["mo_saml_button_theme"])) { 
            goto h1; 
        } 
        $LP = htmlspecialchars($_POST["mo_saml_button_theme"]); 
        h1: 
        if (empty($_POST["mo_saml_button_text"])) { 
            goto RC; 
        } 
        $cU = htmlspecialchars($_POST["mo_saml_button_text"]); 
        if (!(empty($cU) || $cU == "Login")) { 
            goto va; 
        } 
        $cU = "Login"; 
        va: 
        $cU = str_replace("##IDP##", $bK, $cU); 
        RC: 
        if (empty($_POST["mo_saml_font_color"])) { 
            goto Jc; 
        } 
        $ue = htmlspecialchars($_POST["mo_saml_font_color"]); 
        Jc: 
        if (empty($_POST["mo_saml_font_size"])) { 
            goto JD; 
        } 
        $se = htmlspecialchars($_POST["mo_saml_font_size"]); 
        JD: 
        if (empty($_POST["sso_button_login_form_position"])) { 
            goto zb; 
        } 
        $Wy = htmlspecialchars($_POST["sso_button_login_form_position"]); 
        zb: 
        $nh = array("add_button_wp_login" => $Ld, "use_button_as_shortcode" => $bT, "use_button_as_widget" => $XZ, "button_type" => $LP, "button_size" => $YP, "button_width" => $sz, "button_height" => $M8, "button_curve" => $WU, "button_color" => $ym, "button_text" => $cU, "font_color" => $ue, "font_size" => $se, "button_position" => $Wy); 
        $m9 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_sso_button_idp", true); 
        $m9[$bK] = $nh; 
        $vN->mo_save_environment_settings("saml_sso_button_idp", $m9); 
        $vN->mo_save_environment_settings("saml_button_idp_name", $bK); 
        update_option("mo_saml_message", "Login button updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Xb: 
        if (!self::mo_check_option_admin_referer("sso_button_idp_name_option")) { 
            goto x3; 
        } 
        if (!empty($_POST["sso_button_idp"])) { 
            goto k1; 
        } 
        $fx = "DEFAULT"; 
        goto zA; 
        k1: 
        $fx = htmlspecialchars($_POST["sso_button_idp"]); 
        zA: 
        $vN->mo_save_environment_settings("saml_button_idp_name", $fx); 
        x3: 
        if (!empty($_POST["option"]) and $_POST["option"] == "reset_sso_button_option") { 
            goto wC; 
        } 
        if (self::mo_check_option_admin_referer("clear_attrs_list")) { 
            goto Z9; 
        } 
        if (!empty($_POST["mo_saml_auto_redirect"]) && $_POST["mo_saml_auto_redirect"] == "false") { 
            goto Xi; 
        } 
        if (!empty($_POST["mo_saml_auto_redirect"]) and $_POST["mo_saml_auto_redirect"] == "default_idp") { 
            goto oK; 
        } 
        if (!empty($_POST["mo_saml_auto_redirect"]) && $_POST["mo_saml_auto_redirect"] == "registered_only") { 
            goto AY; 
        } 
        if (!empty($_POST["mo_saml_auto_redirect"]) and $_POST["mo_saml_auto_redirect"] == "public_page") { 
            goto dp; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_enable_rss_access_option")) { 
            goto HJ; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_force_authentication_option")) { 
            goto gy; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_domain_mapping_config")) { 
            goto Eq; 
        } 
        if (mo_saml_is_sp_configured() && self::mo_check_option_admin_referer("mo_saml_allow_wp_signin_option")) { 
            goto DD; 
        } 
        if (self::mo_check_option_admin_referer("federation")) { 
            goto Il; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_add_federations")) { 
            goto ot; 
        } 
        if (self::mo_check_option_admin_referer("edit_federation")) { 
            goto nV; 
        } 
        if (self::mo_check_option_admin_referer("delete_federation")) { 
            goto Xw; 
        } 
        if (!self::mo_check_option_admin_referer("save_idp_list")) { 
            goto x1; 
        } 
        $rK = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp"); 
        $Ij = array(); 
        if (empty($_POST["enable_idp"])) { 
            goto YO; 
        } 
        $Ij = $_POST["enable_idp"]; 
        YO: 
        $N9 = SAMLSPUtilities::mo_saml_fetch_idps_count_in_license(); 
        $HZ = count($Ij); 
        if (!($HZ > $N9)) { 
            goto XN; 
        } 
        update_option("mo_saml_message", "You have EXCEEDED your IDP limit. You can upgrade your license or delete/disable unused IDP."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        XN: 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        foreach ($Qm as $fx => $tX) { 
            if (SAMLSPUtilities::mo_saml_in_array($fx, $Ij) || $rK == $fx && $Qm[$fx]["enable_idp"]) { 
                goto Wt; 
            } 
            $Qm[$fx]["enable_idp"] = false; 
            goto JQ; 
            Wt: 
            $Qm[$fx]["enable_idp"] = true; 
            JQ: 
            Pt: 
        } 
        OT: 
        if (empty($Qm[''])) { 
            goto xs; 
        } 
        unset($Qm['']); 
        xs: 
        $vN->mo_save_environment_settings("saml_identity_providers", $Qm); 
        update_option("mo_saml_message", "IDPs settings updated successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        x1: 
        goto Kt; 
        Xw: 
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_federations", true); 
        $Fz = $_POST["federation_name"]; 
        unset($tM[$Fz]); 
        $vN->mo_save_environment_settings("mo_saml_federations", $tM); 
        Kt: 
        goto iO; 
        nV: 
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_federations", true); 
        $Fz = $_POST["federation_name"]; 
        if (empty($tM[$Fz])) { 
            goto He; 
        } 
        $p0 = $tM[$Fz]; 
        $FU = $_POST["discovery_url"]; 
        $p0["discovery_url"] = $FU; 
        $o4 = $this->mo_saml_save_federation_parameters(); 
        if (empty($o4)) { 
            goto T3; 
        } 
        $p0["parameters"] = $o4; 
        T3: 
        $tM[$Fz] = $p0; 
        $vN->mo_save_environment_settings("mo_saml_federations", $tM); 
        He: 
        iO: 
        goto nu; 
        ot: 
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_federations", true); 
        if (!(!empty($_POST["federation_name"]) and !empty($_POST["discovery_url"]))) { 
            goto XQ; 
        } 
        $Fz = $_POST["federation_name"]; 
        $FU = $_POST["discovery_url"]; 
        $o4 = $this->mo_saml_save_federation_parameters(); 
        $tM[$Fz] = array("federation_name" => $Fz, "discovery_url" => $FU, "enable" => false); 
        if (empty($o4)) { 
            goto Uu; 
        } 
        $tM[$Fz]["parameters"] = $o4; 
        Uu: 
        $vN->mo_save_environment_settings("mo_saml_federations", $tM); 
        XQ: 
        nu: 
        goto ob; 
        Il: 
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_federations", true); 
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_base_url"); 
        if (!empty($bg)) { 
            goto RU; 
        } 
        $bg = home_url(); 
        RU: 
        $O5 = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_entity_id"); 
        if (!empty($O5)) { 
            goto XJ; 
        } 
        $O5 = $bg . "/wp-content/plugins/miniorange-saml-20-single-sign-on/"; 
        XJ: 
        $iS = home_url() . "/?option=saml_user_login"; 
        if ($tM) { 
            goto qj; 
        } 
        $tM["InCommon"] = array("federation_name" => "InCommon", "discovery_url" => "https://wayf.incommonfederation.org/DS/WAYF", "parameters" => array("entityID" => $O5, "return" => $iS), "enable" => false); 
        $tM["HAKA"] = array("federation_name" => "HAKA", "discovery_url" => "https://haka.funet.fi/shibboleth/WAYF", "parameters" => array("entityID" => $O5, "return" => $iS), "enable" => false); 
        $tM["HKAF"] = array("federation_name" => "HKAF", "discovery_url" => "https://ds.hkaf.edu.hk/discovery", "parameters" => array("entityID" => $O5, "return" => $iS), "enable" => false); 
        qj: 
        if (!empty($_POST["enable_fed_sso"])) { 
            goto R6; 
        } 
        foreach ($tM as $It => $p0) { 
            $tM[$It]["enable"] = false; 
            km: 
        } 
        b0: 
        goto ke; 
        R6: 
        $Fa = $_POST["enable_fed_sso"]; 
        foreach ($tM as $It => $p0) { 
            if (SAMLSPUtilities::mo_saml_in_array($It, $Fa)) { 
                goto kR; 
            } 
            $tM[$It]["enable"] = false; 
            goto lX; 
            kR: 
            $tM[$It]["enable"] = true; 
            lX: 
            NP: 
        } 
        UB: 
        ke: 
        $vN->mo_save_environment_settings("mo_saml_federations", $tM); 
        update_option("mo_saml_message", "Federation information saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        ob: 
        goto IL; 
        DD: 
        $bJ = !empty($_POST["mo_saml_backdoor_url"]) ? trim($_POST["mo_saml_backdoor_url"]) : ''; 
        if (isset($_POST["mo_saml_allow_wp_signin"]) && !empty(sanitize_text_field($_POST["mo_saml_allow_wp_signin"]))) { 
            goto Tk; 
        } 
        $vy = "false"; 
        goto Ko; 
        Tk: 
        $vy = sanitize_text_field($_POST["mo_saml_allow_wp_signin"]); 
        Ko: 
        $vN->mo_save_environment_settings("mo_saml_allow_wp_signin", $vy); 
        if (!preg_match("/^[a-zA-Z0-9_\-]+$/", $bJ)) { 
            goto A1; 
        } 
        $vN->mo_save_environment_settings("mo_saml_backdoor_url", $bJ); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        update_option("mo_saml_message", "Sign in options updated."); 
        goto a8; 
        A1: 
        update_option("mo_saml_message", "Only alphanumeric character are allowed. Also the field cannot be empty."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        a8: 
        IL: 
        goto cO; 
        gy: 
        if (mo_saml_is_sp_configured()) { 
            goto ji; 
        } 
        update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto mg; 
        ji: 
        if (!empty($_POST["mo_saml_force_authentication"])) { 
            goto yc; 
        } 
        $wk = "false"; 
        goto QK; 
        yc: 
        $wk = $_POST["mo_saml_force_authentication"]; 
        QK: 
        $vN->mo_save_environment_settings("mo_saml_force_authentication", $wk); 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        mg: 
        goto cO; 
        Eq: 
        if (mo_saml_is_sp_configured()) { 
            goto RP; 
        } 
        update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first."); 
        goto wc; 
        RP: 
        $kq = "false"; 
        if (empty($_POST["mo_saml_enable_domain_mapping"])) { 
            goto QJ; 
        } 
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        $LM = array(); 
        foreach ($KI as $ni => $SE) { 
            $a1 = "saml_domain_mapping_" . $ni; 
            $yP = !empty($_POST[$a1]) ? sanitize_text_field($_POST[$a1]) : ''; 
            $LM[$ni] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($yP); 
            if (preg_match("/^\S*$/", $LM[$ni])) { 
                goto L8; 
            } 
            update_option("mo_saml_message", "Spaces are not allowed in the domain values."); 
            SAMLSPUtilities::mo_saml_show_error_message(); 
            return; 
            L8: 
            FA: 
        } 
        Mj: 
        $LM = array_filter($LM, "filter_empty_values"); 
        $vN->mo_save_environment_settings("saml_idp_domain_mapping", $LM); 
        $kq = $_POST["mo_saml_enable_domain_mapping"]; 
        if (!empty($_POST["domain_login_failed_option"])) { 
            goto hq; 
        } 
        $bn = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_domain_login_fail"); 
        $Ao = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_fallback_to_default"); 
        if (!(!$bn && !$Ao)) { 
            goto tC; 
        } 
        $vN->mo_save_environment_settings("mo_saml_domain_login_fail", "true"); 
        tC: 
        goto dY; 
        hq: 
        $F3 = sanitize_text_field($_POST["domain_login_failed_option"]); 
        $wz = ''; 
        $W3 = ''; 
        if ($F3 === "use_wp_credentials") { 
            goto Fy; 
        } 
        if ($F3 === "redirect_to_default_idp") { 
            goto I3; 
        } 
        goto Wu; 
        Fy: 
        $wz = "true"; 
        $W3 = ''; 
        goto Wu; 
        I3: 
        $wz = ''; 
        $W3 = "true"; 
        Wu: 
        $wz = $W3 === "true" ? '' : $wz; 
        $vN->mo_save_environment_settings("mo_saml_domain_login_fail", $wz); 
        $vN->mo_save_environment_settings("mo_saml_fallback_to_default", $W3); 
        dY: 
        QJ: 
        $vN->mo_save_environment_settings("mo_saml_enable_domain_mapping", $kq); 
        update_option("mo_saml_message", "Domain Mapping details saved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        wc: 
        cO: 
        goto xz; 
        HJ: 
        if (mo_saml_is_sp_configured()) { 
            goto Wi; 
        } 
        update_option("mo_saml_message", "Please complete " . addLink("Service Provider", add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"])) . " configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto cr; 
        Wi: 
        if (array_key_exists("mo_saml_enable_rss_access", $_POST)) { 
            goto k5; 
        } 
        $uq = false; 
        goto xm; 
        k5: 
        $uq = sanitize_text_field($_POST["mo_saml_enable_rss_access"]); 
        xm: 
        if ($uq == "true") { 
            goto nx; 
        } 
        $vN->mo_save_environment_settings("mo_saml_enable_rss_access", ''); 
        goto rA; 
        nx: 
        $vN->mo_save_environment_settings("mo_saml_enable_rss_access", "true"); 
        rA: 
        update_option("mo_saml_message", "RSS Feed option updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        cr: 
        xz: 
        goto d8; 
        dp: 
        if (mo_saml_is_sp_configured()) { 
            goto QQ; 
        } 
        update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto RA; 
        QQ: 
        $vN->mo_save_environment_settings("mo_saml_no_auto_redirect", ''); 
        $vN->mo_save_environment_settings("mo_saml_redirect_default_idp", ''); 
        $vN->mo_save_environment_settings("mo_saml_registered_only_access", ''); 
        $vN->mo_save_environment_settings("mo_saml_auto_redirect_to_public_page", "true"); 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        RA: 
        d8: 
        goto Pq; 
        AY: 
        if (mo_saml_is_sp_configured()) { 
            goto iE; 
        } 
        update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto UF; 
        iE: 
        $vN->mo_save_environment_settings("mo_saml_no_auto_redirect", ''); 
        $vN->mo_save_environment_settings("mo_saml_redirect_default_idp", ''); 
        $vN->mo_save_environment_settings("mo_saml_registered_only_access", "true"); 
        $vN->mo_save_environment_settings("mo_saml_auto_redirect_to_public_page", ''); 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        UF: 
        Pq: 
        goto i6; 
        oK: 
        if (mo_saml_is_sp_configured()) { 
            goto Td; 
        } 
        update_option("mo_saml_message", "Please complete " . addLink("Service Provider", add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"])) . " configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto mb; 
        Td: 
        $vN->mo_save_environment_settings("mo_saml_no_auto_redirect", ''); 
        $vN->mo_save_environment_settings("mo_saml_redirect_default_idp", "true"); 
        $vN->mo_save_environment_settings("mo_saml_registered_only_access", ''); 
        $vN->mo_save_environment_settings("mo_saml_auto_redirect_to_public_page", ''); 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        mb: 
        i6: 
        goto l0; 
        Xi: 
        if (mo_saml_is_sp_configured()) { 
            goto SB; 
        } 
        update_option("mo_saml_message", "Please complete " . addLink("Service Provider", add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"])) . " configuration first."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto Ih; 
        SB: 
        $vN->mo_save_environment_settings("mo_saml_no_auto_redirect", "true"); 
        $vN->mo_save_environment_settings("mo_saml_redirect_default_idp", ''); 
        $vN->mo_save_environment_settings("mo_saml_registered_only_access", ''); 
        $vN->mo_save_environment_settings("mo_saml_auto_redirect_to_public_page", ''); 
        update_option("mo_saml_message", "Sign in options updated."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Ih: 
        l0: 
        goto E6; 
        Z9: 
        $vb = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_test_config_attrs", true); 
        if (empty($_POST["idp_name"])) { 
            goto nH; 
        } 
        $tX = htmlspecialchars($_POST["idp_name"]); 
        if (empty($vb[$tX])) { 
            goto WT; 
        } 
        unset($vb[$tX]); 
        WT: 
        nH: 
        $vN->mo_save_environment_settings("mo_saml_test_config_attrs", $vb); 
        update_option("mo_saml_message", "Attributes list removed successfully"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        E6: 
        goto zS; 
        wC: 
        $vN->mo_save_environment_settings("saml_sso_button_idp", ''); 
        update_option("mo_saml_message", "Login button reset successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        zS: 
        if (self::mo_check_option_admin_referer("mo_saml_check_license")) { 
            goto mH; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_forgot_password_form_option")) { 
            goto fm; 
        } 
        if (!self::mo_check_option_admin_referer("mo_saml_verify_license")) { 
            goto bj; 
        } 
        if (!empty($_POST["mo_saml_license_key"])) { 
            goto md; 
        } 
        update_option("mo_saml_message", "All the fields are required. Please enter valid license key."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        md: 
        $Il = trim($_POST["mo_saml_license_key"]); 
        $V3 = new Customersaml(); 
        $cq = $V3->mo_saml_verify_license($Il, $this); 
        if (!($cq === false)) { 
            goto gd; 
        } 
        update_option("mo_saml_message", "Something went wrong while processing this request. Please login and try again"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        gd: 
        $cq = json_decode($cq, true); 
        if (!empty($cq["status"])) { 
            goto Nc; 
        } 
        update_option("mo_saml_message", "The license key you have entered is invalid. Please enter a valid license key."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Nc: 
        $s4 = $V3->check_customer_ln(); 
        if ($s4) { 
            goto Ww; 
        } 
        return; 
        Ww: 
        $w6 = json_decode($s4, true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0 && strcasecmp($w6["status"], "SUCCESS") == 0) { 
            goto iS; 
        } 
        if (strcasecmp($cq["status"], "FAILED") == 0 || strcasecmp($w6["status"], "FAILED") == 0) { 
            goto qb; 
        } 
        update_option("mo_saml_message", "An error occurred while processing your request. Please Try again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto UD; 
        qb: 
        if (strcasecmp($cq["message"], "Code has Expired") == 0) { 
            goto IT; 
        } 
        if (strcasecmp($w6["message"], "License Not Found.") == 0) { 
            goto mR; 
        } 
        update_option("mo_saml_message", "You have entered an invalid license key. Please enter a valid license key."); 
        goto ER; 
        mR: 
        update_option("mo_saml_message", "You do not have a valid license to activate the plugin. Please reach out to us at <a href="mailto:[email protected]">[email protected]</a> to upgrade your license or if you have any questions."); 
        ER: 
        goto Du; 
        IT: 
        update_option("mo_saml_message", "License key you have entered has already been used. Please enter a key which has not been used before on any other instance or if you have exhausted all your keys then contact us to buy more."); 
        Du: 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        UD: 
        goto iG; 
        iS: 
        $ni = get_option("mo_saml_customer_token"); 
        update_option("sml_lk", AESEncryption::encrypt_data($Il, $ni)); 
        if (empty($w6["licenseExpiry"])) { 
            goto da; 
        } 
        Mo_License_Service::update_license_expiry($w6["licenseExpiry"]); 
        da: 
        update_option("mo_saml_message", "Your license is verified. You can now setup the plugin."); 
        update_option(Mo_Saml_Options::LAST_SYNCED_TIME, time()); 
        update_customer_idp_count($w6); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        iG: 
        bj: 
        goto kg; 
        fm: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto WW; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Resend OTP failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        WW: 
        $Ha = get_option("mo_saml_admin_email"); 
        $V3 = new Customersaml(); 
        $cq = json_decode($V3->mo_saml_forgot_password($Ha, $this), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto oo; 
        } 
        update_option("mo_saml_message", "An error occurred while processing your request. Please Try again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto xf; 
        oo: 
        update_option("mo_saml_message", "Your password has been reset successfully. Please enter the new password sent to " . $Ha . "."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        xf: 
        kg: 
        goto wp; 
        mH: 
        $this->mo_saml_sso_fetch_exisitng_configuration(); 
        $V3 = new Customersaml(); 
        $cq = $V3->check_customer_ln(); 
        if (!($cq === false)) { 
            goto Bo; 
        } 
        update_option("mo_saml_message", "Something went wrong while processing this request. Please login and try again"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Bo: 
        if ($cq) { 
            goto ao; 
        } 
        return; 
        ao: 
        $cq = json_decode($cq, true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto Pi; 
        } 
        $ni = get_option("mo_saml_customer_token"); 
        update_option("site_ck_l", AESEncryption::encrypt_data("false", $ni)); 
        $ow = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]); 
        update_option("mo_saml_message", "You have not upgraded yet. " . addLink("Click here", $ow) . " to upgrade to premium version."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto Mb; 
        Pi: 
        if (!empty($cq["licensePlan"])) { 
            goto th; 
        } 
        $ni = get_option("mo_saml_customer_token"); 
        update_option("site_ck_l", AESEncryption::encrypt_data("false", $ni)); 
        $ow = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]); 
        update_option("mo_saml_message", "You have not upgraded yet. " . addLink("Click here", $ow) . " to upgrade to premium version."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto j3; 
        th: 
        update_option("mo_saml_license_name", base64_encode($cq["licensePlan"])); 
        $ni = get_option("mo_saml_customer_token"); 
        if (empty($cq["noOfUsers"])) { 
            goto r8; 
        } 
        update_option("mo_saml_usr_lmt", AESEncryption::encrypt_data($cq["noOfUsers"], $ni)); 
        r8: 
        if (empty($cq["licenseExpiry"])) { 
            goto Jw; 
        } 
        Mo_License_Service::update_license_expiry($cq["licenseExpiry"]); 
        Jw: 
        update_option(Mo_Saml_Options::LAST_SYNCED_TIME, time()); 
        update_option("site_ck_l", AESEncryption::encrypt_data("true", $ni)); 
        update_customer_idp_count($cq); 
        $nQ = plugin_dir_path(__FILE__); 
        $rT = home_url(); 
        $rT = trim($rT, "/"); 
        if (preg_match("#^http(s)?://#", $rT)) { 
            goto PE; 
        } 
        $rT = "http://" . $rT; 
        PE: 
        $tj = parse_url($rT); 
        $uA = preg_replace("/^www\./", '', $tj["host"]); 
        $UI = wp_upload_dir(); 
        $cj = $uA . "-" . $UI["basedir"]; 
        $YX = hash_hmac("sha256", $cj, "4DHfjgfjasndfsajfHGJ"); 
        $K4 = $this->djkasjdksa(); 
        $mT = round(strlen($K4) / rand(2, 20)); 
        $K4 = substr_replace($K4, $YX, $mT, 0); 
        $tc = base64_decode($K4); 
        if (is_writable($nQ . "license")) { 
            goto Pd; 
        } 
        $K4 = str_rot13($K4); 
        $b1 = "bGNkamthc2pka3NhY2w="; 
        $DR = base64_decode($b1); 
        update_option($DR, $K4); 
        goto Iz; 
        Pd: 
        file_put_contents($nQ . "license", $tc); 
        Iz: 
        update_option("lcwrtlfsaml", true); 
        $ow = add_query_arg(array("tab" => "general"), $_SERVER["REQUEST_URI"]); 
        update_option("mo_saml_message", "You have successfully synced your license."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        j3: 
        Mb: 
        wp: 
        if (self::mo_check_option_admin_referer("mo_saml_remove_account")) { 
            goto sR; 
        } 
        if (!self::mo_check_option_admin_referer("mo_saml_register_with_phone_option")) { 
            goto gX; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto Iw; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Resend OTP failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Iw: 
        $rF = sanitize_text_field($_POST["phone"]); 
        $rF = str_replace(" ", '', $rF); 
        $rF = str_replace("-", '', $rF); 
        update_option("mo_saml_admin_phone", $rF); 
        $V3 = new CustomerSaml(); 
        $cq = json_decode($V3->send_otp_token('', $rF, $this, FALSE, TRUE), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto hv; 
        } 
        update_option("mo_saml_message", "There was an error in sending SMS. Please click on Resend OTP to try again."); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_FAILURE_PHONE"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto UM; 
        hv: 
        update_option("mo_saml_message", " A one time passcode is sent to " . get_option("mo_saml_admin_phone") . ". Please enter the otp here to verify your email."); 
        update_option("mo_saml_transactionId", $cq["txId"]); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_PHONE"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        UM: 
        gX: 
        goto Z5; 
        sR: 
        $this->mo_sso_saml_deactivate(); 
        Mo_License_Service::reset_license_values(); 
        add_option("mo_saml_registration_status", "removed_account"); 
        $ow = add_query_arg(array("tab" => "login"), $_SERVER["REQUEST_URI"]); 
        header("Location: " . $ow); 
        Z5: 
        if (self::mo_check_option_admin_referer("mo_saml_verify_customer")) { 
            goto AM; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_contact_us_query_option")) { 
            goto uW; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_resend_otp_email")) { 
            goto ck; 
        } 
        if (!empty($_POST["option"]) and $_POST["option"] == "mo_saml_resend_otp_phone") { 
            goto sV; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_go_back")) { 
            goto VM; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_register_customer")) { 
            goto ZS; 
        } 
        if (self::mo_check_option_admin_referer("mo_saml_default_idp")) { 
            goto qZ; 
        } 
        goto Zi; 
        ZS: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto Te; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Registration failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Te: 
        $Ha = ''; 
        $rF = ''; 
        $Y3 = ''; 
        $D2 = ''; 
        if (empty($_POST["email"]) || empty($_POST["password"]) || empty($_POST["confirmPassword"])) { 
            goto Zs; 
        } 
        if (strlen($_POST["password"]) < 6 || strlen($_POST["confirmPassword"]) < 6) { 
            goto vh; 
        } 
        if ($this->checkPasswordPattern(strip_tags($_POST["password"]))) { 
            goto wP; 
        } 
        $Ha = sanitize_email($_POST["email"]); 
        $rF = sanitize_text_field($_POST["phone"]); 
        $Y3 = stripslashes(strip_tags($_POST["password"])); 
        $D2 = stripslashes(strip_tags($_POST["confirmPassword"])); 
        goto Xd; 
        wP: 
        update_option("mo_saml_message", "Minimum 6 characters should be present. Maximum 15 characters should be present. Only following symbols (!@#.$%^&*-_) should be present."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Xd: 
        goto AW; 
        vh: 
        update_option("mo_saml_message", "Choose a password with minimum length 6."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        AW: 
        goto rL; 
        Zs: 
        update_option("mo_saml_message", "All the fields are required. Please enter valid entries."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        rL: 
        update_option("mo_saml_admin_email", $Ha); 
        update_option("mo_saml_admin_phone", $rF); 
        if (strcmp($Y3, $D2) == 0) { 
            goto WQ; 
        } 
        update_option("mo_saml_message", "Passwords do not match."); 
        delete_option("mo_saml_verify_customer"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto ov; 
        WQ: 
        update_option("mo_saml_admin_password", $Y3); 
        $Ha = get_option("mo_saml_admin_email"); 
        $V3 = new CustomerSaml(); 
        $fj = $V3->check_customer($this); 
        if ($fj) { 
            goto Lm; 
        } 
        return; 
        Lm: 
        $cq = json_decode($fj, true); 
        if (strcasecmp($cq["status"], "CUSTOMER_NOT_FOUND") == 0) { 
            goto U8; 
        } 
        $this->get_current_customer(); 
        goto Gj; 
        U8: 
        $cq = json_decode($V3->send_otp_token($Ha, '', $this, TRUE, FALSE), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto uL; 
        } 
        update_option("mo_saml_message", "There was an error in sending email. Please verify your email and try again."); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_FAILURE_EMAIL"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto iw; 
        uL: 
        update_option("mo_saml_message", " A one time passcode is sent to " . get_option("mo_saml_admin_email") . ". Please enter the otp here to verify your email."); 
        update_option("mo_saml_transactionId", $cq["txId"]); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_EMAIL"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        iw: 
        Gj: 
        ov: 
        goto Zi; 
        qZ: 
        $tX = sanitize_text_field($_POST["idp_name"]); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        if ($Qm[$tX]["enable_idp"]) { 
            goto sr; 
        } 
        update_option("mo_saml_message", "Please Enable the IDP to make it Default IDP."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto DB; 
        sr: 
        $vN->mo_save_environment_settings("saml_default_idp", $tX); 
        DB: 
        Zi: 
        goto Jf; 
        VM: 
        update_option("mo_saml_registration_status", ''); 
        update_option("mo_saml_verify_customer", ''); 
        delete_option("mo_saml_new_registration"); 
        delete_option("mo_saml_admin_email"); 
        delete_option("mo_saml_admin_phone"); 
        Jf: 
        goto pP; 
        sV: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto e3; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Resend OTP failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        e3: 
        $rF = get_option("mo_saml_admin_phone"); 
        $V3 = new CustomerSaml(); 
        $cq = json_decode($V3->send_otp_token('', $rF, $this, FALSE, TRUE), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto Q8; 
        } 
        update_option("mo_saml_message", "There was an error in sending email. Please click on Resend OTP to try again."); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_FAILURE_PHONE"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto Gi; 
        Q8: 
        update_option("mo_saml_message", " A one time passcode is sent to " . $rF . " again. Please check if you got the otp and enter it here."); 
        update_option("mo_saml_transactionId", $cq["txId"]); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_PHONE"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        Gi: 
        pP: 
        goto TS; 
        ck: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto t2; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Resend OTP failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        t2: 
        $Ha = get_option("mo_saml_admin_email"); 
        $V3 = new CustomerSaml(); 
        $cq = json_decode($V3->send_otp_token($Ha, '', $this, TRUE, FALSE), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto uR; 
        } 
        update_option("mo_saml_message", "There was an error in sending email. Please click on Resend OTP to try again."); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_FAILURE_EMAIL"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto zU; 
        uR: 
        update_option("mo_saml_message", " A one time passcode is sent to " . get_option("mo_saml_admin_email") . " again. Please check if you got the otp and enter it here."); 
        update_option("mo_saml_transactionId", $cq["txId"]); 
        update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_EMAIL"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        zU: 
        TS: 
        goto tl; 
        uW: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto op; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Query submit failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        op: 
        $Ha = $_POST["mo_saml_contact_us_email"]; 
        $rF = $_POST["mo_saml_contact_us_phone"]; 
        $Qq = trim($_POST["mo_saml_contact_us_query"]); 
        if (!empty($_POST["send_plugin_config"])) { 
            goto uI; 
        } 
        update_option("send_plugin_config", "off"); 
        goto Cf; 
        uI: 
        $Sv = miniorange_import_export(true, true); 
        $Qq .= $Sv; 
        update_option("send_plugin_config", "on"); 
        Cf: 
        $V3 = new CustomerSaml(); 
        if (empty($Ha) || empty($Qq) || !filter_var($Ha, FILTER_VALIDATE_EMAIL)) { 
            goto Mz; 
        } 
        $v9 = $V3->submit_contact_us($Ha, $rF, $Qq, $this); 
        if ($v9 == false) { 
            goto iK; 
        } 
        update_option("mo_saml_message", "Thanks for getting in touch! We shall get back to you shortly."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        goto bd; 
        iK: 
        update_option("mo_saml_message", "Your query could not be submitted. Please try again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        bd: 
        goto g_; 
        Mz: 
        update_option("mo_saml_message", "Please fill up Email and Query fields to submit your query."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        g_: 
        tl: 
        goto EC; 
        AM: 
        if (mo_saml_is_extension_installed("curl")) { 
            goto Nl; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Login failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Nl: 
        $Ha = ''; 
        $Y3 = ''; 
        if (empty($_POST["email"]) || empty($_POST["password"])) { 
            goto mS; 
        } 
        if ($this->checkPasswordPattern(strip_tags($_POST["password"]))) { 
            goto bi; 
        } 
        $Ha = sanitize_email($_POST["email"]); 
        $Y3 = stripslashes(strip_tags($_POST["password"])); 
        goto yH; 
        bi: 
        update_option("mo_saml_message", "Minimum 6 characters should be present. Maximum 15 characters should be present. Only following symbols (!@#.$%^&*-_) should be present."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        yH: 
        goto WG; 
        mS: 
        update_option("mo_saml_message", "All the fields are required. Please enter valid entries."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        WG: 
        update_option("mo_saml_admin_email", $Ha); 
        update_option("mo_saml_admin_password", $Y3); 
        $V3 = new Customersaml(); 
        $cq = $V3->get_customer_key($this); 
        if ($cq) { 
            goto Y1; 
        } 
        return; 
        Y1: 
        $gJ = json_decode($cq, true); 
        if (json_last_error() == JSON_ERROR_NONE) { 
            goto zu; 
        } 
        update_option("mo_saml_message", "Invalid username or password. Please try again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto ib; 
        zu: 
        update_option("mo_saml_admin_customer_key", $gJ["id"]); 
        update_option("mo_saml_admin_api_key", $gJ["apiKey"]); 
        update_option("mo_saml_customer_token", $gJ["token"]); 
        if (empty($gJ["phone"])) { 
            goto zf; 
        } 
        update_option("mo_saml_admin_phone", $gJ["phone"]); 
        zf: 
        update_option("mo_saml_admin_password", ''); 
        update_option("mo_saml_message", "Customer retrieved successfully"); 
        update_option("mo_saml_registration_status", "Existing User"); 
        delete_option("mo_saml_verify_customer"); 
        if (get_option("sml_lk")) { 
            goto O1; 
        } 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        goto pQ; 
        O1: 
        $ni = get_option("mo_saml_customer_token"); 
        $Il = AESEncryption::decrypt_data(get_option("sml_lk"), $ni); 
        $cq = json_decode($V3->mo_saml_verify_license($Il, $this), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto Rs; 
        } 
        update_option("mo_saml_message", "License key for this instance is incorrect. Make sure you have not tampered with it at all. Please enter a valid license key."); 
        delete_option("sml_lk"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto ly; 
        Rs: 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        ly: 
        pQ: 
        ib: 
        update_option("mo_saml_admin_password", ''); 
        EC: 
        if (!self::mo_check_option_admin_referer("mo_saml_validate_otp")) { 
            goto N8; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto qw; 
        } 
        update_option("mo_saml_message", "ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Validate OTP failed."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        qw: 
        $pl = ''; 
        if (empty($_POST["otp_token"])) { 
            goto A7; 
        } 
        $pl = sanitize_text_field($_POST["otp_token"]); 
        goto MN; 
        A7: 
        update_option("mo_saml_message", "Please enter a value in otp field."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        MN: 
        $V3 = new CustomerSaml(); 
        $cq = json_decode($V3->validate_otp_token(get_option("mo_saml_transactionId"), $pl, $this), true); 
        if (strcasecmp($cq["status"], "SUCCESS") == 0) { 
            goto OY; 
        } 
        update_option("mo_saml_message", "Invalid one time passcode. Please enter a valid otp."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto zJ; 
        OY: 
        $this->create_customer(); 
        zJ: 
        N8: 
        cH: 
    } 
    function mo_saml_save_federation_parameters() 
    { 
        $o4 = array(); 
        $eO = array(); 
        $cM = array(); 
        $j7 = array(); 
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_base_url"); 
        if (!empty($bg)) { 
            goto F1; 
        } 
        $bg = home_url(); 
        F1: 
        $O5 = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_entity_id"); 
        if (!empty($O5)) { 
            goto K1; 
        } 
        $O5 = $bg . "/wp-content/plugins/miniorange-saml-20-single-sign-on/"; 
        K1: 
        $iS = $bg . "/?option=saml_user_login"; 
        if (empty($_POST["default_parameters"])) { 
            goto xQ; 
        } 
        $j7 = array("entityID" => $O5, "return" => $iS); 
        xQ: 
        if (empty($_POST["mo_saml_parameter_names"])) { 
            goto i1; 
        } 
        $eO = $_POST["mo_saml_parameter_names"]; 
        i1: 
        if (empty($_POST["mo_saml_parameter_values"])) { 
            goto Pf; 
        } 
        $cM = $_POST["mo_saml_parameter_values"]; 
        Pf: 
        $o4 = array_combine($eO, $cM); 
        $o4 = array_filter($o4); 
        $o4 = Utilitites::mo_saml_array_merge($o4, $j7); 
        return $o4; 
    } 
    function create_customer() 
    { 
        $V3 = new CustomerSaml(); 
        $gJ = json_decode($V3->create_customer($this), true); 
        if (strcasecmp($gJ["status"], "CUSTOMER_USERNAME_ALREADY_EXISTS") == 0) { 
            goto vo; 
        } 
        if (!(strcasecmp($gJ["status"], "SUCCESS") == 0)) { 
            goto MM; 
        } 
        update_option("mo_saml_admin_customer_key", $gJ["id"]); 
        update_option("mo_saml_admin_api_key", $gJ["apiKey"]); 
        update_option("mo_saml_customer_token", $gJ["token"]); 
        update_option("mo_saml_admin_password", ''); 
        update_option("mo_saml_message", "Thank you for registering with miniorange."); 
        update_option("mo_saml_registration_status", ''); 
        delete_option("mo_saml_verify_customer"); 
        delete_option("mo_saml_new_registration"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        MM: 
        goto WD; 
        vo: 
        $this->get_current_customer(); 
        WD: 
        update_option("mo_saml_admin_password", ''); 
    } 
    function get_current_customer() 
    { 
        $V3 = new CustomerSaml(); 
        $cq = $V3->get_customer_key($this); 
        if ($cq) { 
            goto qC; 
        } 
        return; 
        qC: 
        $gJ = json_decode($cq, true); 
        if (json_last_error() == JSON_ERROR_NONE) { 
            goto mx; 
        } 
        update_option("mo_saml_message", "You already have an account with miniOrange. Please enter a valid password."); 
        update_option("mo_saml_verify_customer", "true"); 
        delete_option("mo_saml_new_registration"); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        goto IP; 
        mx: 
        update_option("mo_saml_admin_customer_key", $gJ["id"]); 
        update_option("mo_saml_admin_api_key", $gJ["apiKey"]); 
        update_option("mo_saml_customer_token", $gJ["token"]); 
        update_option("mo_saml_admin_password", ''); 
        update_option("mo_saml_message", "Your account has been retrieved successfully."); 
        delete_option("mo_saml_verify_customer"); 
        delete_option("mo_saml_new_registration"); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        IP: 
    } 
    function djkasjdksa() 
    { 
        $V4 = "!~@#$%^&*()_+|{}<>?0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
        $h6 = strlen($V4); 
        $XQ = ''; 
        $BT = 0; 
        mm: 
        if (!($BT < 10000)) { 
            goto Xe; 
        } 
        $XQ .= $V4[rand(0, $h6 - 1)]; 
        qk: 
        $BT++; 
        goto mm; 
        Xe: 
        return $XQ; 
    } 
    function miniorange_sso_menu() 
    { 
        $jy = add_menu_page("MO SAML Settings " . __("Configure SAML Identity Provider for SSO", "mo_saml_settings"), "miniOrange SAML 2.0 SSO", "administrator", "mo_saml_settings", array($this, "mo_login_widget_saml_options"), plugin_dir_url(__FILE__) . "images/miniorange.png"); 
        if (!is_plugin_active("miniorange-federation-sso/federation-sso.php")) { 
            goto PL; 
        } 
        add_submenu_page("mo_saml_settings", "Federation SSO", "Federation SSO", "administrator", "mo_saml_federation_sso", "mo_saml_federation_sso"); 
        PL: 
        add_submenu_page("mo_saml_settings", "Manage Multiple Environments", "Manage Multiple Environments", "administrator", "mo_multiple_environment", "mo_multiple_environment"); 
        add_submenu_page("mo_saml_settings", "Error Codes", "Error Codes", "administrator", "mo_error_codes", array("Mo_Saml_Error_Codes_View", "mo_saml_get_error_codes_view")); 
    } 
    function mo_saml_redirect_for_authentication($tX, $SP) 
    { 
        SAMLSPUtilities::mo_saml_check_is_extension_installed(); 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto fD; 
        } 
        return; 
        fD: 
        if (!(!empty($tX) && !SAMLSPUtilities::mo_saml_is_user_logged_in())) { 
            goto PS; 
        } 
        $Tw = esc_url(home_url()) . "/?option=saml_user_login&idp=" . esc_html($tX["idp_name"]) . "&redirect_to=" . esc_url($SP); 
        if (is_feed()) { 
            goto Ts; 
        } 
        echo "<script>window.location.href=' {$Tw} ';</script>"; 
        exit; 
        goto xS; 
        Ts: 
        wp_redirect($Tw); 
        xS: 
        PS: 
    } 
    function mo_saml_login_error_message($s8) 
    { 
        echo "<div id="login_error1"> <p><strong>ERROR</strong>: " . $_SESSION["mo_saml"]["login_error_message"] . "</p></div>"; 
        unset($_SESSION["mo_saml"]["login_error_message"]); 
    } 
    function mo_saml_authenticate($user, $TH, $Y3) 
    { 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) : "false"; 
        if (Mo_License_Service::is_customer_license_verified() && EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_domain_mapping", false, $ha) == "true" && (empty($_REQUEST["saml_sso"]) || !empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] != $Kh)) { 
            goto Po; 
        } 
        return $user; 
        goto NO; 
        Po: 
        if (empty($TH)) { 
            goto bn; 
        } 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_domain_mapping", true, $ha); 
        $B3 = ''; 
        if (empty($_REQUEST["redirect_to"])) { 
            goto XZ; 
        } 
        $B3 = $_REQUEST["redirect_to"]; 
        XZ: 
        if (strpos($TH, "@") !== false) { 
            goto sg; 
        } 
        if (empty($Qm) || EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha) != "false" && !empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] == $Kh) { 
            goto sq; 
        } 
        if (!empty($Y3)) { 
            goto wf; 
        } 
        $NG = new WP_Error("mo_saml_invalid_email", __("<strong>ERROR</strong>: Please enter a valid email address."), ''); 
        return $NG; 
        goto PC; 
        sg: 
        $rO = explode("@", $TH, 2); 
        $uA = trim($rO[1]); 
        $uA = strtolower($uA); 
        $wy = false; 
        if (empty($LM)) { 
            goto nr; 
        } 
        foreach ($LM as $ni => $SE) { 
            $SE = str_replace(" ", '', $SE); 
            $yP = array_map("trim", explode(";", $SE)); 
            $yP = array_map("strtolower", $yP); 
            if (!(SAMLSPUtilities::mo_saml_in_array($uA, $yP) && !empty($Qm[$ni]["enable_idp"]))) { 
                goto jH; 
            } 
            $u9 = $Qm[$ni]; 
            $wy = true; 
            if (empty($Qm[$ni]["enable_idp"])) { 
                goto bh; 
            } 
            $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object(); 
            $Kq->mo_saml_redirect_sso_for_authentication($u9, $B3); 
            goto B7; 
            bh: 
            $Mp = wp_authenticate_username_password($user, $TH, $Y3); 
            return $Mp; 
            B7: 
            jH: 
            o8: 
        } 
        Y7: 
        nr: 
        if ($wy) { 
            goto Bh; 
        } 
        if (!EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_fallback_to_default", false, $ha)) { 
            goto J5; 
        } 
        $sW = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp", false, $ha); 
        if ($sW) { 
            goto Ml; 
        } 
        $vN = new EnvironmentDao($ha); 
        $vN->mo_save_environment_settings("mo_saml_fallback_to_default", ''); 
        $vN->mo_save_environment_settings("mo_saml_domain_login_fail", "true"); 
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_base_url", false, $ha); 
        if (!empty($bg)) { 
            goto Wf; 
        } 
        $bg = home_url(); 
        Wf: 
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["WPSAMLERR034"]); 
        goto Ib; 
        Ml: 
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object(); 
        $Kq->mo_saml_redirect_sso_for_authentication($Qm[$sW], $B3); 
        Ib: 
        J5: 
        return $user; 
        Bh: 
        goto PC; 
        sq: 
        return $user; 
        goto PC; 
        wf: 
        return $user; 
        PC: 
        bn: 
        $NG = new WP_Error(); 
        $NG->add("empty_username", __("<strong>ERROR</strong>: Empty username.")); 
        $NG->add("empty_password", __("<strong>ERROR</strong>: Empty password.")); 
        return $NG; 
        NO: 
    } 
    function mo_saml_redirect_to_idp_list_page_from_login_page() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto XP; 
        } 
        return; 
        XP: 
        $B3 = ''; 
        if (empty($_REQUEST["redirect_to"])) { 
            goto P_; 
        } 
        $B3 = $_REQUEST["redirect_to"]; 
        P_: 
        if (!SAMLSPUtilities::mo_saml_is_user_logged_in()) { 
            goto vT; 
        } 
        if (!empty($B3)) { 
            goto D7; 
        } 
        header("Location: " . home_url()); 
        goto JJ; 
        D7: 
        header("Location: " . $B3); 
        JJ: 
        exit; 
        vT: 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp", false, $ha); 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_login_redirect", false, $ha) == "true")) { 
            goto Qb; 
        } 
        if (!empty($vu)) { 
            goto b6; 
        } 
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["WPSAMLERR034"]); 
        b6: 
        $v8 = apply_filters("mo_saml_pre_auto_redirection", false); 
        if (!$v8) { 
            goto le; 
        } 
        return; 
        le: 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? trim(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha)) : "false"; 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha) == "true")) { 
            goto HR; 
        } 
        if (!empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] === $Kh) { 
            goto ew; 
        } 
        if (!empty($_REQUEST["redirect_to"])) { 
            goto C1; 
        } 
        goto dV; 
        ew: 
        return; 
        goto dV; 
        C1: 
        $B3 = htmlspecialchars($_REQUEST["redirect_to"]); 
        if (!(strpos($B3, "wp-admin") !== false && strpos($B3, "saml_sso=" . $Kh) !== false)) { 
            goto tq; 
        } 
        return; 
        tq: 
        dV: 
        HR: 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $bh = ''; 
        foreach ($Qm as $GZ) { 
            if (!($GZ["idp_name"] === $vu)) { 
                goto Nu; 
            } 
            $bh = $GZ; 
            Nu: 
            T5: 
        } 
        A0: 
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object(); 
        $Kq->mo_saml_redirect_sso_for_authentication($bh, $B3); 
        Qb: 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_auto_redirect_to_public_page", false, $ha) == "true")) { 
            goto LP; 
        } 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) : "false"; 
        if (!empty($_GET["loggedout"]) && $_GET["loggedout"] == "true") { 
            goto Bt; 
        } 
        if (EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha) != "false") { 
            goto Dx; 
        } 
        goto dR; 
        Bt: 
        header("Location: " . home_url()); 
        exit; 
        goto dR; 
        Dx: 
        if (!empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] === $Kh) { 
            goto DY; 
        } 
        if (!empty($_REQUEST["redirect_to"])) { 
            goto hH; 
        } 
        goto PK; 
        DY: 
        return; 
        goto PK; 
        hH: 
        $B3 = $_REQUEST["redirect_to"]; 
        if (!(strpos($B3, "wp-admin") !== false && strpos($B3, "  saml_sso=" . $Kh) !== false)) { 
            goto Wg; 
        } 
        return; 
        Wg: 
        PK: 
        dR: 
        $Ps = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_idp_list_url", false, $ha); 
        $x7 = (!empty($_SERVER["HTTPS"]) ? "https" : "http") . "://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}"; 
        if (!strcmp($x7, $Ps)) { 
            goto RH; 
        } 
        header("Location: " . $Ps); 
        exit; 
        goto Yp; 
        RH: 
        return; 
        Yp: 
        LP: 
    } 
    function mo_saml_auto_redirect() 
    { 
        if (!(!Mo_License_Service::is_customer_license_verified() || SAMLSPUtilities::mo_saml_is_user_logged_in())) { 
            goto Nk; 
        } 
        return; 
        Nk: 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_rss_access", false, $ha) == "true" && is_feed())) { 
            goto CZ; 
        } 
        return; 
        CZ: 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_auto_redirect_to_public_page", false, $ha) == "true" && !empty(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_idp_list_url", false, $ha)))) { 
            goto R8; 
        } 
        $v8 = apply_filters("mo_saml_pre_auto_redirection", false); 
        if (!$v8) { 
            goto pF; 
        } 
        return; 
        pF: 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) : "false"; 
        if (!empty($_GET["loggedout"]) && $_GET["loggedout"] == "true") { 
            goto kq; 
        } 
        if (EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha) != "false") { 
            goto rI; 
        } 
        goto OF; 
        kq: 
        header("Location: " . home_url()); 
        exit; 
        goto OF; 
        rI: 
        if (!empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] === $Kh) { 
            goto qd; 
        } 
        if (!empty($_REQUEST["redirect_to"])) { 
            goto Hr; 
        } 
        goto yL; 
        qd: 
        return; 
        goto yL; 
        Hr: 
        $B3 = $_REQUEST["redirect_to"]; 
        if (!(strpos($B3, "wp-admin") !== false && strpos($B3, "  saml_sso=" . $Kh) !== false)) { 
            goto uk; 
        } 
        return; 
        uk: 
        yL: 
        OF: 
        $Ps = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_idp_list_url", false, $ha); 
        $x7 = (!empty($_SERVER["HTTPS"]) ? "https" : "http") . "://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}"; 
        if (!strcmp($x7, $Ps)) { 
            goto fA; 
        } 
        header("Location: " . $Ps); 
        exit; 
        goto OM; 
        fA: 
        return; 
        OM: 
        R8: 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_redirect_default_idp", false, $ha) == "true")) { 
            goto TX; 
        } 
        $v8 = apply_filters("mo_saml_pre_auto_redirection", false); 
        if (!$v8) { 
            goto GT; 
        } 
        return; 
        GT: 
        $SP = saml_get_current_page_url(); 
        $this->mo_saml_redirect_to_default_idp($SP); 
        TX: 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_registered_only_access", false, $ha) === "true")) { 
            goto mv; 
        } 
        $v8 = apply_filters("mo_saml_pre_auto_redirection", false); 
        if (!$v8) { 
            goto HD; 
        } 
        return; 
        HD: 
        $SP = saml_get_current_page_url(); 
        if (EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_login_redirect", false, $ha) === "true") { 
            goto Zd; 
        } 
        $ow = site_url() . "/wp-login.php"; 
        if (empty($SP)) { 
            goto kb; 
        } 
        $ow = $ow . "?redirect_to=" . urlencode($SP) . "&reauth=1"; 
        kb: 
        wp_safe_redirect($ow); 
        exit; 
        goto vQ; 
        Zd: 
        $this->mo_saml_redirect_to_default_idp($SP); 
        vQ: 
        mv: 
    } 
    function mo_saml_redirect_to_default_idp($SP) 
    { 
        $bh = ''; 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp", false, $ha); 
        if (!empty($vu)) { 
            goto mY; 
        } 
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["WPSAMLERR034"]); 
        mY: 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        if (!(!empty($Qm) && is_array($Qm))) { 
            goto To; 
        } 
        foreach ($Qm as $GZ) { 
            if (!($GZ["idp_name"] === $vu)) { 
                goto m5; 
            } 
            $bh = $GZ; 
            goto hS; 
            m5: 
            nf: 
        } 
        hS: 
        To: 
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object(); 
        $Kq->mo_saml_redirect_sso_for_authentication($bh, $SP); 
    } 
    function mo_saml_modify_login_form() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto PY; 
        } 
        return; 
        PY: 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) : "false"; 
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha) != "false" && (!empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] == $Kh))) { 
            goto qf; 
        } 
        echo "\x9\x9	<script>\xd
	\x9	\x9jQuery("#user_pass").removeAttr("disabled");
\xa\x9\x9\x9</script>
\xa		\x9"; 
        echo "<input type="hidden" name="saml_sso" value="" . $Kh . "">"; 
        return; 
        qf: 
    } 
    function mo_saml_add_login_links() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto Q7; 
        } 
        return; 
        Q7: 
        $this->add_federeation_link(); 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $m9 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_sso_button_idp", true, $ha); 
        echo "<script>\xd\xa\x9\x9\x9	jQuery(document).ready(function () {
\xa	\x9\x9	\x9jQuery("#loginform").append(`<div class="sso-buttons-below" style="padding-top: 35px;"></div>`);
\xa\x9\x9		\x9var $element = jQuery("#user_login");
\xa	\x9		\x9jQuery(`<div class="sso-buttons-above" style="padding-top: 15px;"></div>`).insertBefore(jQuery("label[for='"+$element.attr('id')+"']"));\xd
	\x9	\x9});
\xa	\x9</script>"; 
        if (!(!empty($Qm) and is_array($Qm))) { 
            goto uj; 
        } 
        foreach ($Qm as $bh) { 
            $bK = $bh["idp_name"]; 
            if (!(!empty($m9[$bK]["add_button_wp_login"]) and $m9[$bK]["add_button_wp_login"] == "true")) { 
                goto cB; 
            } 
            $this->mo_saml_add_sso_button($m9, $bK); 
            cB: 
            Hn: 
        } 
        zV: 
        uj: 
    } 
    function mo_saml_add_sso_button($m9, $bK) 
    { 
        if (SAMLSPUtilities::mo_saml_is_user_logged_in()) { 
            goto dT; 
        } 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_sp_base_url", false, $ha); 
        if (!empty($bg)) { 
            goto Ac; 
        } 
        $bg = home_url(); 
        Ac: 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        if (!empty($Qm[$bK]["enable_idp"])) { 
            goto lB; 
        } 
        return ''; 
        lB: 
        $vB = get_sso_button($m9, $bK); 
        $Wy = $vB["button_position"]; 
        $B3 = ''; 
        if (empty($_GET["redirect_to"])) { 
            goto BD; 
        } 
        $B3 = urlencode($_GET["redirect_to"]); 
        BD: 
        $t2 = "<a href="" . $bg . "/?option=saml_user_login&idp=" . $bK . "&redirect_to=" . $B3 . "" style="text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:center;">" . $vB["login_button"] . "</a>"; 
        $t2 = "<div>" . $t2 . "</div>"; 
        $Jb = array("div" => array("id" => array(), "style" => array(), "name" => array()), "a" => array("href" => array(), "style" => array()), "img" => array("style" => array(), "src" => array()), "script" => array("type" => array()), "b" => array()); 
        if ($Wy == "above") { 
            goto pO; 
        } 
        $Jb = array("div" => array("id" => true, "style" => true), "a" => array("href" => true, "style" => true), "img" => array("style" => true, "src" => true), "b" => array()); 
        $t2 = "<div id="" . "sso_button" . $bK . "" style="text-align:center"><div style="padding: 10px 0;font-size:14px;"><b>OR</b></div>" . $t2 . "</div>"; 
        echo "<script>\xd
\x9\x9\x9	jQuery(document).ready(function () {
					jQuery(".sso-buttons-below").append('" . wp_kses($t2, $Jb) . "');
\xa	\x9	\x9});\xd
\x9\x9	\x9</script>"; 
        return; 
        goto oU; 
        pO: 
        $t2 = "<div id="" . "sso_button" . $bK . "" style="text-align:center">" . $t2 . "<div style="padding:10px;font-size:14px;"><b>OR</b></div></div>"; 
        echo "<script>\xd\xa\x9\x9	\x9jQuery(document).ready(function () {\xd
\x9				jQuery(".sso-buttons-above").append('" . wp_kses($t2, $Jb) . "');\xd
\x9	\x9	});
\xa	\x9	\x9</script>"; 
        oU: 
        dT: 
    } 
    function add_federeation_link() 
    { 
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_federations"); 
        if (!$tM) { 
            goto P0; 
        } 
        foreach ($tM as $It => $p0) { 
            if (!$p0["enable"]) { 
                goto T7; 
            } 
            $ow = $p0["discovery_url"]; 
            if (empty($p0["parameters"])) { 
                goto wI; 
            } 
            if (empty($p0["parameters"])) { 
                goto e4; 
            } 
            $ow = $ow . "?"; 
            foreach ($p0["parameters"] as $Ht => $SE) { 
                $ow = $ow . $Ht . "=" . $SE; 
                if (!next($p0["parameters"])) { 
                    goto S1; 
                } 
                $ow = $ow . "&"; 
                S1: 
                k0: 
            } 
            IW: 
            e4: 
            wI: 
            $t2 = "<br/><hr>
\xa\x9	\x9\x9	<div style="text-align:center; padding:5px;">
\xa		\x9		\x9<h4>Login with</h4><br/>
\x9		\x9\x9\x9<a href="" . $ow . "" style="text-decoration:none;" target="_blank">
\xa\x9			\x9\x9	"; 
            if ($It == "InCommon") { 
                goto Fm; 
            } 
            if ($It == "HAKA") { 
                goto WM; 
            } 
            if ($It == "HKAF") { 
                goto eD; 
            } 
            $t2 = $t2 . "<input type="button" value="" . $It . ""
\xa	\x9\x9					style="width:100px;
\x9		\x9\x9\x9\x9	\x9height:50px;\xd\xa\x9	\x9	\x9	\x9	\x9border-radius:5px;\xd
\x9\x9			\x9\x9\x9\x9background-color:#0085ba;\xd\xa\x9\x9		\x9		\x9	border-color:transparent;
\x9\x9\x9\x9		\x9		color:#ffffff;
\xa\x9			\x9\x9\x9\x9\x9font-size:20px;\xd
\x9\x9\x9\x9\x9	\x9\x9\x9padding:0px;">"; 
            goto o_; 
            eD: 
            $t2 = $t2 . "<img src="" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "images/hkaf.png" style="border:none; width:200px; height:60px;" alt="HKAF via miniOrange">"; 
            o_: 
            goto k8; 
            WM: 
            $t2 = $t2 . "<img src="" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "images/haka.png" style="border:none; width:150px; height:75px;" alt="Haka via miniOrange">"; 
            k8: 
            goto Wn; 
            Fm: 
            $t2 = $t2 . "<img src="" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "images/incommon.gif" style="border:none; width:280px; height:60px;" alt="Incommon via miniOrange">"; 
            Wn: 
            $t2 = $t2 . "\xd\xa\x9\x9		\x9	</a>\xd
\x9\x9\x9		</div>\xd
\x9\x9\x9	\x9<hr><br/>"; 
            echo $t2; 
            T7: 
            OX: 
        } 
        Co: 
        P0: 
    } 
    function mo_saml_jquery_default_login() 
    { 
        wp_enqueue_script("jquery"); 
    } 
    function mo_saml_footer_form() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto Vh; 
        } 
        return; 
        Vh: 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $kq = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_domain_mapping", false, $ha); 
        $Sr = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_domain_login_fail", false, $ha); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $yP = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_domain_mapping", true, $ha); 
        $ba = array(); 
        $AE = array(); 
        foreach ($yP as $ni => $SE) { 
            if (!(!empty($Qm[$ni]) && empty($Qm[$ni]["enable_idp"]))) { 
                goto qz; 
            } 
            $AE = $Qm[$ni]["idp_name"]; 
            if (empty($ba)) { 
                goto DJ; 
            } 
            $ba = array($ba, $AE); 
            goto AP; 
            DJ: 
            $ba = $AE; 
            AP: 
            qz: 
            i4: 
        } 
        h0: 
        if (!is_array($ba)) { 
            goto wG; 
        } 
        $ba = implode(",", $ba); 
        wG: 
        if ($kq == "true" && !empty($Qm)) { 
            goto vF; 
        } 
        echo "\x9\x9	<script>\xd
\x9\x9\x9\xd
	\x9\x9jQuery('label[for="user_pass"]').show();\xd\xa	\x9	jQuery('#user_pass').show();
\xa\x9		jQuery('div#login p#nav').show();
\x9\x9\x9\xd\xa\x9\x9	jQuery('#user_pass').val("");\xd
			\xd\xa	\x9\x9</script>
			"; 
        goto RM; 
        vF: 
        echo "\x9\x9<script>\xd\xa\x9	\x9const userLogin = document.querySelector('label[for="user_login"]');\xd\xa		\x9userLogin.textContent = "Email Address";
\xa\x9\x9\x9jQuery('#user_pass').attr('disabled', 'disabled');\xd
\x9	\x9jQuery( "#loginform" ).submit(function( event ) {
\xa\x9\x9\x9\x9var username = jQuery('#user_login').val();\xd
\x9\x9\x9\x9if(username != ''){
	\x9\x9	\x9var validemail = username.indexOf("@");\xd
	\x9\x9		if(validemail != -1){
	\x9				var username_split = username.split('@');\xd\xa\x9					var domain = username_split[1];
\x9	\x9	\x9\x9domain = domain.toLocaleLowerCase();\xd
\x9\x9\x9	\x9	jQuery.ajax({
\xa\x9	\x9	\x9\x9	url:""; 
        echo home_url() . "?get_domain_mapping=true"; 
        echo "",
\xa\x9		\x9\x9\x9\x9async: false,\xd
				\x9		success:function(data) {
\x9\x9	\x9\x9\x9\x9	if(data === undefined || !data){
\xa				\x9\x9	\x9	var password = jQuery('#user_pass').val();
\xa\x9\x9							if(typeof password === 'undefined' || password == ''){
\xa\x9\x9\x9\x9	\x9				jQuery('label[for="user_pass"]').show();\xd\xa	\x9			\x9\x9\x9\x9	jQuery('#user_pass').show();
\x9		\x9\x9	\x9\x9\x9\x9jQuery('div#login p#nav').show();\xd\xa\x9	\x9	\x9\x9\x9\x9		event.preventDefault();\xd
\x9				\x9		\x9}\xd
				\x9			}else{
	\x9	\x9\x9	\x9	\x9var domain_match = false;
\xa	\x9\x9\x9\x9\x9\x9\x9	var dataObj = JSON.parse(data);\xd
	\x9		\x9\x9\x9	\x9var use_wp_credentials = ""; 
        echo $Sr; 
        echo "";\xd\xa\x9	\x9			\x9		var list_of_disabled_idps =""; 
        echo $ba; 
        echo ""
\xd\xa			\x9			\x9	jQuery.each (dataObj, function (key, value){\xd\xa		\x9\x9	\x9			\x9var value = value.replace(/\s+/g, '');
		\x9\x9\x9\x9	\x9		var mapping_domains = value.split(";");
\x9\x9\x9		\x9		\x9\x9var mapping_domains = mapping_domains.map(element => element.toLowerCase());\xd
\x9			\x9\x9	\x9		var domain_found = jQuery.inArray(domain,mapping_domains);
			\x9\x9\x9\x9\x9\x9\x9if(domain_found > -1){
\xa						\x9	\x9		var search_disable_idp = list_of_disabled_idps.includes(key)
\xa	\x9\x9\x9\x9\x9\x9	\x9\x9\x9if(search_disable_idp == true)
	\x9		\x9	\x9	\x9			domain_match = false;
\x9	\x9	\x9					\x9else\xd
				\x9\x9	\x9\x9\x9\x9	domain_match = true;\xd
		\x9\x9\x9\x9	\x9		}
\xa\x9\x9\x9\x9\x9	\x9\x9	});\xd\xa\x9	\x9\x9\x9\x9\x9		if(!domain_match){\xd
	\x9\x9			\x9		\x9\x9	\xd
	\x9\x9		\x9	\x9\x9		\x9if(use_wp_credentials){\xd
\x9\x9		\x9\x9\x9	\x9				jQuery('label[for="user_pass"]').show();\xd\xa	\x9\x9\x9	\x9\x9\x9\x9		\x9\x9jQuery('#user_pass').show();\xd\xa\x9\x9	\x9\x9	\x9\x9		\x9\x9\x9jQuery('div#login p#nav').show();
\x9\x9	\x9\x9\x9\x9	\x9		\x9\x9\xd\xa	\x9	\x9\x9\x9	\x9\x9			\x9var password = jQuery('#user_pass').val();\xd\xa		\x9\x9\x9		\x9			\x9	\xd\xa\x9			\x9			\x9\x9			if(password == ''){
\xa	\x9\x9\x9					\x9\x9	\x9\x9event.preventDefault();
	\x9\x9\x9\x9		\x9	\x9\x9		}
			\x9					\x9			jQuery('#user_pass').removeAttr('disabled');
\xd
			\x9\x9\x9						}\xd\xa		\x9\x9\x9				}\xd\xa	\x9	\x9\x9\x9		}\xd\xa	\x9\x9\x9	\x9	}
	\x9	\x9\x9	});
\xa	\x9	\x9\x9}
\xa		\x9	}\xd
	\x9\x9});\xd\xa			\xd
\x9\x9</script>\xd
	
	"; 
        RM: 
        $this->mo_saml_modify_login_form(); 
    } 
    function mo_saml_init_login_form() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto aH; 
        } 
        return; 
        aH: 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("saml_idp_domain_mapping", true, $ha); 
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_backdoor_url", false, $ha) : "false"; 
        $kq = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_enable_domain_mapping", false, $ha); 
        if (!(!empty($Qm) && $kq && Mo_License_Service::is_customer_license_valid(false, false))) { 
            goto v5; 
        } 
        $vy = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_allow_wp_signin", false, $ha); 
        if (!empty($_GET["get_domain_mapping"]) && $_GET["get_domain_mapping"] == "true") { 
            goto ku; 
        } 
        if ($vy != "false" && (!empty($_REQUEST["saml_sso"]) && $_REQUEST["saml_sso"] == $Kh)) { 
            goto nA; 
        } 
        if (!empty($_REQUEST["redirect_to"])) { 
            goto Jy; 
        } 
        goto Ax; 
        nA: 
        return; 
        goto Ax; 
        Jy: 
        $B3 = $_REQUEST["redirect_to"]; 
        if (!(strpos($B3, "wp-admin") !== false && strpos($B3, "saml_sso=false") !== false)) { 
            goto Kg; 
        } 
        return; 
        Kg: 
        Ax: 
        goto Zg; 
        ku: 
        echo json_encode($LM); 
        exit; 
        Zg: 
        add_filter("gettext", function ($Ze) { 
            if (!SAMLSPUtilities::mo_saml_in_array($GLOBALS['pagenow'], array('wp-login.php'))) { 
                goto y1; 
            } 
            if (!("Username" == $Ze)) { 
                goto e1; 
            } 
            return "Email"; 
            e1: 
            y1: 
            return $Ze; 
        }, 20); 
        wp_register_style("hide-login", plugins_url("includes/css/hide-login.css?version=4.1.3", __FILE__)); 
        wp_register_style("show-login", plugins_url("includes/css/show-login.css?version=4.1.3", __FILE__)); 
        wp_enqueue_style("show-login"); 
        wp_enqueue_style("hide-login"); 
        v5: 
    } 
    function mo_get_saml_login_shortcode($Ox = array()) 
    { 
        $KI = get_site_option("saml_identity_providers"); 
        $KI = maybe_unserialize($KI); 
        if (!empty($KI)) { 
            goto rk; 
        } 
        return "No IDP Configured"; 
        rk: 
        $RQ = false; 
        $Ox = map_deep(wp_unslash($Ox), "sanitize_text_field"); 
        if (empty($KI)) { 
            goto xD; 
        } 
        foreach ($KI as $bh) { 
            $fx = $bh["idp_name"]; 
            if (!($fx == $Ox["idp"])) { 
                goto H4; 
            } 
            $RQ = true; 
            goto vM; 
            H4: 
            N6: 
        } 
        vM: 
        xD: 
        if ($RQ) { 
            goto ra; 
        } 
        return "This IDP not found in the list"; 
        goto Y6; 
        ra: 
        $s8 = get_site_option("mo_saml_shortcode_message"); 
        $t2 = "<style>.isa_error {
                        color: #D8000C;\xd
                        background-color: #FFD2D2;
                    }
                    .isa_error i {\xd\xa                            margin:10px 22px;
                            font-size:2em;
\xa                            vertical-align:middle;
\xa                        }
                        .isa_error {\xd
                        margin: 10px 0px;\xd
                        padding:12px;
\xa                         \xd\xa                        }\xd
                    </style>
            <form action="" name="saml_request_with_email" method="post">\xd\xa    \xd
            <div class="container">"; 
        if (!$s8) { 
            goto lp; 
        } 
        $t2 .= "<div class="isa_error">" . $s8 . "</div>"; 
        lp: 
        $t2 .= "<label for="uname"><b>Username</b></label>
            <input type="text" placeholder="Enter Username" name="uname_email" required>\xd
            <input type="hidden" name="option" value="saml_user_login"/>
\xa            <input type="hidden" name="optionn" value="mo_saml_request_with_email"/>\xd
            <input type="hidden" name="idp" value="" . esc_html($Ox["idp"]) . "">
            <button type="submit" class="button button-primary button-large" >Login</button>\xd
            </div>\xd\xa             </form>"; 
        delete_site_option("mo_saml_shortcode_message"); 
        return $t2; 
        Y6: 
    } 
    function mo_get_saml_idp_list_shortcode() 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto Gf; 
        } 
        return; 
        Gf: 
        if (SAMLSPUtilities::mo_saml_is_user_logged_in()) { 
            goto FY; 
        } 
        $t2 = ''; 
        if (mo_saml_is_sp_configured()) { 
            goto l6; 
        } 
        $t2 = "Please configure the miniOrange SAML Plugin first."; 
        goto KF; 
        l6: 
        $B3 = urlencode(saml_get_current_page_url()); 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $za = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_shortcode_login_text", false, $ha); 
        if ($za) { 
            goto Zq; 
        } 
        $za = "Login with  "; 
        Zq: 
        $t2 = $za . "  "; 
        $t2 = $t2 . "<select onchange="redirectToIDP(this.value)">
\x9\x9\x9	\x9<option disabled selected>--Select your IdP--</option>"; 
        $ik = ''; 
        foreach ($Qm as $ni => $SE) { 
            if (!empty($SE["enable_idp"])) { 
                goto Ul; 
            } 
            goto mf; 
            Ul: 
            $We = !empty($SE["custom_login_text"]) ? $SE["custom_login_text"] : $ni; 
            $ik = $ik . "<option value="" . home_url() . "/?option=saml_user_login&idp=" . $ni . "&redirect_to=" . $B3 . "">" . $We . "</option>"; 
            mf: 
        } 
        MO: 
        $t2 = $t2 . $ik . "</select>\xd\xa\x9	\x9\x9	<script>
	\x9\x9\x9	function redirectToIDP(url){\xd\xa\x9\x9	\x9	\x9location = url;
\xa			\x9	}
	\x9\x9\x9	</script>\xd
\x9	\x9		"; 
        KF: 
        return $t2; 
        FY: 
        return self::mo_saml_get_shortcode_for_logged_in_users(); 
    } 
    function mo_saml_get_idp_shortcode($Ox = array()) 
    { 
        if (Mo_License_Service::is_customer_license_verified()) { 
            goto Iy; 
        } 
        return; 
        Iy: 
        if (!SAMLSPUtilities::mo_saml_is_user_logged_in()) { 
            goto fY; 
        } 
        return self::mo_saml_get_shortcode_for_logged_in_users(); 
        fY: 
        if (mo_saml_is_sp_configured()) { 
            goto y7; 
        } 
        $t2 = "Please configure the miniOrange SAML Plugin first."; 
        goto bp; 
        y7: 
        $Ox = map_deep(wp_unslash($Ox), "sanitize_text_field"); 
        $B3 = urlencode(saml_get_current_page_url()); 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $za = EnvironmentHelper::getOptionForSelectedEnvironment("mo_saml_idp_shortcode_login_text", false, $ha); 
        if ($za) { 
            goto WL; 
        } 
        $za = "Login with ##IDP##"; 
        WL: 
        $fx = ''; 
        if (empty($Ox["idp"])) { 
            goto G0; 
        } 
        $S5 = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        $fx = $Ox["idp"]; 
        if (!empty($S5[$Ox["idp"]])) { 
            goto Nx; 
        } 
        $t2 = "Please configure the miniOrange SAML Plugin with <strong>" . esc_html($fx) . "</strong> first."; 
        return $t2; 
        Nx: 
        goto O9; 
        G0: 
        $fx = EnvironmentHelper::getOptionForSelectedEnvironment("saml_default_idp", false, $ha); 
        O9: 
        $za = str_replace("##IDP##", $fx, $za); 
        $t2 = $za . "  "; 
        $t2 = "<a style = "text-decoration : none;"href="" . home_url() . "/?option=saml_user_login&idp=" . esc_html($fx) . "&redirect_to=" . $B3 . "">" . $t2 . "</a>"; 
        bp: 
        return $t2; 
    } 
    function mo_saml_get_shortcode_for_logged_in_users() 
    { 
        $t2 = ''; 
        $current_user = wp_get_current_user(); 
        $ha = EnvironmentHelper::getCurrentEnvironment(); 
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true, $ha); 
        if (empty(get_user_meta($current_user->ID, "mo_saml_logged_in_with_idp", true))) { 
            goto QP; 
        } 
        $fT = get_user_meta($current_user->ID, "mo_saml_logged_in_with_idp", true); 
        $Eo = $Qm[$fT]; 
        QP: 
        $yM = "Hello,"; 
        if (empty($Eo["custom_greeting_text"])) { 
            goto Dl; 
        } 
        $yM = $Eo["custom_greeting_text"]; 
        Dl: 
        $AY = ''; 
        if (empty($Eo["greeting_name"])) { 
            goto SJ; 
        } 
        switch ($Eo["greeting_name"]) { 
            case "USERNAME": 
                $AY = $current_user->user_login; 
                goto pS; 
            case "EMAIL": 
                $AY = $current_user->user_email; 
                goto pS; 
            case "FNAME": 
                $AY = $current_user->user_firstname; 
                goto pS; 
            case "LNAME": 
                $AY = $current_user->user_lastname; 
                goto pS; 
            case "FNAME_LNAME": 
                $AY = $current_user->user_firstname . " " . $current_user->user_lastname; 
                goto pS; 
            case "LNAME_FNAME": 
                $AY = $current_user->user_lastname . " " . $current_user->user_firstname; 
                goto pS; 
            default: 
                $AY = $current_user->user_login; 
        } 
        Pc: 
        pS: 
        SJ: 
        if (!empty(trim($AY))) { 
            goto lS; 
        } 
        $AY = $current_user->user_login; 
        lS: 
        $V1 = $yM . " " . $AY; 
        $Ro = "Logout"; 
        if (empty($Eo["custom_logout_text"])) { 
            goto qG; 
        } 
        $Ro = $Eo["custom_logout_text"]; 
        qG: 
        $t2 = $V1 . " | <a href="" . wp_logout_url(saml_get_current_page_url()) . "" title="logout" >" . $Ro . "</a></li>"; 
        $ow = saml_get_current_page_url(); 
        $vN = new EnvironmentDao($ha); 
        $vN->mo_save_environment_settings("logout_redirect_url", $ow); 
        return $t2; 
    } 
    function _handle_upload_metadata() 
    { 
        if (!(!empty($_FILES["metadata_file"]) || !empty($_POST["metadata_url"]))) { 
            goto U0; 
        } 
        if (!empty($_FILES["metadata_file"]["tmp_name"])) { 
            goto pz; 
        } 
        if (mo_saml_is_extension_installed("curl")) { 
            goto Cy; 
        } 
        update_option("mo_saml_message", "PHP cURL extension is not installed or disabled. Cannot fetch metadata from URL."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Cy: 
        $ow = filter_var(htmlspecialchars($_POST["metadata_url"]), FILTER_SANITIZE_URL); 
        $qZ = SAMLSPUtilities::mo_saml_wp_remote_call($ow, array("sslverify" => false), true); 
        if ($qZ) { 
            goto QD; 
        } 
        update_option("mo_saml_message", "Please provide a valid metadata URL."); 
        return; 
        QD: 
        if (!is_null($qZ)) { 
            goto Tf; 
        } 
        $od = null; 
        goto x9; 
        Tf: 
        $od = $qZ; 
        x9: 
        goto ea; 
        pz: 
        $od = @file_get_contents($_FILES["metadata_file"]["tmp_name"]); 
        ea: 
        $vN = new EnvironmentDao(); 
        $Zo = EnvironmentHelper::getOptionForSelectedEnvironment("saml_metadata_url_for_sync", true, EnvironmentHelper::getCurrentEnvironment()); 
        if (empty($_POST["saml_identity_metadata_provider"])) { 
            goto ON; 
        } 
        $fx = $_POST["saml_identity_metadata_provider"]; 
        if (!empty($_POST["sync_metadata"])) { 
            goto lb; 
        } 
        if (!isset($Zo[$fx])) { 
            goto Ci; 
        } 
        unset($Zo[$fx]); 
        Ci: 
        $vN->mo_save_environment_settings("saml_metadata_url_for_sync", $Zo); 
        $vN->mo_save_environment_settings("saml_metadata_url_for_sync_multiple_idp", ''); 
        $vN->mo_save_environment_settings("saml_metadata_sync_interval", ''); 
        wp_unschedule_event(wp_next_scheduled("metadata_sync_cron_action", array($fx)), "metadata_sync_cron_action", array($fx)); 
        goto oC; 
        lb: 
        $SE = array(); 
        $SE["metadata_url"] = $_POST["metadata_url"]; 
        $SE["sync_interval"] = $_POST["sync_interval"]; 
        $SE["sync_certificate_metadata"] = isset($_POST["sync_certificate_metadata"]) ? $_POST["sync_certificate_metadata"] : ''; 
        $Zo[$fx] = $SE; 
        $vN->mo_save_environment_settings("saml_metadata_url_for_sync", $Zo); 
        if (wp_next_scheduled("metadata_sync_cron_action", array($fx))) { 
            goto qI; 
        } 
        wp_schedule_event(time(), $_POST["sync_interval"], "metadata_sync_cron_action", array($fx)); 
        qI: 
        oC: 
        ON: 
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object(); 
        $fS->mo_saml_upload_metadata($od); 
        U0: 
    } 
    function upload_metadata($od, $fx = '', $YD = false) 
    { 
        if (!empty($od)) { 
            goto OH; 
        } 
        update_option("mo_saml_message", "Please provide a valid metadata file."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto TN; 
        OH: 
        $zl = SAMLSPUtilities::mo_saml_safe_load_xml($od, Mo_Saml_Error_Codes::$error_codes["WPSAMLERR026"], true); 
        TN: 
        if ($zl) { 
            goto XW; 
        } 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        XW: 
        $db = $zl->firstChild; 
        if (!empty($db)) { 
            goto fXn; 
        } 
        if (!empty($_FILES["metadata_file"]["tmp_name"])) { 
            goto ebn; 
        } 
        if (!empty($_POST["metadata_url"])) { 
            goto ieR; 
        } 
        if (!empty($GW)) { 
            goto Ip; 
        } 
        update_option("mo_saml_message", "Please provide a valid metadata file or a valid URL."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto iZC; 
        Ip: 
        update_option("mo_saml_message", "Unable to fetch Metadata. Please check your IDP configuration again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        iZC: 
        goto iZR; 
        ieR: 
        update_option("mo_saml_message", "Please provide a valid metadata URL."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        iZR: 
        goto caR; 
        ebn: 
        update_option("mo_saml_message", "Please provide a valid metadata file."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        caR: 
        goto sKK; 
        fXn: 
        $DT = new IDPMetadataReader($zl); 
        $Qm = $DT->getIdentityProviders(); 
        if (empty($Qm)) { 
            goto LM; 
        } 
        $Oc = SAMLSPUtilities::mo_saml_upload_idp_metadata_validations($Qm); 
        if (!$Oc) { 
            goto s8; 
        } 
        return; 
        s8: 
        goto HB; 
        LM: 
        if (empty($_FILES["metadata_file"]) && "Upload" === $hh) { 
            goto Us; 
        } 
        update_option("mo_saml_message", "Please provide a valid metadata and check your IDP configuration again."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        goto Nr; 
        Us: 
        update_option("mo_saml_message", "Please provide a valid metadata file."); 
        SAMLSPUtilities::mo_saml_show_error_message(); 
        return; 
        Nr: 
        HB: 
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("saml_identity_providers", true); 
        foreach ($Qm as $ni => $tX) { 
            $Le = $tX->getIdpName(); 
            if (!empty($Le)) { 
                goto kz; 
            } 
            if (!empty($fx)) { 
                goto rC; 
            } 
            if (!empty($_POST["saml_identity_metadata_provider"])) { 
                goto KY; 
            } 
            return; 
            goto HZ; 
            KY: 
            $Le = $_POST["saml_identity_metadata_provider"]; 
            HZ: 
            goto iQ; 
            rC: 
            $Le = $fx; 
            iQ: 
            kz: 
            $Le = str_replace(" ", "_", $Le); 
            if (!$YD) { 
                goto Ar; 
            } 
            $x_ = $tX->getSigningCertificate(); 
            if (!is_array($x_)) { 
                goto Yl; 
            } 
            foreach ($x_ as $ni => $SE) { 
                $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE); 
                Sn: 
            } 
            kH: 
            Yl: 
            $Z8 = array("x509_certificate" => $x_); 
            goto ga; 
            Ar: 
            $Z8 = $this->fetchMetadata($tX, $Le); 
            ga: 
            $vN = new EnvironmentDao(); 
            if (!(0 === count($KI))) { 
                goto pV; 
            } 
            $vN->mo_save_environment_settings("saml_default_idp", $Le); 
            pV: 
            if (empty($KI[$Le])) { 
                goto tz; 
            } 
            $Z8 = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $Z8); 
            tz: 
            $KI[$Le] = $Z8; 
            if (empty($KI[''])) { 
                goto gY; 
            } 
            unset($KI['']); 
            gY: 
            $vN->mo_save_environment_settings("saml_identity_providers", $KI); 
            NQ: 
        } 
        Gn: 
        update_option("mo_saml_message", "Identity Provider details retrieved successfully."); 
        SAMLSPUtilities::mo_saml_show_success_message(); 
        sKK: 
    } 
    function fetchMetadata($tX, $Le) 
    { 
        $Vz = ''; 
        $yM = ''; 
        $xU = ''; 
        $nf = ''; 
        $qV = ''; 
        $gs = ''; 
        $VI = ''; 
        $Uv = array("custom_login_text" => $Vz, "custom_greeting_text" => $yM, "greeting_name" => $xU, "custom_logout_text" => $nf); 
        $I_ = array("saml_request" => $qV, "saml_response" => $gs, "test_status" => $VI); 
        $x6 = $tX->getLoginBindingType(); 
        $qC = $tX->getLoginURL(mo_saml_binding_type($x6)); 
        $QO = $tX->getLogoutBindingType(); 
        $pE = ''; 
        if (!$tX->getLogoutDetails()) { 
            goto afO; 
        } 
        $pE = $tX->getLogoutURL(mo_saml_binding_type($QO)); 
        afO: 
        $EZ = $tX->isRequestSigned() === "true" ? "checked" : "unchecked"; 
        $gz = $tX->getEntityID(); 
        $x_ = $tX->getSigningCertificate(); 
        if (!is_array($x_)) { 
            goto pI_; 
        } 
        foreach ($x_ as $ni => $SE) { 
            $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE); 
            YVo: 
        } 
        hVn: 
        pI_: 
        $eS = $tX->getNameIdFormats(); 
        $KR = mo_options_enum_nameid_formats::UNSPECIFIED; 
        if (empty($eS)) { 
            goto ftm; 
        } 
        $ID = mo_options_enum_nameid_formats::getConstants(); 
        foreach ($eS as $ni => $SE) { 
            $zZ = $eS[$ni]; 
            if (!in_array($zZ, $ID, true)) { 
                goto McJ; 
            } 
            $KR = $zZ; 
            goto DrY; 
            McJ: 
            Erg: 
        } 
        DrY: 
        ftm: 
        $Z8 = array("idp_name" => $Le, "sso_binding_type" => $x6, "sso_url" => $qC, "slo_binding_type" => $QO, "slo_url" => $pE, "idp_entity_id" => $gz, "nameid_format" => $KR, "x509_certificate" => $x_, "response_signed" => "checked", "assertion_signed" => "checked", "request_signed" => $EZ, "mo_saml_encoding_enabled" => "checked", "enable_idp" => true); 
        $Z8 = SAMLSPUtilities::mo_saml_array_merge($Z8, $Uv); 
        $Z8 = SAMLSPUtilities::mo_saml_array_merge($Z8, $I_); 
        return $Z8; 
    } 
    function checkPasswordPattern($Y3) 
    { 
        $yX = "/^[(\w)*(\!\@\#\$\%\^\&\*\.\-\_)*]+$/"; 
        return !preg_match($yX, $Y3); 
    } 
    function mo_saml_parse_expiry_date($yC) 
    { 
        $Ah = new DateTime($yC); 
        $dd = $Ah->getTimestamp(); 
        return date("F j, Y", $dd); 
    } 
    function is_license_expired($g_) 
    { 
        $Ah = new DateTime($g_); 
        $eo = new DateTime(); 
        if ($eo > $Ah) { 
            goto GkO; 
        } 
        return false; 
        goto FlR; 
        GkO: 
        return true; 
        FlR: 
    } 
} 
function mo_saml_binding_type($Yi) 
{ 
    if ($Yi == "HttpRedirect") { 
        goto kjN; 
    } 
    return "HTTP-POST"; 
    goto Rw7; 
    kjN: 
    return "HTTP-Redirect"; 
    Rw7: 
} 
Mo_SAML_Plugin::mo_saml_get_object(); 
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * This file is a part of the miniorange-saml-20-single-sign-on plugin.
 *
 * @link https://plugins.miniorange.com/
 * @author miniOrange
 * @package miniorange-saml-20-single-sign-on
 */
/*
 * Plugin Name: miniOrange SAML SSO Multiple IDP
 * Plugin URI: https://miniorange.com/
 * Description: (Single Site Multiple IdP)miniOrange SAML 2.0 SSO enables user to perform Single Sign On with any SAML 2.0 enabled Identity Provider.
 * Version: 25.2.0
 * Author: miniOrange
 * Author URI: https://miniorange.com/
 */


define("\x4d\117\137\123\101\115\x4c\137\120\114\x55\107\x49\116\137\x44\x49\x52", dirname(__FILE__));
define("\115\x4f\x5f\x53\x41\x4d\x4c\137\x4f\x50\124\x49\117\x4e\123\x5f\105\x4e\125\115", "\x2f\151\156\x63\x6c\165\144\x65\x73\x2f\154\151\x62\x2f\x6d\x6f\55\157\160\x74\x69\157\156\x73\x2d\145\156\x75\x6d\x2e\x70\150\x70");
require_once MO_SAML_PLUGIN_DIR . MO_SAML_OPTIONS_ENUM;
require Mo_Saml_Plugin_Files::MO_SAML_CLASS_CUSTOMER;
require Mo_Saml_Plugin_Files::MO_SAML_SETTINGS_PAGE;
require Mo_Saml_Plugin_Files::MO_SAML_METADATA_READER;
require_once Mo_Saml_Plugin_Files::MO_SAML_PLUGIN_VERSION_UPDATE;
require_once Mo_Saml_Plugin_Files::MO_SAML_ENVIRONMENT_UTILS;
require_once Mo_Saml_Plugin_Files::MO_SAML_ENVIRONMENT_DAO;
require_once Mo_Saml_Plugin_Files::MO_SAML_SSO_WIDGET;
require_once Mo_Saml_Plugin_Files::MO_SAML_LICENSE_LIB_AUTOLOADER;
require_once Mo_Saml_Plugin_Files::MO_SAML_XML_SEC_LIBS;
require_once Mo_Saml_Plugin_Files::MO_SAML_USER_LOGOUT_HANDLER;
require_once Mo_Saml_Plugin_Files::MO_SAML_METADATA_IMPORT_HANDLER;
require_once Mo_Saml_Plugin_Files::MO_SAML_REDIRECTION_SSO_HANDLER;
use RobRichards\XMLSecLibs\XMLSecurityKey;
use RobRichards\XMLSecLibs\XMLSecurityDSig;
use RobRichards\XMLSecLibs\XMLSecEnc;
use MOSAML\LicenseLibrary\Classes\Mo_License_Library;
use MOSAML\LicenseLibrary\Mo_License_Service;
class Mo_SAML_Plugin
{
    private $mo_saml_user_logout_handler;
    private static $instance;
    public static function mo_saml_get_object()
    {
        if (isset(self::$instance)) {
            goto Jq;
        }
        $yS = __CLASS__;
        self::$instance = new $yS();
        Jq:
        return self::$instance;
    }
    function __construct()
    {
        if (!mo_saml_is_extension_installed("\x6f\x70\x65\x6e\163\163\154")) {
            goto hi;
        }
        new Mo_License_Library();
        hi:
        add_action("\141\144\155\x69\x6e\137\x6d\145\156\x75", array($this, "\155\x69\x6e\151\x6f\x72\x61\156\x67\x65\x5f\163\163\x6f\137\155\145\156\x75"));
        add_action("\141\x64\155\151\x6e\137\x69\156\x69\x74", array($this, "\x6d\x6f\x5f\x73\x61\x6d\154\x5f\144\157\137\x70\x6c\165\147\151\156\x5f\x65\x78\x74\x65\x6e\163\x69\x6f\x6e\x5f\x63\150\x65\143\153\x73"));
        add_action("\141\144\155\151\156\x5f\x69\x6e\x69\164", array($this, "\x6d\x69\156\151\157\x72\141\x6e\147\x65\x5f\x6c\157\x67\x69\x6e\x5f\167\151\144\x67\x65\x74\x5f\163\x61\155\x6c\137\163\141\166\x65\x5f\163\145\164\x74\151\x6e\x67\x73"));
        add_action("\x61\x64\x6d\151\x6e\x5f\x65\156\x71\x75\x65\165\x65\x5f\x73\143\x72\151\160\164\x73", array($this, "\x70\x6c\x75\147\151\x6e\137\x73\x65\x74\164\x69\x6e\x67\x73\x5f\x73\164\x79\x6c\145"));
        register_activation_hook(__FILE__, array($this, "\x6d\157\137\x73\x73\157\x5f\x73\141\155\x6c\x5f\x61\143\x74\151\166\141\164\x65"));
        register_deactivation_hook(__FILE__, array($this, "\x6d\x6f\x5f\x73\x73\x6f\137\x73\x61\x6d\154\137\144\145\x61\143\164\x69\x76\141\x74\145"));
        add_action("\141\144\x6d\151\x6e\137\x65\x6e\x71\x75\x65\x75\145\137\x73\x63\162\x69\x70\164\x73", array($this, "\x70\x6c\165\147\151\156\137\163\x65\x74\164\x69\156\147\163\137\x73\x63\x72\x69\x70\x74"));
        remove_action("\141\x64\x6d\x69\156\137\156\157\164\151\143\145\x73", array($this, "\x6d\x6f\137\x73\x61\x6d\x6c\137\163\165\143\143\145\163\x73\x5f\x6d\x65\163\163\x61\147\x65"));
        remove_action("\141\144\x6d\151\156\x5f\156\157\x74\151\143\145\163", array($this, "\155\157\137\x73\141\155\x6c\137\x65\x72\162\x6f\x72\137\155\x65\163\x73\x61\147\145"));
        add_filter("\141\165\x74\150\x65\x6e\164\151\143\x61\164\145", array($this, "\155\157\137\163\x61\x6d\154\x5f\141\x75\164\150\x65\156\164\151\x63\141\x74\x65"), 30, 3);
        add_action("\167\160\x5f\141\x75\164\150\145\x6e\x74\151\x63\141\164\145", array($this, "\x6d\x6f\137\x73\141\x6d\154\x5f\x72\145\x64\x69\162\145\x63\164\x5f\x74\157\137\151\144\x70\x5f\154\151\x73\x74\137\x70\141\147\x65\137\x66\x72\x6f\x6d\137\154\157\147\x69\156\x5f\160\141\147\145"));
        add_action("\167\x70", array($this, "\x6d\x6f\x5f\163\141\x6d\154\137\141\x75\x74\157\x5f\x72\145\144\151\162\x65\x63\164"));
        $vP = Mo_SAML_Login_Widget::mo_saml_get_object();
        add_action("\x69\x6e\x69\x74", array($vP, "\x6d\x6f\x5f\x73\141\x6d\154\137\x77\151\x64\x67\145\164\x5f\x69\x6e\x69\164"));
        add_action("\154\157\147\151\156\x5f\x66\x6f\162\x6d", array($this, "\155\x6f\x5f\x73\141\155\x6c\137\155\x6f\144\151\x66\171\x5f\x6c\x6f\147\x69\x6e\137\x66\x6f\162\x6d"), 10, 1);
        add_action("\154\157\147\151\156\x5f\x66\157\162\155", array($this, "\155\157\x5f\163\x61\x6d\154\x5f\141\144\x64\x5f\x6c\157\x67\151\x6e\x5f\x6c\151\156\x6b\163"), 15, 1);
        add_shortcode("\x4d\x4f\137\123\101\x4d\114\x5f\x4c\x4f\107\111\x4e", array($this, "\x6d\157\137\x67\x65\164\x5f\x73\x61\155\154\137\154\157\147\151\x6e\137\163\x68\x6f\x72\164\143\x6f\x64\x65"));
        add_shortcode("\115\117\x5f\x53\101\x4d\114\137\x49\104\120\x5f\x4c\x49\x53\124", array($this, "\155\157\137\147\145\164\x5f\x73\141\155\154\137\x69\144\x70\137\x6c\151\x73\164\x5f\163\x68\x6f\x72\x74\143\x6f\x64\x65"));
        add_shortcode("\115\117\x5f\x53\x41\x4d\x4c\137\x46\x4f\122\115", array($this, "\x6d\x6f\x5f\x73\141\155\154\137\x67\x65\164\x5f\x69\144\160\137\x73\x68\x6f\x72\x74\x63\x6f\144\x65"));
        add_action("\151\x6e\151\164", array($this, "\x6d\157\x5f\x73\x61\x6d\154\137\x69\x6e\151\164\137\x6c\157\x67\x69\156\x5f\146\x6f\162\x6d"));
        add_action("\x6c\x6f\x67\151\156\137\x66\x6f\x6f\164\145\162", array($this, "\155\157\137\x73\x61\155\154\x5f\146\x6f\x6f\164\145\x72\x5f\x66\157\162\x6d"));
        add_action("\154\157\x67\x69\156\137\145\x6e\161\x75\x65\165\x65\x5f\x73\x63\162\151\x70\164\x73", array($this, "\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x6a\x71\165\x65\162\171\x5f\x64\x65\146\141\x75\154\x74\x5f\154\157\147\x69\x6e"));
        add_filter("\x63\x72\157\156\x5f\163\143\150\x65\144\165\x6c\x65\x73", array($this, "\x6d\171\160\x72\x65\x66\x69\x78\x5f\x61\x64\144\x5f\143\162\x6f\x6e\x5f\163\x63\150\x65\144\x75\154\x65"));
        add_action("\155\145\164\x61\x64\141\x74\x61\137\x73\171\156\x63\x5f\x63\162\x6f\156\137\141\x63\x74\x69\157\x6e", array($this, "\x6d\x65\164\141\x64\141\164\141\137\163\171\x6e\143\x5f\143\162\x6f\156\137\x61\x63\164\x69\x6f\156"), 10, 1);
        add_action("\141\x64\x6d\151\156\x5f\x69\x6e\x69\164", array($this, "\144\x65\x66\x61\165\x6c\164\x5f\x63\145\x72\164\151\x66\x69\x63\141\164\x65"));
        add_filter("\155\x61\x6e\141\147\145\x5f\165\x73\145\162\163\137\x63\x6f\x6c\x75\x6d\x6e\x73", array($this, "\x6d\x6f\137\x73\141\155\x6c\137\x63\165\x73\x74\157\x6d\x5f\141\164\164\162\137\x63\x6f\154\x75\x6d\156"));
        add_filter("\155\141\156\x61\147\145\x5f\165\163\x65\x72\163\x5f\143\x75\163\164\157\155\x5f\143\157\154\165\x6d\156", array($this, "\x6d\x6f\137\163\141\x6d\154\x5f\x61\x74\x74\162\x5f\143\x6f\154\165\155\156\x5f\x63\157\x6e\x74\145\156\164"), 1, 3);
        add_action("\x61\x64\x6d\151\x6e\137\x69\x6e\x69\164", "\155\x6f\137\163\141\x6d\154\x5f\144\x6f\167\x6e\154\x6f\141\x64");
        global $wp_version;
        $this->mo_saml_user_logout_handler = Mo_Saml_User_Logout_Handler::mo_saml_get_object();
        if ((float) $wp_version < 5.5 && (float) $wp_version > 5.2) {
            goto EP;
        }
        add_action("\x77\x70\x5f\154\x6f\x67\157\165\x74", array($this->mo_saml_user_logout_handler, "\155\x6f\x5f\x73\141\155\x6c\x5f\x6c\x6f\x67\x6f\165\164\137\x75\163\x65\162"), 1, 1);
        goto Q0;
        EP:
        add_filter("\154\157\x67\157\x75\164\137\162\145\144\x69\162\x65\143\164", array($this, "\x6d\x6f\137\163\x61\155\x6c\x5f\x6c\157\x67\157\165\164\x5f\142\x72\157\153\145\x72\x5f\x77\151\164\150\137\146\151\x6c\x74\x65\162"), 10, 3);
        Q0:
        add_filter("\154\157\147\x69\156\137\145\162\162\157\x72\x73", array($this, "\x6d\x6f\x5f\163\x61\x6d\154\137\143\165\163\164\x6f\155\x5f\x6c\157\147\x69\x6e\137\145\162\162\157\x72\137\155\x65\x73\x73\141\147\x65"));
        add_action("\x77\x70\x5f\x61\x6a\141\x78\x5f\155\157\x5f\163\x61\155\x6c\x5f\143\x68\x61\x6e\147\145\x5f\145\156\x76\x69\162\157\x6e\x6d\145\156\x74", array($this, "\x6d\x6f\x5f\163\141\x6d\x6c\137\x61\152\x61\x78\137\x63\x61\x6c\154\x5f\150\141\156\x64\154\x65\x72"));
        add_action("\151\x6e\x69\164", array("\115\x69\x67\162\141\x74\x65\x5f\x45\x6e\166\151\162\x6f\156\x6d\145\x6e\x74\137\x53\145\x74\x74\x69\156\147\163", "\x6d\157\137\163\x61\155\154\x5f\155\x69\x67\x72\141\164\x65\x5f\x65\156\166\x69\162\x6f\156\155\145\156\x74\x5f\x73\x65\x74\x74\151\x6e\x67\163"));
        add_filter("\163\141\146\x65\137\163\x74\x79\x6c\x65\137\x63\163\x73", array($this, "\155\x6f\x5f\x73\x61\x6d\154\137\154\157\141\144\137\163\x61\146\145\137\143\x73\x73"));
    }
    function mo_saml_load_safe_css($cw)
    {
        $cw[] = "\144\x69\163\160\x6c\141\171";
        return $cw;
    }
    public function mo_saml_do_plugin_extension_checks()
    {
        $Gr = Mo_Saml_Plugin_Pages::PLUGIN_PAGES;
        if (!(!(!empty($_GET["\x70\x61\x67\145"]) && in_array($_GET["\x70\141\147\x65"], $Gr)) && current_user_can("\x6d\x61\x6e\x61\x67\x65\x5f\157\x70\164\151\x6f\x6e\163"))) {
            goto f3;
        }
        add_action("\x61\144\155\x69\156\x5f\156\x6f\164\x69\x63\145\163", array($this, "\x73\x68\157\167\x5f\144\151\x73\141\x62\x6c\x65\x64\137\x65\x78\x74\x65\156\163\151\157\x6e\x5f\x6e\157\164\151\143\x65"));
        f3:
    }
    function mo_saml_ajax_call_handler()
    {
        if (!(current_user_can("\155\x61\x6e\x61\x67\145\x5f\x6f\x70\x74\x69\x6f\156\x73") && Mo_License_Service::is_customer_license_valid())) {
            goto ym;
        }
        update_option("\x6d\x6f\x5f\163\141\x6d\154\137\x73\145\154\145\143\x74\145\144\137\145\156\x76\x69\x72\157\x6e\x6d\x65\156\x74", EnvironmentHelper::getCurrentEnvironment());
        wp_send_json_success();
        ym:
        wp_send_json_error();
    }
    function mo_saml_custom_login_error_message($NG)
    {
        global $errors;
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\x6d\154\137\x65\x6e\141\142\154\145\x5f\x64\157\155\x61\151\156\137\x6d\141\160\160\x69\x6e\x67", false, EnvironmentHelper::getCurrentEnvironment());
        if (!("\164\x72\x75\145" === $LM && !empty($errors) && (SAMLSPUtilities::mo_saml_in_array("\151\156\166\x61\154\x69\x64\137\x65\x6d\x61\x69\x6c", $errors->get_error_codes()) || SAMLSPUtilities::mo_saml_in_array("\x69\x6e\x63\x6f\162\162\145\x63\164\x5f\x70\141\x73\x73\x77\x6f\162\x64", $errors->get_error_codes())))) {
            goto oV;
        }
        $NG = "\40\124\150\x65\x20\145\x6e\164\145\x72\145\x64\40\x65\x6d\141\x69\x6c\40\x61\x64\144\x72\x65\163\x73\40\x6f\x72\40\160\141\163\x73\x77\x6f\x72\144\40\151\163\x20\x69\156\x63\157\x72\162\x65\x63\x74\56\40\x50\x6c\145\141\x73\145\40\x65\x6e\164\145\x72\40\x61\x20\x76\x61\x6c\x69\x64\40\145\x6d\x61\x69\x6c\40\141\144\144\162\x65\x73\163\40\x6f\x72\x20\160\141\x73\x73\167\x6f\162\144\56";
        oV:
        return $NG;
    }
    function mo_saml_logout_broker_with_filter($B3, $Zb, $user)
    {
        $this->mo_saml_user_logout_handler->mo_saml_logout_user($user->ID, $B3);
    }
    function mo_sso_saml_activate()
    {
        $this->mo_saml_sso_fetch_exisitng_configuration();
        if (!(get_option("\155\x6f\x5f\163\141\x6d\154\137\153\x65\x65\160\137\163\x65\x74\x74\151\156\x67\x73\x5f\157\x6e\137\144\x65\154\145\x74\151\x6f\156") == false)) {
            goto rv;
        }
        add_option("\155\157\137\x73\141\x6d\154\x5f\x6b\145\x65\160\137\x73\145\x74\164\x69\x6e\x67\163\x5f\x6f\x6e\137\144\145\x6c\145\164\151\x6f\x6e", "\164\x72\x75\145");
        rv:
    }
    function show_disabled_extension_notice()
    {
        $iA = SAMLSPUtilities::mo_saml_get_disabled_extensions();
        if (empty($iA)) {
            goto Es;
        }
        $Oa = implode("\x2c\40", $iA);
        echo "\15\xa\x9\x9\40\40\x20\40\40\40\x20\40\74\x64\151\166\x20\x63\154\141\x73\163\x3d\42\156\157\164\x69\143\x65\x20\x6e\157\x74\x69\143\x65\x2d\167\x61\x72\x6e\151\156\x67\x20\x6d\157\x5f\163\141\155\154\137\164\162\x69\x61\154\x5f\x6e\x6f\x74\x69\x63\x65\137\x62\141\x6e\156\145\162\42\x3e\15\12\40\x20\40\40\x20\x20\40\40\x20\x20\x20\40\40\40\x20\40\x20\40\x20\x20\74\x64\151\166\40\x73\x74\x79\x6c\145\75\x22\144\151\163\160\x6c\x61\171\x3a\x20\x66\154\x65\x78\x3b\x6a\165\163\x74\x69\x66\171\55\x63\x6f\156\x74\145\x6e\x74\72\40\x6c\x65\146\x74\73\155\141\x72\x67\151\156\72\x20\x34\x70\170\42\x3e\xd\xa\x9\x9\11\x9\x9\x3c\x69\x6d\x67\x20\163\x72\143\75\x22" . esc_attr(plugin_dir_url(__FILE__)) . "\x69\155\141\147\x65\x73\57\x6d\151\156\151\x6f\162\x61\x6e\147\145\x2d\x6c\157\x67\157\56\x70\156\x67\x22\x20\x77\151\x64\164\x68\x3d\42\64\60\160\x78\42\40\150\145\151\x67\x68\x74\75\x22\64\x30\x70\170\42\x3e\xd\12\x9\11\x9\x9\x9\74\x73\x70\x61\156\40\163\164\171\x6c\145\75\42\160\141\x64\144\151\x6e\147\x3a\40\x36\160\x78\x3b\42\x3e\74\x73\x70\141\156\x20\x73\x74\x79\154\145\75\42\x63\157\x6c\x6f\162\x3a\40\162\145\144\73\146\157\x6e\164\x2d\x77\x65\x69\x67\150\164\72\x20\x62\x6f\x6c\144\x22\x3e\x57\141\x72\x6e\x69\156\x67\x3a\x3c\x2f\x73\x70\x61\156\x3e\x20\x46\x6f\x6c\x6c\157\167\151\x6e\x67\x20\120\x48\x50\x20\145\x78\164\145\x6e\x73\x69\157\x6e\163\x20\50\74\151\40\x73\x74\x79\x6c\x65\x3d\42\x66\157\156\x74\55\x77\x65\151\147\150\x74\x3a\x20\x62\x6f\x6c\144\42\x3e" . esc_attr($Oa) . "\x3c\x2f\151\76\51\40\x61\x72\x65\40\144\151\x73\x61\142\x6c\x65\x64\40\167\150\x69\x63\150\40\141\162\x65\40\x69\x6d\x70\157\162\x74\141\x6e\164\x20\146\157\x72\40\x53\x53\117\40\143\157\156\146\151\147\165\162\x61\x74\151\157\x6e\x2e\40\x50\x6c\145\x61\x73\145\x20\x65\156\141\142\154\145\40\164\x68\145\163\145\40\145\170\x74\x65\156\x73\x69\x6f\x6e\163\x20\x74\157\40\x63\157\x6e\x74\x69\156\x75\145\40\165\x73\151\156\147\40\123\x53\117\x20\157\x6e\40\171\x6f\x75\162\40\163\x69\164\x65\x2e\74\57\x73\160\x61\x6e\76\x3c\x2f\142\162\x3e\15\12\40\40\x20\40\40\x20\x20\x20\40\40\x20\40\40\40\x20\40\40\40\x20\40\x3c\57\x64\151\166\76";
        echo "\74\57\163\160\141\156\76\x3c\x2f\144\151\x76\76";
        Es:
    }
    function mo_saml_sso_fetch_exisitng_configuration()
    {
        $eu = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\x6c\137\x69\144\x65\x6e\164\151\x74\x79\137\160\x72\x6f\166\x69\x64\145\x72\x73", true, EnvironmentHelper::getCurrentEnvironment());
        if (!(empty($eu) && !empty(get_option("\163\x61\x6d\x6c\x5f\151\144\145\x6e\164\151\x74\x79\137\156\141\155\x65")))) {
            goto RZ;
        }
        $this->fetch_existing_saml_idp_config();
        RZ:
    }
    function fetch_existing_saml_idp_config()
    {
        $eu = array();
        $Le = get_option("\x73\141\155\x6c\x5f\151\144\145\156\x74\151\x74\171\137\x6e\141\x6d\145");
        $qC = get_option("\x73\x61\155\x6c\137\154\157\x67\151\156\x5f\x75\x72\154");
        $gz = get_option("\163\x61\155\154\x5f\x69\163\163\x75\x65\x72");
        $BZ = !empty(get_option("\x6d\x6f\x5f\163\x61\x6d\154\x5f\145\x6e\143\x6f\144\151\x6e\x67\137\x65\156\x61\142\x6c\145\x64")) ? get_option("\155\x6f\x5f\163\141\155\154\137\145\x6e\x63\x6f\x64\x69\x6e\x67\x5f\x65\156\141\142\x6c\145\144") : "\x63\150\145\x63\153\145\144";
        $UX = !empty(get_option("\155\157\137\x73\141\x6d\154\x5f\x61\x73\x73\145\162\x74\151\157\x6e\x5f\x74\x69\x6d\145\x5f\x76\141\154\151\144\x69\164\x79")) ? get_option("\x6d\x6f\x5f\x73\141\155\154\137\x61\163\x73\x65\x72\164\151\157\156\x5f\x74\x69\155\x65\137\166\x61\154\x69\x64\x69\x74\x79") : "\143\150\145\143\x6b\145\144";
        $x_ = get_option("\x73\141\x6d\154\137\x78\65\60\71\137\x63\x65\162\164\151\x66\x69\143\141\x74\x65");
        $x6 = get_option("\163\141\155\154\137\x6c\157\147\151\x6e\137\x62\x69\x6e\x64\x69\156\x67\x5f\x74\171\x70\145");
        $pE = get_option("\x73\x61\x6d\x6c\137\x6c\157\x67\x6f\x75\x74\x5f\165\x72\154");
        $QO = get_option("\x73\x61\x6d\154\x5f\154\x6f\x67\157\x75\x74\137\142\x69\156\144\x69\156\147\137\x74\171\160\x65");
        $KR = get_option("\163\141\x6d\x6c\x5f\156\x61\x6d\x65\151\x64\x5f\146\157\162\155\x61\164");
        $Kt = !empty(get_option("\x73\141\155\x6c\x5f\162\145\161\165\145\x73\164\x5f\x73\x69\147\156\x65\144")) ? get_option("\x73\141\155\x6c\137\162\145\161\x75\145\163\x74\137\x73\x69\147\x6e\145\144") : "\165\156\143\x68\x65\x63\x6b\145\144";
        $d9 = "\131\x65\163";
        $wh = "\131\145\163";
        $ny = get_option("\x73\x61\x6d\154\137\141\155\x5f\144\145\146\141\165\x6c\164\x5f\165\x73\145\162\137\x72\157\154\145");
        $eu[$Le] = array("\151\144\x70\137\x6e\141\x6d\x65" => $Le, "\x69\144\160\x5f\x65\x6e\x74\151\164\171\137\x69\x64" => $gz, "\163\163\157\137\x75\162\x6c" => $qC, "\x73\x73\x6f\137\x62\x69\x6e\144\x69\x6e\147\x5f\164\x79\160\x65" => $x6, "\163\x6c\x6f\137\165\162\x6c" => $pE, "\x73\x6c\x6f\x5f\142\151\156\x64\151\156\147\x5f\164\171\x70\145" => $QO, "\x78\65\60\71\x5f\143\145\x72\x74\x69\x66\151\143\141\x74\x65" => $x_, "\x72\145\163\x70\x6f\156\x73\x65\137\x73\x69\x67\156\x65\144" => $d9, "\x61\163\163\x65\162\x74\151\157\x6e\x5f\x73\151\x67\x6e\145\x64" => $wh, "\162\145\161\x75\x65\x73\x74\x5f\x73\x69\147\x6e\x65\x64" => $Kt, "\156\x61\155\145\151\144\x5f\x66\x6f\x72\x6d\141\164" => $KR, "\x6d\157\137\163\141\x6d\x6c\x5f\x65\x6e\143\x6f\x64\x69\156\147\x5f\145\156\141\x62\154\x65\x64" => $BZ, "\155\x6f\x5f\x73\141\x6d\154\137\x61\x73\163\x65\x72\x74\151\157\x6e\x5f\164\151\155\x65\x5f\x76\141\x6c\x69\x64\151\164\x79" => $UX, "\145\156\141\142\154\145\137\x69\x64\x70" => true);
        $hr[$Le]["\144\145\x66\141\x75\154\164\137\x72\x6f\154\x65"] = $ny;
        if (empty($eu[''])) {
            goto wD;
        }
        unset($eu['']);
        wD:
        $vN = new EnvironmentDao(EnvironmentHelper::getCurrentEnvironment());
        $vN->mo_save_environment_settings("\163\x61\155\x6c\137\x69\x64\145\156\x74\151\164\x79\137\160\162\157\x76\x69\x64\145\x72\163", $eu);
        $vN->mo_save_environment_settings("\x73\141\155\154\x5f\151\144\160\x5f\x72\x6f\x6c\x65\x5f\x6d\x61\160\x70\151\156\147", $hr);
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\137\144\x65\x66\x61\x75\154\164\137\151\x64\x70", $Le);
        delete_option("\x73\141\155\x6c\137\151\x64\x65\156\x74\151\x74\x79\x5f\156\141\155\145");
        delete_option("\163\x61\x6d\x6c\x5f\154\157\x67\x69\x6e\x5f\x75\162\154");
        delete_option("\x6d\157\x5f\163\x61\155\x6c\137\145\156\143\x6f\144\x69\156\x67\137\145\156\141\x62\x6c\x65\144");
        delete_option("\x73\x61\x6d\x6c\137\x69\163\163\165\x65\x72");
        delete_option("\163\141\155\154\137\170\x35\60\71\x5f\x63\x65\162\164\x69\146\151\143\x61\x74\145");
        delete_option("\x73\141\x6d\x6c\x5f\x6c\157\x67\x69\156\137\142\151\x6e\144\x69\x6e\x67\x5f\164\171\160\x65");
        delete_option("\x73\x61\155\154\x5f\154\157\147\x6f\x75\x74\x5f\165\162\154");
        delete_option("\163\141\x6d\x6c\137\154\x6f\x67\157\x75\164\x5f\x62\151\x6e\x64\151\x6e\x67\137\164\x79\x70\x65");
        delete_option("\x73\x61\x6d\x6c\x5f\x6e\x61\155\x65\x69\144\x5f\x66\x6f\162\x6d\141\164");
        delete_option("\x73\x61\155\154\x5f\141\x6d\x5f\144\x65\146\141\x75\154\164\x5f\165\163\145\162\x5f\162\157\x6c\x65");
        delete_option("\163\x61\155\154\x5f\x72\x65\x71\165\x65\163\x74\137\x73\151\147\156\145\144");
    }
    function handle_environment_migration()
    {
        $aQ = EnvironmentHelper::getPluginConfiguration(EnvironmentHelper::getCurrentEnvironment());
        if (!is_array($aQ)) {
            goto e6;
        }
        foreach ($aQ as $ni => $SE) {
            update_option($ni, $SE);
            ae:
        }
        OJ:
        e6:
    }
    function default_certificate()
    {
        $mF = file_get_contents(plugin_dir_path(__FILE__) . "\162\145\x73\x6f\x75\x72\143\x65\x73" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PUBLIC_CERT_FILE_NAME);
        $Lu = file_get_contents(plugin_dir_path(__FILE__) . "\x72\145\x73\157\x75\162\x63\x65\x73" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
        if (!(!get_option("\x6d\157\x5f\x73\141\155\x6c\137\x63\165\x72\x72\x65\x6e\164\137\143\x65\162\x74") && !get_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\x5f\143\165\162\x72\x65\x6e\164\x5f\x63\x65\x72\164\137\160\x72\x69\x76\x61\x74\x65\x5f\153\x65\x79"))) {
            goto bF;
        }
        if (get_option("\x6d\157\137\163\x61\x6d\x6c\137\143\145\x72\164") && get_option("\155\x6f\x5f\x73\141\x6d\x6c\137\143\145\x72\164\x5f\160\x72\151\166\141\164\145\137\x6b\x65\x79")) {
            goto pf;
        }
        update_option("\155\x6f\137\x73\141\x6d\x6c\x5f\x63\165\x72\162\x65\x6e\x74\137\143\x65\162\164", $mF);
        update_option("\155\157\137\163\x61\155\154\x5f\143\165\x72\162\145\x6e\x74\137\143\145\162\x74\x5f\160\x72\151\166\x61\164\145\137\153\x65\x79", $Lu);
        goto dD;
        pf:
        update_option("\x6d\x6f\137\163\x61\x6d\x6c\137\143\165\x72\x72\145\x6e\164\137\143\x65\162\x74", get_option("\x6d\157\x5f\163\x61\155\154\x5f\x63\x65\x72\x74"));
        update_option("\155\x6f\x5f\x73\x61\155\154\137\x63\x75\x72\x72\x65\x6e\x74\x5f\143\x65\162\164\137\x70\162\151\166\x61\164\145\x5f\x6b\145\171", get_option("\x6d\x6f\137\x73\141\155\154\x5f\x63\x65\x72\x74\x5f\x70\x72\x69\x76\x61\x74\145\x5f\x6b\145\171"));
        dD:
        bF:
    }
    function myprefix_add_cron_schedule($Pq)
    {
        $Pq["\x77\x65\145\x6b\x6c\171"] = array("\x69\x6e\x74\145\162\166\x61\x6c" => 604800, "\144\151\x73\x70\x6c\x61\171" => __("\x4f\x6e\x63\x65\x20\127\x65\145\153\x6c\x79"));
        $Pq["\155\157\156\164\150\x6c\171"] = array("\151\x6e\x74\145\162\166\x61\x6c" => 2629746, "\144\x69\x73\160\154\141\171" => __("\x4f\x6e\x63\x65\40\115\x6f\156\164\150\x6c\171"));
        return $Pq;
    }
    function mo_saml_custom_attr_column($uU)
    {
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $dY = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\x73\x61\x6d\154\x5f\143\x75\x73\x74\157\155\137\141\164\x74\x72\163\137\155\141\x70\x70\151\x6e\147", true, $ha);
        $dY = maybe_unserialize($dY);
        $p1 = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\154\137\141\164\164\162\163\137\x74\157\137\x64\x69\163\160\x6c\x61\171\137\151\x64\160", true, $ha);
        $BT = 0;
        foreach ($dY as $ni => $SE) {
            if (!is_array($SE)) {
                goto TB;
            }
            foreach ($SE as $L_ => $ce) {
                if (empty($L_)) {
                    goto sh;
                }
                if (!(!empty($p1[$ni]) && SAMLSPUtilities::mo_saml_in_array($BT, $p1[$ni]))) {
                    goto lN;
                }
                $uU[$L_] = $L_;
                lN:
                sh:
                $BT++;
                XB:
            }
            Nh:
            TB:
            xY:
        }
        gt:
        return $uU;
    }
    function mo_saml_attr_column_content($qq, $ip, $xs)
    {
        $dY = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\155\154\137\143\x75\163\x74\x6f\x6d\137\141\x74\x74\x72\x73\137\x6d\141\160\160\151\x6e\147", true, EnvironmentHelper::getCurrentEnvironment());
        foreach ($dY as $tX => $Wz) {
            foreach ($Wz as $ni => $SE) {
                if (!($ni === $ip)) {
                    goto pg;
                }
                $cq = get_user_meta($xs, $ip, false);
                if (empty($cq)) {
                    goto Ii;
                }
                if (!is_array($cq[0])) {
                    goto h_;
                }
                $Mp = '';
                foreach ($cq[0] as $ce) {
                    $Mp = $Mp . $ce;
                    if (!next($cq[0])) {
                        goto zY;
                    }
                    $Mp = $Mp . "\x20\x7c\x20";
                    zY:
                    Ta:
                }
                zM:
                $Mp = map_deep(wp_unslash($Mp), "\145\163\143\137\150\x74\x6d\154");
                return $Mp;
                goto FL;
                h_:
                return esc_html($cq[0]);
                FL:
                Ii:
                pg:
                Bm:
            }
            co:
            YV:
        }
        nj:
        return $qq;
    }
    function metadata_sync_cron_action($fx)
    {
        $SG = ini_get("\155\141\x78\137\145\170\x65\x63\165\x74\x69\157\156\137\164\151\x6d\145");
        $SG = !empty($SG) ? intval($SG) : 30;
        set_time_limit(0);
        error_log("\155\x69\x6e\x69\x6f\162\141\x6e\x67\x65\x20\72\x20\x52\101\116\40\123\x59\x4e\103\40\x2d\x20" . time() . $fx);
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Zo = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\x6c\x5f\x6d\x65\164\x61\144\x61\164\141\x5f\x75\x72\154\137\x66\157\162\x5f\163\171\x6e\x63", true, $ha);
        $ow = '';
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\155\154\137\144\x65\x66\x61\x75\154\164\x5f\151\144\x70", false, $ha);
        $KI = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\154\137\x69\144\x65\156\164\151\x74\171\137\160\x72\157\166\x69\144\145\162\163", true, $ha));
        if (!empty($Zo)) {
            goto Ge;
        }
        wp_unschedule_event(wp_next_scheduled("\155\x65\164\141\144\x61\x74\x61\137\x73\171\x6e\143\137\143\162\157\156\x5f\x61\x63\x74\151\157\156"), "\x6d\x65\164\x61\144\141\164\141\x5f\x73\x79\156\143\x5f\x63\x72\157\x6e\x5f\141\x63\164\x69\157\x6e");
        goto HU;
        Ge:
        if (!(!empty($Zo[$fx]) and !empty($KI[$fx]))) {
            goto nF;
        }
        $ow = $Zo[$fx]["\x6d\x65\x74\141\x64\x61\x74\141\x5f\x75\x72\154"];
        $YD = $Zo[$fx]["\x73\x79\x6e\x63\137\143\x65\162\x74\151\146\x69\x63\x61\164\145\137\x6d\145\164\141\144\x61\x74\x61"] === "\x63\x68\145\x63\153\145\x64" ? true : false;
        $od = wp_remote_get($ow);
        $od = is_wp_error($od) || empty($od["\x62\x6f\144\x79"]) ? '' : $od["\142\157\144\x79"];
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object();
        $fS->mo_saml_upload_metadata($od, $fx, $YD);
        nF:
        HU:
        $vN = new EnvironmentDao($ha);
        $vN->mo_save_environment_settings("\163\141\x6d\154\137\x64\145\x66\141\x75\x6c\164\137\x69\x64\160", $vu);
        set_time_limit($SG);
    }
    function mo_login_widget_saml_options()
    {
        global $wpdb;
        update_option("\155\x6f\137\163\x61\x6d\x6c\x5f\x68\157\163\164\137\156\x61\155\145", "\x68\164\x74\160\x73\72\x2f\57\x6c\x6f\147\151\x6e\56\170\145\143\x75\162\x69\x66\171\x2e\x63\x6f\155");
        $oN = get_option("\x6d\x6f\x5f\163\x61\155\154\x5f\150\x6f\x73\164\137\156\141\x6d\145");
        mo_register_saml_sso();
    }
    function mo_saml_success_message()
    {
        $yS = "\145\x72\x72\x6f\x72";
        $s8 = get_option("\x6d\157\x5f\163\x61\x6d\x6c\x5f\x6d\145\163\x73\141\x67\145");
        echo "\x3c\x64\151\x76\40\x63\154\x61\x73\x73\75\47" . $yS . "\47\76\40\x3c\160\76" . $s8 . "\74\57\160\x3e\x3c\x2f\144\151\x76\76";
    }
    function mo_saml_error_message()
    {
        $yS = "\x75\160\x64\141\164\x65\x64";
        $s8 = get_option("\x6d\157\137\x73\141\x6d\x6c\137\155\x65\163\163\141\x67\145");
        echo "\x3c\x64\x69\166\40\x63\x6c\x61\163\x73\75\47" . $yS . "\47\76\40\74\x70\x3e" . $s8 . "\74\57\160\76\74\57\x64\x69\x76\x3e";
    }
    public function mo_sso_saml_deactivate()
    {
        if (!is_multisite()) {
            goto oZ;
        }
        global $wpdb;
        $yR = $wpdb->get_col("\x53\x45\x4c\105\x43\124\x20\x62\x6c\157\x67\x5f\151\144\x20\106\x52\117\115\x20{$wpdb->blogs}");
        $eh = get_current_blog_id();
        foreach ($yR as $blog_id) {
            switch_to_blog($blog_id);
            if (!get_option("\163\155\154\137\154\x6b")) {
                goto Rt;
            }
            $V3 = new Customersaml();
            $V3->mo_saml_update_key_status($this);
            Rt:
            delete_option("\x6d\157\x5f\x73\141\155\154\x5f\x6e\145\x77\137\x72\x65\x67\151\x73\x74\162\141\164\x69\157\x6e");
            delete_option("\155\157\x5f\x73\141\x6d\154\x5f\x61\x64\x6d\151\156\137\x70\x68\157\x6e\x65");
            delete_option("\x6d\x6f\x5f\x73\x61\155\x6c\137\141\x64\x6d\x69\156\137\160\141\x73\163\x77\x6f\x72\144");
            delete_option("\155\157\x5f\x73\x61\x6d\154\x5f\x76\x65\x72\x69\x66\x79\x5f\143\x75\163\x74\x6f\155\x65\x72");
            delete_option("\x6d\157\x5f\163\x61\155\154\x5f\x61\x64\155\151\156\137\143\x75\163\x74\157\155\x65\x72\137\153\145\171");
            delete_option("\x6d\157\x5f\163\141\x6d\x6c\137\141\144\155\x69\x6e\137\x61\x70\x69\x5f\x6b\x65\171");
            delete_option("\x6d\x6f\137\x73\141\155\x6c\x5f\x63\165\x73\164\157\155\145\x72\x5f\x74\157\x6b\145\156");
            delete_option("\x6d\x6f\x5f\x73\141\x6d\x6c\x5f\x6d\x65\163\x73\x61\147\145");
            delete_option("\x6d\157\137\163\x61\155\x6c\137\162\145\147\x69\x73\164\x72\141\x74\x69\x6f\x6e\137\163\164\x61\164\x75\x73");
            delete_option("\x6d\157\x5f\x73\141\155\154\x5f\x69\x64\x70\137\143\x6f\x6e\146\x69\x67\x5f\x63\x6f\x6d\x70\x6c\145\x74\145");
            delete_option("\x6d\x6f\x5f\163\141\155\154\x5f\x74\162\141\156\x73\141\x63\x74\151\x6f\x6e\111\x64");
            delete_option("\x73\155\x6c\137\154\153");
            delete_option("\x6e\x6f\x5f\x6f\x66\x5f\163\160");
            R_:
        }
        jb:
        switch_to_blog($eh);
        goto Jo;
        oZ:
        if (!get_option("\163\x6d\x6c\x5f\154\x6b")) {
            goto xX;
        }
        $V3 = new Customersaml();
        $V3->mo_saml_update_key_status($this);
        xX:
        delete_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\x6e\x65\167\x5f\162\x65\147\151\x73\x74\x72\x61\164\x69\x6f\156");
        delete_option("\x6d\157\x5f\x73\141\155\x6c\x5f\141\x64\155\x69\156\137\160\x68\157\x6e\x65");
        delete_option("\155\x6f\x5f\163\x61\155\x6c\x5f\141\144\x6d\151\x6e\x5f\160\x61\163\x73\167\157\162\x64");
        delete_option("\x6d\157\x5f\x73\141\155\x6c\137\166\x65\x72\x69\146\171\x5f\143\165\x73\x74\157\155\x65\162");
        delete_option("\155\x6f\137\x73\x61\155\x6c\137\141\x64\155\151\156\137\143\165\163\164\x6f\x6d\x65\x72\x5f\x6b\x65\171");
        delete_option("\x6d\157\x5f\x73\141\x6d\154\137\x61\x64\x6d\151\156\137\x61\x70\x69\x5f\153\x65\171");
        delete_option("\x6d\157\x5f\x73\141\155\x6c\x5f\x63\165\x73\x74\157\x6d\x65\162\x5f\x74\157\153\x65\x6e");
        delete_option("\155\157\137\163\x61\x6d\x6c\137\x6d\x65\163\x73\141\x67\145");
        delete_option("\155\157\x5f\163\141\x6d\x6c\x5f\x72\x65\x67\x69\x73\x74\x72\141\x74\x69\x6f\156\137\x73\x74\x61\164\165\x73");
        delete_option("\155\157\137\x73\x61\x6d\x6c\x5f\x69\144\160\137\x63\x6f\156\x66\151\x67\x5f\143\157\155\x70\154\x65\164\145");
        delete_option("\155\x6f\137\163\141\155\154\x5f\x74\162\x61\156\x73\x61\143\164\151\x6f\156\111\x64");
        delete_option("\x73\155\154\137\154\x6b");
        delete_option("\x6e\x6f\137\157\146\137\x73\160");
        Jo:
    }
    function plugin_settings_style($jy)
    {
        if (!("\164\x6f\160\x6c\x65\x76\x65\154\x5f\160\141\x67\x65\x5f\x6d\x6f\x5f\x73\x61\155\x6c\x5f\163\x65\164\164\151\156\147\x73" != $jy && "\x6d\x69\x6e\x69\x6f\x72\x61\x6e\147\x65\x2d\x73\x61\x6d\x6c\55\62\55\x30\55\x73\163\x6f\137\160\x61\x67\145\137\155\157\137\163\x61\155\154\137\146\x65\144\x65\162\x61\x74\151\157\156\137\x73\163\157" != $jy && "\x6d\151\156\x69\157\x72\141\x6e\147\145\55\x73\141\155\x6c\55\62\x2d\x30\55\x73\x73\157\x5f\x70\x61\x67\x65\137\x6d\x6f\x5f\x65\x72\x72\x6f\x72\137\x63\157\x64\145\x73" !== $jy && "\155\151\156\x69\157\x72\141\x6e\147\x65\55\163\141\155\154\55\x32\55\60\55\163\163\x6f\137\160\x61\x67\145\x5f\155\157\x5f\x6d\165\154\164\x69\160\154\x65\137\145\x6e\x76\151\162\x6f\156\x6d\x65\x6e\x74" != $jy)) {
            goto x2;
        }
        return;
        x2:
        if (!empty($_REQUEST["\164\x61\142"]) && $_REQUEST["\164\141\x62"] == "\x6c\x69\x63\145\156\x73\x69\x6e\147") {
            goto so;
        }
        wp_enqueue_style("\155\x6f\137\163\141\x6d\x6c\137\142\x6f\157\x74\x73\164\x72\x61\160\137\143\163\x73", plugins_url("\151\156\x63\154\165\144\x65\x73\57\x63\163\163\x2f\x62\x6f\x6f\164\x73\x74\162\141\160\57\142\x6f\157\x74\163\164\x72\141\x70\x2d\164\157\147\147\154\145\56\x63\163\163", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_style("\155\x6f\x5f\x73\x61\155\154\x5f\x61\x64\x6d\x69\x6e\x5f\x73\145\164\x74\151\156\147\x73\x5f\x73\x74\171\x6c\x65\137\164\162\141\x63\x6b\145\162", plugins_url("\151\x6e\143\154\x75\144\x65\163\57\x63\x73\163\57\x70\162\x6f\x67\x72\x65\163\163\x2d\164\162\x61\x63\x6b\x65\162\56\x63\163\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_style("\155\x6f\137\x73\141\155\154\137\x61\x64\155\x69\x6e\x5f\x73\145\164\164\x69\156\147\x73\x5f\x70\150\157\x6e\145\x5f\163\x74\x79\154\145", plugins_url("\151\x6e\x63\154\x75\144\145\x73\57\x63\163\163\x2f\160\x68\157\156\145\56\155\151\156\x2e\143\163\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_style("\x6d\157\137\163\x61\x6d\154\x5f\x6d\141\x6e\x61\147\x65\137\154\x69\x63\145\156\x73\145\137\163\x65\x74\164\x69\x6e\x67\163\137\163\x74\x79\x6c\x65", plugins_url("\x45\156\166\x69\x72\x6f\x6e\155\145\x6e\x74\125\164\151\154\x73\x2f\166\151\x65\x77\163\x2f\x45\x6e\x76\x69\162\157\156\155\x65\x6e\164\x56\x69\x65\167\56\x63\x73\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_style("\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x77\160\x62\x2d\146\141", plugins_url("\x69\156\143\x6c\x75\x64\145\x73\x2f\143\x73\x73\57\146\157\x6e\x74\55\141\x77\x65\163\x6f\155\145\56\155\151\x6e\56\x63\x73\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        goto tp;
        so:
        wp_enqueue_style("\155\157\137\x73\141\155\x6c\x5f\x62\x6f\x6f\164\163\x74\162\141\160\x5f\x63\x73\x73\137\x6c\151\143\145\156\x73\x65", plugins_url("\151\x6e\x63\154\x75\x64\145\163\x2f\x63\x73\x73\57\x62\x6f\x6f\x74\163\x74\162\141\160\57\x62\157\157\x74\163\164\x72\141\x70\56\x6d\x69\156\x2e\x63\163\163", __FILE__), array(), mo_options_plugin_constants::VERSION);
        tp:
        wp_enqueue_style("\155\157\x5f\x73\x61\155\154\x5f\x61\x64\155\151\x6e\x5f\163\145\x74\164\x69\156\x67\x73\137\x73\x74\171\x6c\x65", plugins_url("\x69\156\x63\154\165\x64\145\163\x2f\143\x73\x73\57\163\164\x79\x6c\x65\137\x73\145\x74\x74\151\156\x67\x73\56\x6d\x69\x6e\x2e\143\x73\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
    }
    function plugin_settings_script($jy)
    {
        if (!("\164\x6f\160\x6c\x65\x76\145\x6c\x5f\x70\141\x67\145\x5f\x6d\x6f\137\x73\x61\x6d\x6c\137\163\145\x74\164\151\156\x67\x73" != $jy && "\x6d\151\156\x69\x6f\x72\x61\156\147\145\55\163\x61\155\x6c\55\62\55\60\x2d\x73\x73\x6f\x5f\x70\x61\x67\x65\x5f\x6d\157\137\163\141\x6d\x6c\x5f\146\145\x64\x65\x72\x61\x74\151\157\x6e\x5f\163\163\157" != $jy && "\155\x69\156\151\157\x72\x61\156\x67\x65\55\163\141\x6d\154\55\x32\x2d\x30\55\163\x73\157\x5f\x70\x61\147\x65\137\155\x6f\x5f\x65\x72\x72\x6f\x72\137\143\x6f\x64\145\163" !== $jy && "\x6d\151\x6e\x69\x6f\x72\141\x6e\147\x65\x2d\163\141\155\x6c\55\x32\x2d\x30\x2d\x73\x73\157\137\160\141\x67\145\137\x6d\157\137\x6d\165\154\164\x69\x70\x6c\x65\x5f\x65\156\166\151\x72\157\x6e\155\145\x6e\x74" != $jy)) {
            goto hQ;
        }
        return;
        hQ:
        wp_enqueue_script("\155\157\137\163\x61\155\x6c\137\141\144\x6d\x69\156\x5f\163\145\164\164\151\x6e\x67\x73\x5f\143\157\154\157\162\137\163\143\162\151\x70\164", plugins_url("\151\156\x63\x6c\165\x64\145\x73\x2f\152\x73\x2f\152\x73\x63\157\x6c\157\162\x2f\152\x73\143\x6f\x6c\x6f\162\x2e\x6a\x73", __FILE__), array(), mo_options_plugin_constants::VERSION, false);
        if (!empty($_REQUEST["\x74\141\x62"]) && $_REQUEST["\x74\141\142"] == "\154\x69\143\x65\156\163\151\156\147") {
            goto yl;
        }
        wp_enqueue_script("\152\161\165\x65\x72\171");
        wp_enqueue_script("\x6d\x6f\x5f\163\x61\x6d\x6c\137\142\x6f\157\164\163\164\x72\x61\x70\x5f\163\x63\162\151\160\164", plugins_url("\151\156\143\x6c\165\x64\x65\x73\57\152\x73\x2f\142\x6f\x6f\164\163\x74\162\141\x70\x2f\x62\x6f\157\164\x73\x74\162\141\160\x5f\164\157\147\x67\154\x65\56\155\x69\156\56\x6a\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_script("\x6d\157\x5f\163\x61\x6d\x6c\x5f\141\x64\x6d\151\156\x5f\x73\x65\x74\x74\151\x6e\147\x73\x5f\160\x68\x6f\156\145\137\x73\143\x72\x69\160\x74", plugins_url("\x69\x6e\143\154\x75\144\145\163\57\152\163\57\160\x68\157\156\145\x2e\x6d\151\156\56\152\163", __FILE__), array(), mo_options_plugin_constants::VERSION);
        goto QX;
        yl:
        wp_enqueue_script("\155\157\137\x73\x61\155\x6c\x5f\x6d\157\144\145\x72\x6e\151\x7a\162\x5f\x73\x63\x72\151\x70\164", plugins_url("\151\x6e\143\x6c\165\144\x65\163\57\152\163\x2f\x6d\x6f\144\x65\x72\x6e\x69\172\162\x2e\152\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_script("\155\x6f\x5f\x73\141\x6d\154\x5f\160\x6f\160\x6f\x76\x65\x72\x5f\x73\143\162\151\x70\164", plugins_url("\x69\156\x63\154\165\x64\145\163\57\152\163\x2f\142\x6f\x6f\x74\x73\164\162\141\x70\x2f\x70\157\160\x70\145\x72\x2e\x6d\x69\x6e\56\x6a\163", __FILE__), array(), mo_options_plugin_constants::VERSION);
        wp_enqueue_script("\155\x6f\137\163\x61\155\154\137\x62\x6f\157\164\x73\164\x72\141\x70\137\163\x63\x72\151\x70\x74", plugins_url("\x69\x6e\x63\154\x75\144\145\x73\x2f\x6a\163\x2f\142\x6f\157\x74\163\164\x72\141\x70\x2f\142\x6f\x6f\164\163\164\x72\141\x70\x2e\155\151\156\x2e\152\163", __FILE__), array(), mo_options_plugin_constants::VERSION);
        QX:
        wp_enqueue_script("\x6d\157\137\163\x61\x6d\154\137\x61\144\155\x69\156\137\163\145\164\164\151\x6e\x67\x73\137\163\143\x72\151\160\164", plugins_url("\151\156\x63\154\x75\144\145\x73\57\x6a\x73\57\x73\x65\164\x74\151\x6e\x67\x73\56\155\x69\156\56\152\x73", __FILE__), array(), mo_options_plugin_constants::VERSION);
    }
    static function mo_check_option_admin_referer($UG)
    {
        return !empty($_POST["\157\160\164\151\x6f\x6e"]) and $_POST["\157\x70\x74\x69\x6f\x6e"] == $UG and check_admin_referer($UG);
    }
    function miniorange_login_widget_saml_save_settings()
    {
        if (!current_user_can("\155\141\156\141\x67\x65\x5f\x6f\160\164\151\157\x6e\x73")) {
            goto cH;
        }
        $vN = new EnvironmentDao();
        $vQ = call_user_func("\x4d\x6f\x5f\123\141\155\x6c\x5f\101\x64\155\151\x6e\137\x52\x65\146\x65\162\x65\162\137\x4f\160\x74\151\x6f\156\163\72\72\147\x65\x74\x43\x6f\156\x73\x74\141\x6e\164\x73");
        if (!(!empty(EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_state)) && empty(EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_states, true)))) {
            goto BO;
        }
        $SP = array();
        $SP["\x6c\157\147\x69\x6e\x5f\162\145\x6c\x61\171\x5f\x73\164\x61\164\x65"]["\x44\x45\x46\101\125\114\x54"] = EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_state);
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_states, $SP);
        BO:
        if (!(isset($_POST["\x6f\160\x74\151\157\156"]) && in_array($_POST["\157\160\x74\x69\157\156"], $vQ) && !Mo_License_Service::is_customer_license_valid())) {
            goto CL;
        }
        update_option("\x6d\x6f\137\x73\141\155\154\x5f\155\145\163\x73\141\147\145", "\x53\157\155\145\x74\x68\x69\156\147\x20\167\145\x6e\164\x20\x77\162\x6f\156\147\x20\167\x68\151\154\145\40\160\162\157\x63\145\x73\x73\151\x6e\x67\x20\x74\x68\151\163\x20\162\x65\161\165\x65\x73\164\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        CL:
        if (!self::mo_check_option_admin_referer("\155\157\137\155\x75\154\x74\x69\x70\154\145\x5f\145\x6e\x76\151\x72\x6f\156\155\x65\x6e\164")) {
            goto gW;
        }
        if (array_key_exists("\155\157\137\x65\156\141\x62\154\x65\x5f\x6d\165\154\x74\x69\x70\154\145\137\154\x69\143\x65\156\x73\145\x73", $_POST)) {
            goto re;
        }
        $this->handle_environment_migration();
        delete_option("\155\157\x5f\145\156\x61\x62\x6c\145\x5f\155\165\154\164\x69\160\154\x65\137\x6c\x69\143\x65\156\163\145\163");
        update_option("\155\x6f\137\x73\141\155\x6c\x5f\x6d\x65\163\163\141\147\145", "\115\x75\x6c\x74\151\x70\154\x65\40\x45\156\x76\x69\162\157\x6e\x6d\x65\156\x74\x73\x20\144\151\x73\141\x62\154\x65\144\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        goto UK;
        re:
        update_option("\155\157\137\145\x6e\141\x62\154\x65\137\155\165\x6c\164\151\x70\154\145\137\154\x69\x63\x65\156\163\x65\163", "\x63\150\145\143\x6b\145\144");
        $pn = isset($_POST["\143\x6f\x70\171\137\145\170\x69\163\164\x69\x6e\x67\137\143\x6f\x6e\x66\x69\147\x75\x72\x61\164\x69\157\156\x73"]) ? $_POST["\x63\157\x70\x79\x5f\x65\170\x69\163\164\x69\156\x67\137\x63\x6f\156\x66\x69\x67\x75\162\x61\164\x69\157\x6e\x73"] : false;
        if ("\x63\150\x65\x63\153\145\144" === $pn) {
            goto e5;
        }
        initializeEnvironmentObjectArray();
        goto R1;
        e5:
        Migrate_Environment_Settings::mo_saml_copy_existing_configurations();
        R1:
        delete_option("\155\157\x5f\163\141\x6d\x6c\137\x65\x6e\166\x69\x72\x6f\156\x6d\x65\156\x74\x5f\157\x62\152\145\x63\x74\163\137\x70\162\x65\x6d\151\165\x6d");
        update_option("\x6d\x6f\137\163\x61\155\154\x5f\x6d\x65\x73\x73\141\x67\145", "\x4d\165\154\164\x69\x70\x6c\x65\x20\x45\x6e\166\x69\x72\157\x6e\x6d\145\156\164\163\40\145\x6e\x61\x62\x6c\x65\144\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        UK:
        gW:
        if (!self::mo_check_option_admin_referer("\x6d\157\x5f\x61\x64\144\x69\156\147\x5f\141\x6c\x74\145\x72\x6e\x61\x74\x65\137\145\156\166\x69\x72\x6f\x6e\x6d\145\156\x74\x73")) {
            goto ZI;
        }
        if (updateEnvironmentObjects($_POST)) {
            goto NJ;
        }
        update_option("\155\x6f\137\x73\x61\155\154\137\155\x65\x73\x73\141\x67\145", "\x59\157\x75\x72\40\x63\x68\x61\156\x67\x65\163\x20\x77\145\162\145\x20\x6e\x6f\164\x20\x73\141\x76\x65\144\56\x20\120\x6c\145\x61\x73\145\40\160\x72\157\x76\151\144\x65\40\x75\x6e\x69\161\x75\x65\x20\x76\x61\154\x75\145\163\x20\146\x6f\x72\x20\171\x6f\165\162\40\x65\x6e\166\x69\162\x6f\x6e\x6d\x65\x6e\164\x73\x20\x61\156\144\x20\144\x6f\156\47\x74\40\162\145\155\x6f\166\x65\x20\x74\150\145\40\x63\x75\x72\x72\x65\156\x74\x20\x65\156\x76\151\x72\x6f\x6e\155\x65\x6e\164");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto Cm;
        NJ:
        update_option("\155\157\x5f\x73\x61\155\154\137\x6d\145\163\163\x61\x67\x65", "\x45\x6e\x76\151\x72\x6f\x6e\155\x65\156\164\163\40\165\160\144\x61\x74\145\x64\x20\163\165\x63\x63\145\x73\x73\146\165\x6c\x6c\x79");
        SAMLSPUtilities::mo_saml_show_success_message();
        Cm:
        ZI:
        if (!self::mo_check_option_admin_referer("\x6d\x6f\x5f\143\150\x61\156\x67\x65\x5f\x65\x6e\166\151\x72\x6f\x6e\155\145\156\164")) {
            goto Pb;
        }
        update_option("\x6d\157\x5f\163\x61\155\154\137\x73\145\x6c\x65\143\x74\145\x64\137\x65\x6e\x76\151\162\157\156\x6d\x65\156\164", $_POST["\x65\x6e\166\151\x72\157\x6e\155\145\x6e\164"]);
        update_option("\x6d\157\x5f\x73\x61\155\154\x5f\x6d\x65\163\163\141\x67\145", "\x45\x6e\166\x69\162\x6f\156\x6d\x65\156\164\x20\x63\x68\x61\x6e\x67\x65\x64\x20\x73\165\x63\x63\145\163\163\146\165\x6c\x6c\x79");
        SAMLSPUtilities::mo_saml_show_success_message();
        Pb:
        if (!self::mo_check_option_admin_referer("\154\157\147\151\x6e\x5f\x77\151\144\147\145\164\137\163\x61\155\x6c\x5f\163\x61\x76\x65\137\x73\145\x74\164\151\x6e\147\163")) {
            goto Hv;
        }
        if (mo_saml_is_extension_installed("\143\165\162\x6c")) {
            goto p5;
        }
        update_option("\155\157\137\x73\141\155\x6c\137\155\x65\x73\x73\x61\147\x65", "\105\x52\x52\117\x52\x3a\x20\74\141\40\x68\162\x65\146\x3d\x22\150\164\x74\x70\72\x2f\x2f\160\150\160\56\156\145\x74\57\155\141\156\165\141\154\57\x65\156\x2f\x63\x75\162\154\x2e\151\x6e\x73\x74\141\x6c\154\141\164\x69\157\156\x2e\160\x68\160\x22\40\164\x61\x72\147\x65\164\x3d\x22\x5f\142\154\141\156\x6b\x22\76\x50\x48\x50\x20\143\x55\122\x4c\x20\145\170\164\x65\x6e\163\x69\x6f\x6e\x3c\57\141\x3e\40\x69\163\40\x6e\x6f\x74\40\151\156\x73\x74\141\x6c\154\x65\144\40\x6f\x72\x20\144\151\163\x61\142\x6c\x65\144\x2e\x20\123\x61\x76\145\x20\x49\144\145\x6e\164\x69\164\x79\40\120\162\x6f\166\x69\144\145\162\x20\103\157\156\146\x69\147\165\x72\x61\x74\151\x6f\x6e\x20\x66\141\151\154\145\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        p5:
        $hh = $_POST["\163\141\155\154\x5f\x73\x61\166\x65\x5f\163\145\x74\x74\x69\x6e\x67\163\x5f\x61\143\164\x69\157\156"];
        $Le = '';
        $x6 = '';
        $qC = '';
        $QO = '';
        $pE = '';
        $gz = '';
        $x_ = '';
        $KR = '';
        $d9 = "\x59\x65\163";
        $wh = "\131\x65\163";
        $JN = '';
        $Kt = "\165\156\x63\150\x65\143\x6b\x65\144";
        $Re = "\x63\150\145\x63\153\x65\x64";
        $UX = "\x63\x68\145\143\153\x65\144";
        if (empty($_POST["\x73\141\x6d\x6c\x5f\x65\x64\151\x74\x5f\151\x64\160\x5f\x6e\x61\x6d\145"])) {
            goto Cv;
        }
        $JN = trim($_POST["\x73\x61\x6d\x6c\x5f\145\x64\x69\x74\x5f\x69\144\160\x5f\x6e\141\x6d\145"]);
        Cv:
        if (!(isset($_POST["\x73\x61\x6d\x6c\x5f\x69\144\145\156\164\151\164\x79\137\x6e\x61\155\x65"]) && !preg_match("\x23\136\x28\x3f\41\x5e\134\x64\53\44\x29\133\137\141\55\x7a\x41\x2d\x5a\60\55\71\x5d\53\44\x7c\x5e\x5b\x5f\141\55\172\x41\55\132\x5d\133\x5f\x61\x2d\172\x41\x2d\132\x30\x2d\x39\x5d\52\44\43", $_POST["\x73\141\x6d\x6c\x5f\151\144\145\156\x74\151\x74\x79\x5f\156\141\155\x65"]))) {
            goto ZY;
        }
        update_option("\x6d\x6f\137\x73\x61\x6d\x6c\x5f\x6d\145\x73\x73\141\147\x65", "\x50\154\145\141\163\145\x20\x6d\x61\x74\x63\x68\x20\164\150\145\x20\x72\x65\x71\165\145\163\x74\145\x64\40\146\x6f\x72\155\x61\x74\40\146\x6f\162\x20\111\144\145\x6e\x74\x69\164\x79\40\120\162\157\x76\x69\x64\145\x72\x20\116\x61\x6d\145\x2e\x20\117\x6e\154\x79\x20\x61\x6c\x70\150\141\142\145\x74\163\54\40\156\165\155\142\145\x72\x73\x20\x61\156\144\x20\165\x6e\144\145\162\163\x63\157\x72\145\x20\151\163\x20\141\x6c\154\x6f\x77\x65\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        ZY:
        if ($hh != "\144\145\154\x65\164\145" && $hh != "\x63\x75\x73\x74\157\155" && (empty($_POST["\163\141\155\x6c\x5f\x69\x64\x65\x6e\x74\x69\x74\x79\137\156\x61\155\145"]) || empty($_POST["\x73\x61\155\x6c\x5f\x6c\x6f\x67\151\x6e\137\x75\x72\x6c"]) || empty($_POST["\x73\141\x6d\154\x5f\x69\x73\163\165\x65\x72"]))) {
            goto xy;
        }
        if ($hh != "\x64\145\x6c\145\164\x65" && $hh != "\143\x75\x73\x74\x6f\155") {
            goto tW;
        }
        goto H9;
        xy:
        update_option("\x6d\x6f\137\163\x61\x6d\x6c\x5f\x6d\x65\163\163\141\147\x65", "\101\x6c\x6c\x20\x74\150\145\x20\x66\x69\x65\x6c\144\x73\x20\x61\162\145\x20\162\x65\x71\x75\151\x72\145\144\56\x20\120\x6c\x65\141\163\x65\40\x65\156\164\145\162\40\166\141\x6c\x69\144\x20\x65\156\164\x72\151\145\163\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto H9;
        tW:
        $JN = sanitize_text_field($_POST["\163\141\155\154\137\145\144\x69\164\137\x69\144\x70\x5f\156\141\155\x65"]);
        $Le = sanitize_text_field($_POST["\163\x61\x6d\x6c\x5f\x69\x64\145\156\x74\151\x74\x79\137\156\x61\155\x65"]);
        $qC = esc_url_raw(filter_var($_POST["\x73\141\x6d\x6c\137\154\x6f\x67\x69\156\x5f\165\x72\x6c"], FILTER_SANITIZE_URL));
        $xe = sanitize_text_field($_POST["\x73\x61\x6d\x6c\137\x73\160\x5f\145\x6e\164\151\164\x79\x5f\x69\144"]);
        $Yv = sanitize_text_field($_POST["\163\141\155\154\x5f\x69\144\x65\156\x74\x69\x74\x79\x5f\x70\162\157\166\151\144\x65\162\137\x67\165\x69\x64\x65\137\x6e\141\155\145"]);
        if (empty($_POST["\163\x61\x6d\154\137\x6c\157\147\x69\156\x5f\142\x69\156\144\x69\x6e\147\137\164\x79\160\145"])) {
            goto qv;
        }
        $x6 = sanitize_text_field($_POST["\163\141\x6d\154\x5f\154\157\x67\x69\156\137\x62\x69\156\x64\151\x6e\147\x5f\x74\171\x70\145"]);
        qv:
        if (empty($_POST["\163\141\x6d\x6c\x5f\x6c\157\x67\x6f\x75\164\x5f\x62\151\x6e\x64\151\x6e\x67\x5f\164\x79\x70\145"])) {
            goto su;
        }
        $QO = sanitize_text_field($_POST["\x73\x61\155\x6c\137\154\157\147\x6f\165\164\137\142\151\156\x64\x69\156\x67\137\164\171\x70\145"]);
        su:
        $KR = sanitize_text_field($_POST["\163\141\155\154\x5f\156\x61\155\x65\151\144\137\x66\x6f\x72\x6d\141\x74"]);
        if (!empty($_POST["\x65\156\141\x62\x6c\145\x5f\x69\143\157\x6e\x76"])) {
            goto YN;
        }
        $Re = '';
        goto T4;
        YN:
        $Re = "\x63\x68\145\143\153\145\144";
        T4:
        if (!empty($_POST["\155\157\x5f\x73\x61\155\154\137\141\x73\x73\x65\x72\164\x69\157\x6e\x5f\x74\151\x6d\x65\x5f\x76\x61\x6c\151\144\151\164\x79"])) {
            goto PG;
        }
        $UX = "\165\x6e\x63\150\x65\x63\x6b\x65\x64";
        PG:
        if (empty($_POST["\163\x61\155\x6c\137\x6c\x6f\x67\x6f\x75\164\x5f\x75\x72\x6c"])) {
            goto Eu;
        }
        $pE = esc_url_raw(filter_var($_POST["\x73\141\x6d\154\x5f\154\x6f\x67\x6f\x75\164\x5f\165\162\154"], FILTER_SANITIZE_URL));
        Eu:
        if (!array_key_exists("\163\141\155\x6c\x5f\x70\167\x5f\162\x65\x73\x65\164\137\x75\x72\154", $_POST)) {
            goto sK;
        }
        $Fu = esc_url_raw(filter_var($_POST["\x73\x61\x6d\x6c\x5f\x70\x77\x5f\x72\145\163\145\x74\137\165\162\x6c"], FILTER_SANITIZE_URL));
        sK:
        $gz = sanitize_text_field($_POST["\x73\x61\155\x6c\x5f\151\163\x73\165\x65\162"]);
        $x_ = $_POST["\x73\141\x6d\x6c\137\x78\x35\x30\x39\x5f\143\145\x72\x74\151\146\151\143\x61\164\145"];
        if (empty($_POST["\x73\x61\155\154\x5f\162\x65\163\x70\x6f\156\163\x65\137\x73\x69\147\156\145\144"])) {
            goto X5;
        }
        $d9 = "\x63\x68\x65\x63\153\145\x64";
        X5:
        if (empty($_POST["\x73\141\x6d\154\x5f\x61\x73\x73\x65\x72\x74\151\x6f\x6e\x5f\163\151\147\156\x65\x64"])) {
            goto pj;
        }
        $wh = "\143\150\145\x63\153\x65\x64";
        pj:
        if (empty($_POST["\x73\x61\155\x6c\137\x72\145\161\x75\145\163\x74\137\163\151\x67\x6e\145\x64"])) {
            goto rG;
        }
        $Kt = "\x63\x68\145\x63\x6b\x65\x64";
        rG:
        H9:
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\154\137\151\144\x65\156\164\x69\x74\171\137\x70\x72\157\x76\x69\x64\145\162\163", true);
        if ($hh == "\x61\x64\144" && !empty($KI[$Le])) {
            goto wZ;
        }
        if ($hh == "\x65\144\x69\164" && !empty($KI[$JN]) || $hh == "\141\144\x64") {
            goto Oj;
        }
        if ($hh == "\x63\x75\163\x74\157\x6d" && !empty($KI[$JN])) {
            goto MV;
        }
        if (!($hh == "\x64\145\x6c\145\164\x65" && !empty($KI[$JN]))) {
            goto w6;
        }
        $vu = isset($_POST["\155\x6f\x5f\x73\141\x6d\x6c\137\x73\145\x6c\145\143\x74\145\x64\137\144\145\146\x61\x75\x6c\164\137\151\144\x70"]) ? sanitize_text_field($_POST["\155\x6f\x5f\x73\x61\x6d\154\137\163\x65\x6c\145\143\164\145\144\137\x64\x65\x66\x61\x75\154\x74\137\151\144\160"]) : '';
        $Gm = isset($_GET["\x69\x64\x70"]) ? sanitize_text_field($_GET["\x69\144\160"]) : '';
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\x6d\154\137\144\145\146\141\165\x6c\164\x5f\151\144\x70") === $Gm)) {
            goto Wc;
        }
        if (!empty($vu) && array_key_exists($vu, $KI) && $KI[$vu]["\x65\156\141\x62\x6c\x65\137\151\144\160"]) {
            goto GN;
        }
        if (!(count($KI) > 1)) {
            goto dE;
        }
        update_option("\x6d\157\x5f\163\141\155\154\137\155\145\x73\x73\141\147\145", "\x53\145\x6c\145\143\x74\x20\x74\x68\145\40\x64\x65\x66\x61\x75\x6c\x74\40\x49\104\x50\40\x66\162\x6f\155\40\x64\x72\157\x70\x64\x6f\x77\156\40\142\145\146\157\x72\x65\x20\144\x65\x6c\145\164\x69\x6e\x67\x20\x74\x68\145\x20\111\x44\120");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        dE:
        goto Pn;
        GN:
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\137\x64\145\146\141\x75\154\164\137\x69\144\x70", $vu);
        Pn:
        Wc:
        unset($KI[$JN]);
        $KI = array_filter($KI, "\146\151\154\164\x65\162\137\x65\155\x70\x74\171\x5f\x76\141\x6c\165\x65\x73");
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\x6c\x5f\144\145\x66\x61\165\x6c\x74\137\x69\144\160") == $JN)) {
            goto Ox;
        }
        $vN->mo_save_environment_settings("\163\141\155\x6c\x5f\144\x65\x66\141\x75\x6c\x74\137\151\144\160", '');
        Ox:
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\154\x5f\151\144\160\x5f\162\x6f\x6c\145\x5f\x6d\141\x70\x70\151\156\147", true);
        $k1 = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\x6c\x5f\x69\144\160\x5f\x61\164\164\162\151\x62\x75\x74\145\137\x6d\x61\x70\x70\x69\156\x67", true);
        $Rx = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\163\141\155\154\137\143\x75\163\x74\157\155\137\x61\x74\164\162\163\137\155\141\160\x70\151\x6e\147", true);
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\154\137\x69\x64\160\137\x64\x6f\x6d\141\151\156\x5f\155\141\x70\160\x69\156\147", true);
        $H0 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\x6c\137\x73\x73\157\x5f\x62\x75\x74\x74\157\156\x5f\151\x64\x70", true));
        if (!array_key_exists($JN, $H0)) {
            goto jW;
        }
        unset($H0[$JN]);
        $H0 = array_filter($H0, "\x66\x69\154\x74\145\x72\x5f\145\x6d\160\164\171\x5f\166\x61\x6c\165\145\163");
        jW:
        $bK = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\x6c\x5f\x62\x75\x74\164\157\156\137\x69\144\x70\x5f\x6e\141\x6d\x65");
        if (!(!empty($bK) && $bK == $JN)) {
            goto o9;
        }
        $bK = "\x44\x45\x46\101\125\114\x54";
        o9:
        if (empty($Tj[$JN])) {
            goto P4;
        }
        unset($Tj[$JN]);
        $Tj = array_filter($Tj, "\x66\151\x6c\x74\145\162\x5f\x65\x6d\160\164\x79\137\x76\141\x6c\165\145\163");
        P4:
        if (empty($k1[$JN])) {
            goto q6;
        }
        unset($k1[$JN]);
        $k1 = array_filter($k1, "\x66\x69\x6c\164\x65\162\x5f\x65\x6d\160\x74\x79\x5f\166\x61\x6c\x75\x65\163");
        q6:
        if (empty($Rx[$JN])) {
            goto Bn;
        }
        unset($Rx[$JN]);
        $Rx = array_filter($Rx, "\x66\x69\154\x74\145\x72\x5f\145\x6d\160\x74\171\137\166\141\x6c\165\145\163");
        Bn:
        if (empty($LM[$JN])) {
            goto E_;
        }
        unset($LM[$JN]);
        $LM = array_filter($LM, "\146\151\154\164\145\x72\137\145\155\x70\x74\x79\137\166\141\x6c\x75\x65\x73");
        E_:
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\x5f\163\x73\157\x5f\142\165\x74\164\x6f\x6e\x5f\151\144\160", $H0);
        $vN->mo_save_environment_settings("\x73\141\x6d\154\x5f\142\x75\164\x74\157\156\137\x69\x64\x70\x5f\156\141\155\145", $bK);
        $vN->mo_save_environment_settings("\163\141\x6d\154\x5f\x69\144\145\156\164\151\x74\x79\137\x70\x72\157\166\x69\144\x65\162\163", $KI);
        if (!empty($KI)) {
            goto y9;
        }
        $vN->mo_save_environment_settings("\155\157\137\x73\141\x6d\154\x5f\x65\156\x61\x62\x6c\145\x5f\x64\157\155\x61\151\x6e\x5f\x6d\x61\x70\160\151\x6e\147", "\x66\141\x6c\x73\145");
        y9:
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\137\151\144\160\137\x72\x6f\154\x65\137\x6d\141\160\160\x69\156\x67", $Tj);
        $vN->mo_save_environment_settings("\163\141\x6d\154\x5f\151\144\160\137\141\164\x74\x72\x69\x62\x75\164\x65\137\155\141\x70\160\151\156\x67", $k1);
        $vN->mo_save_environment_settings("\155\x6f\x5f\x73\141\x6d\154\x5f\143\x75\x73\x74\x6f\x6d\137\141\x74\164\x72\x73\137\x6d\x61\x70\160\151\156\147", $Rx);
        $vN->mo_save_environment_settings("\163\x61\x6d\154\137\x69\x64\160\137\x64\x6f\155\141\151\x6e\x5f\x6d\x61\160\160\151\x6e\x67", $LM);
        update_option("\155\x6f\137\x73\x61\x6d\x6c\137\155\x65\163\163\x61\x67\x65", "\x3c\x65\x6d\76" . $JN . "\74\x2f\x65\155\x3e\40\x64\145\x6c\145\164\145\x64\x20\x73\x75\143\x63\145\163\163\x66\x75\154\x6c\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        w6:
        goto nc;
        MV:
        $Vz = sanitize_text_field($_POST["\x6d\x6f\x5f\x73\x61\x6d\x6c\x5f\143\165\163\x74\x6f\155\x5f\154\157\x67\151\156\137\164\x65\x78\164"]);
        $yM = sanitize_text_field($_POST["\x6d\x6f\x5f\163\x61\x6d\x6c\137\x63\x75\x73\x74\157\155\x5f\147\162\145\145\x74\151\x6e\147\x5f\x74\x65\170\164"]);
        $xU = sanitize_text_field($_POST["\x6d\x6f\x5f\163\141\x6d\x6c\137\x67\162\145\145\164\x69\x6e\147\x5f\156\x61\x6d\145"]);
        $nf = sanitize_text_field($_POST["\x6d\157\137\163\141\x6d\154\x5f\x63\x75\x73\x74\157\x6d\x5f\x6c\x6f\x67\157\x75\164\137\x74\145\x78\x74"]);
        $Uv = array("\x63\x75\x73\164\157\x6d\x5f\154\157\x67\x69\156\x5f\x74\x65\170\x74" => $Vz, "\x63\x75\163\x74\157\x6d\x5f\x67\x72\x65\145\164\151\156\x67\x5f\x74\145\x78\x74" => $yM, "\x67\162\x65\145\x74\x69\156\x67\x5f\x6e\141\155\145" => $xU, "\143\165\x73\x74\x6f\x6d\137\x6c\x6f\147\x6f\165\164\x5f\x74\x65\x78\164" => $nf);
        $Bw = !empty($_POST["\155\157\137\x73\x61\x6d\154\137\x61\x70\x70\x6c\171\x5f\x77\x69\144\147\x65\x74\137\x63\x6f\156\146\x69\x67\x5f\164\x6f\x5f\141\154\x6c\137\x69\144\x70\163"]) ? "\164\x72\x75\x65" : "\146\141\x6c\163\x65";
        if ($Bw == "\164\162\x75\145") {
            goto my;
        }
        $KI[$JN] = SAMLSPUtilities::mo_saml_array_merge($KI[$JN], $Uv);
        goto y2;
        my:
        $KI[$JN]["\x63\165\x73\164\157\x6d\137\x6c\157\147\x69\x6e\137\x74\x65\x78\x74"] = $Vz;
        foreach ($KI as $ni => $SE) {
            $KI[$ni]["\x63\165\163\164\157\155\137\x67\x72\145\x65\164\151\156\x67\137\x74\x65\x78\164"] = $yM;
            $KI[$ni]["\147\x72\x65\145\x74\151\x6e\147\137\x6e\141\x6d\x65"] = $xU;
            $KI[$ni]["\x63\x75\x73\x74\x6f\x6d\137\x6c\157\147\x6f\x75\x74\x5f\x74\145\170\164"] = $nf;
            Zr:
        }
        gG:
        y2:
        $KI = array_filter($KI, "\x66\151\154\x74\145\x72\137\x65\155\160\164\x79\x5f\166\x61\x6c\x75\145\163");
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\x5f\x69\x64\145\x6e\x74\x69\x74\x79\x5f\x70\x72\x6f\x76\x69\x64\x65\x72\x73", $KI);
        $vN->mo_save_environment_settings("\155\x6f\137\163\141\x6d\x6c\137\x61\160\160\x6c\171\137\x77\151\144\x67\x65\x74\137\x63\x6f\156\146\151\x67\137\164\x6f\137\x61\x6c\x6c\137\x69\x64\160\163", $Bw);
        update_option("\x6d\157\137\x73\141\155\154\x5f\x6d\145\x73\163\141\x67\145", "\x43\165\163\164\x6f\155\40\127\x69\x64\147\145\x74\x20\144\145\x74\x61\151\x6c\163\x20\163\141\166\x65\x64\40\163\165\143\143\x65\x73\163\x66\165\154\154\x79\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        nc:
        goto AV;
        Oj:
        $Vz = !empty($KI[$Le]["\143\x75\163\x74\157\155\x5f\x6c\157\147\x69\x6e\x5f\164\x65\x78\x74"]) ? $KI[$Le]["\143\165\163\164\x6f\155\137\x6c\x6f\147\x69\x6e\x5f\x74\x65\170\x74"] : '';
        $yM = !empty($KI[$Le]["\x63\165\x73\164\x6f\x6d\x5f\x67\x72\x65\145\x74\151\156\147\x5f\x74\145\170\164"]) ? $KI[$Le]["\143\x75\163\x74\x6f\155\137\x67\162\x65\x65\x74\151\156\x67\137\x74\145\170\x74"] : '';
        $xU = !empty($KI[$Le]["\x67\162\145\x65\164\x69\156\147\137\x6e\x61\x6d\145"]) ? $KI[$Le]["\x67\x72\145\145\164\x69\x6e\147\x5f\x6e\x61\x6d\145"] : '';
        $nf = !empty($KI[$Le]["\143\165\163\x74\157\155\x5f\154\x6f\x67\157\x75\164\137\x74\145\170\x74"]) ? $KI[$Le]["\143\165\163\164\157\155\x5f\154\157\x67\157\x75\x74\137\164\145\x78\x74"] : '';
        $qV = !empty($KI[$Le]["\x73\141\155\154\x5f\x72\145\161\165\x65\163\x74"]) ? $KI[$Le]["\x73\141\x6d\154\x5f\162\x65\x71\x75\145\163\164"] : '';
        $gs = !empty($KI[$Le]["\163\141\x6d\x6c\x5f\162\145\x73\x70\157\156\x73\x65"]) ? $KI[$Le]["\163\141\x6d\x6c\x5f\x72\x65\163\x70\x6f\156\x73\145"] : '';
        $VI = !empty($KI[$Le]["\x74\145\163\x74\137\163\x74\141\164\x75\x73"]) ? $KI[$Le]["\x74\145\x73\164\137\163\x74\141\x74\x75\x73"] : '';
        $Uv = array("\x63\x75\163\x74\x6f\155\137\154\157\x67\x69\156\137\x74\x65\x78\x74" => sanitize_text_field($Vz), "\143\165\163\164\157\155\137\x67\162\145\145\x74\151\x6e\147\x5f\164\145\x78\x74" => sanitize_text_field($yM), "\x67\162\145\145\164\x69\156\147\137\x6e\141\x6d\x65" => sanitize_text_field($xU), "\143\165\x73\164\x6f\155\x5f\x6c\157\147\x6f\165\164\x5f\164\145\x78\x74" => sanitize_text_field($nf));
        $I_ = array("\x73\141\x6d\x6c\137\162\x65\161\x75\x65\163\x74" => $qV, "\163\x61\155\x6c\x5f\x72\145\163\x70\x6f\x6e\163\145" => $gs, "\164\145\x73\164\137\x73\164\x61\x74\x75\163" => $VI);
        $Ij = isset($KI[$JN]) ? $KI[$JN]["\145\x6e\x61\x62\154\145\x5f\x69\x64\160"] : true;
        unset($KI[$JN]);
        if (is_array($x_)) {
            goto j0;
        }
        $x_ = trim($x_);
        goto No;
        j0:
        foreach ($x_ as $ni => $SE) {
            $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE);
            if (@openssl_x509_read($x_[$ni])) {
                goto Op;
            }
            update_option("\x6d\x6f\x5f\163\141\x6d\x6c\137\x6d\145\163\x73\x61\x67\x65", "\111\x6e\166\141\154\151\144\40\143\145\162\164\x69\146\151\x63\141\164\x65\x3a\x20\x50\x6c\x65\141\163\145\40\160\x72\157\166\x69\x64\x65\40\x61\x20\x76\x61\154\x69\x64\40\x63\x65\x72\x74\151\146\x69\143\x61\x74\x65\56");
            SAMLSPUtilities::mo_saml_show_error_message();
            return;
            Op:
            by:
        }
        vt:
        No:
        if (!empty($x_)) {
            goto Rl;
        }
        update_option("\155\x6f\137\163\x61\x6d\x6c\x5f\155\x65\x73\163\x61\147\x65", "\x49\x6e\166\141\x6c\151\144\40\143\145\162\164\151\146\151\143\141\x74\145\x3a\40\120\154\145\x61\163\145\40\x70\x72\x6f\x76\151\144\x65\x20\x61\40\166\x61\154\x69\144\40\143\x65\162\x74\x69\x66\x69\x63\x61\164\145\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Rl:
        $KI[$Le] = array("\x69\144\160\x5f\x6e\x61\x6d\145" => sanitize_text_field($Le), "\x69\x64\x70\x5f\x65\x6e\164\x69\x74\x79\137\x69\144" => sanitize_text_field($gz), "\163\141\155\154\x5f\163\x70\x5f\145\x6e\164\151\x74\x79\x5f\151\x64" => sanitize_text_field($xe), "\x73\163\157\x5f\165\x72\154" => esc_url_raw($qC), "\163\163\157\137\142\151\156\144\x69\x6e\147\x5f\164\171\160\145" => sanitize_text_field($x6), "\163\x6c\157\137\165\x72\154" => esc_url_raw($pE), "\163\x6c\x6f\137\x62\x69\156\144\151\156\147\x5f\164\171\160\145" => sanitize_text_field($QO), "\170\65\60\71\x5f\143\x65\162\x74\151\146\151\143\141\164\x65" => $x_, "\162\145\x73\160\157\156\163\x65\137\163\x69\147\x6e\x65\144" => sanitize_text_field($d9), "\141\x73\163\x65\x72\164\x69\157\156\x5f\163\151\147\x6e\x65\144" => sanitize_text_field($wh), "\162\145\161\165\x65\163\x74\137\163\151\x67\x6e\145\x64" => sanitize_text_field($Kt), "\156\x61\x6d\x65\x69\x64\x5f\146\157\162\155\141\x74" => sanitize_text_field($KR), "\155\157\x5f\163\x61\x6d\154\x5f\x65\156\143\157\x64\151\x6e\x67\137\x65\x6e\141\x62\x6c\x65\x64" => sanitize_text_field($Re), "\155\157\137\x73\x61\x6d\x6c\137\x61\163\x73\x65\x72\x74\x69\x6f\x6e\137\x74\151\155\x65\x5f\x76\x61\154\151\144\x69\x74\171" => sanitize_text_field($UX), "\163\141\155\154\137\x69\x64\145\156\164\151\x74\171\137\x70\162\157\x76\151\144\x65\x72\x5f\x67\x75\x69\144\145\x5f\x6e\141\155\145" => sanitize_text_field($Yv), "\163\x61\x6d\154\x5f\160\x77\x5f\162\x65\163\x65\x74\x5f\165\x72\154" => esc_url_raw($Fu), "\145\x6e\x61\x62\154\145\x5f\x69\144\160" => $Ij);
        $KI[$Le] = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $Uv);
        $KI[$Le] = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $I_);
        $KI = array_filter($KI, "\x66\x69\154\164\x65\x72\x5f\145\x6d\x70\x74\171\x5f\166\141\x6c\165\145\x73");
        $vN->mo_save_environment_settings("\163\x61\x6d\154\137\151\144\x65\x6e\164\x69\164\x79\137\x70\162\x6f\x76\x69\x64\x65\162\163", $KI);
        if (!(count($KI) == 1)) {
            goto H3;
        }
        $vN->mo_save_environment_settings("\163\x61\155\x6c\x5f\x64\145\x66\141\165\x6c\x74\137\x69\x64\160", $Le);
        H3:
        update_option("\155\157\137\x73\141\x6d\x6c\137\155\145\x73\x73\141\x67\x65", "\x49\x64\145\x6e\164\x69\x74\171\x20\120\x72\157\x76\x69\x64\x65\x72\40\x64\145\x74\141\x69\154\x73\40\x73\141\x76\145\144\40\163\x75\143\143\x65\x73\x73\146\165\154\154\171\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        AV:
        goto qm;
        wZ:
        update_option("\x6d\157\137\163\141\x6d\154\x5f\x6d\145\x73\x73\x61\x67\145", "\111\144\x65\156\x74\151\164\171\x20\x50\x72\x6f\166\x69\x64\145\162\40\x77\151\164\x68\40\x3c\x65\155\76" . $Le . "\74\x2f\145\x6d\76\40\x61\154\x72\145\x61\144\x79\40\145\x78\x69\x74\x73\56\40\124\x72\x79\x20\x61\x6e\x6f\x74\x68\x65\x72\x20\x6e\x61\x6d\145\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        qm:
        Hv:
        if (!self::mo_check_option_admin_referer("\x6d\x6f\137\x61\164\164\x72\137\155\x61\160\x70\151\x6e\147\x5f\x69\x64\160\137\x6e\141\x6d\145")) {
            goto XV;
        }
        if (empty($_REQUEST["\141\x74\x74\x72\151\142\165\164\145\x5f\155\141\160\160\151\x6e\147\137\151\144\160\x5f\156\x61\x6d\x65"])) {
            goto Ij;
        }
        $fx = $_REQUEST["\x61\164\164\x72\x69\142\165\x74\145\137\x6d\141\x70\160\151\x6e\x67\x5f\x69\x64\160\137\x6e\x61\x6d\145"];
        $vN->mo_save_environment_settings("\x6d\157\x5f\x73\141\155\154\137\x61\x74\164\x72\137\x6d\141\160\160\x69\x6e\x67\x5f\x69\144\160\137\156\141\155\x65", $fx);
        Ij:
        XV:
        if (!self::mo_check_option_admin_referer("\154\x6f\147\151\x6e\137\x77\151\x64\x67\x65\164\x5f\163\x61\155\154\137\x61\164\x74\162\151\x62\165\x74\x65\x5f\155\x61\160\x70\x69\156\147")) {
            goto v2;
        }
        if (mo_saml_is_extension_installed("\x63\x75\x72\x6c")) {
            goto DW;
        }
        update_option("\x6d\157\137\163\x61\155\154\137\155\145\x73\x73\141\x67\x65", "\x45\x52\122\x4f\x52\72\40\74\x61\40\150\162\x65\146\x3d\x22\150\x74\164\x70\72\57\57\x70\150\160\x2e\x6e\145\164\57\155\x61\156\165\x61\x6c\57\145\156\57\x63\165\162\154\56\151\x6e\x73\164\141\x6c\x6c\141\164\x69\157\x6e\x2e\160\150\x70\42\x20\164\x61\x72\147\x65\x74\x3d\x22\x5f\142\x6c\x61\x6e\153\x22\x3e\x50\x48\120\40\143\x55\122\x4c\40\x65\x78\164\145\156\163\151\x6f\x6e\x3c\57\141\76\40\x69\163\x20\x6e\157\x74\x20\x69\156\x73\164\141\x6c\154\x65\x64\x20\157\162\40\x64\151\x73\141\x62\x6c\145\x64\x2e\x20\x53\x61\x76\x65\40\101\164\164\162\151\142\165\x74\x65\x20\115\x61\160\x70\151\156\x67\x20\x66\141\x69\154\x65\x64\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        DW:
        $KI = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\x6d\154\137\x69\x64\x65\x6e\164\x69\x74\171\137\160\x72\x6f\166\151\x64\145\x72\163", true));
        $KI = maybe_unserialize($KI);
        $k1 = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\155\154\x5f\x69\x64\160\x5f\141\x74\x74\162\x69\x62\165\164\x65\137\155\141\x70\x70\151\156\x67", true);
        $k1 = maybe_unserialize($k1);
        $fx = $_POST["\x61\x74\x74\x72\151\142\x75\x74\145\x5f\155\141\160\160\x69\x6e\147\x5f\x69\144\x70\x5f\156\141\x6d\145"];
        if (!empty($k1["\x44\x45\x46\101\x55\x4c\124"])) {
            goto zd;
        }
        $k1["\x44\105\106\x41\x55\114\124"] = array();
        zd:
        $eL = $k1;
        if (!(!empty($KI[$fx]) || $fx == "\104\x45\x46\101\x55\x4c\124")) {
            goto lA;
        }
        if (!empty(trim($_POST["\163\x61\155\x6c\137\141\x6d\137\165\163\145\x72\156\141\x6d\145"])) && !empty(trim($_POST["\x73\x61\x6d\154\137\141\155\137\x65\x6d\x61\151\x6c"]))) {
            goto oA;
        }
        update_option("\x6d\157\x5f\163\141\155\x6c\137\x6d\x65\x73\163\141\x67\x65", "\120\x6c\x65\141\x73\145\40\160\x72\x6f\166\151\x64\x65\40\x61\x20\166\141\154\151\144\x20\166\x61\154\165\145\40\x66\157\162\40\165\163\x65\x72\156\141\155\x65\40\141\156\x64\40\145\x6d\141\x69\x6c\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto vg;
        oA:
        $k1[$fx]["\165\x73\145\162\156\141\x6d\x65"] = trim(stripslashes($_POST["\163\x61\155\154\137\x61\x6d\x5f\165\163\145\162\156\141\155\x65"]));
        $k1[$fx]["\x65\x6d\x61\x69\154"] = trim(stripslashes($_POST["\163\x61\x6d\154\137\x61\x6d\x5f\145\155\x61\x69\154"]));
        $k1[$fx]["\x66\x69\x72\163\x74\x5f\x6e\141\155\145"] = trim(stripslashes($_POST["\163\x61\x6d\154\137\x61\155\137\146\x69\162\x73\x74\137\x6e\141\x6d\145"]));
        $k1[$fx]["\x6c\141\163\164\x5f\x6e\141\x6d\x65"] = trim(stripslashes($_POST["\x73\141\x6d\x6c\137\x61\x6d\x5f\x6c\141\163\164\x5f\156\x61\x6d\145"]));
        $k1[$fx]["\x67\162\157\x75\160\137\x6e\141\155\145"] = trim(stripslashes($_POST["\163\141\155\x6c\x5f\x61\155\x5f\147\x72\x6f\165\x70\137\x6e\x61\155\145"]));
        $k1[$fx]["\144\151\163\x70\x6c\141\x79\x5f\156\x61\x6d\145"] = stripslashes($_POST["\163\x61\x6d\154\137\x61\155\137\144\151\163\160\154\x61\x79\x5f\156\141\155\145"]);
        vg:
        lA:
        if (!($fx == "\104\x45\x46\101\x55\114\124")) {
            goto j2;
        }
        if (!(!empty($KI) and is_array($KI))) {
            goto Ss;
        }
        foreach ($KI as $bh) {
            $tX = $bh["\x69\x64\160\137\156\x61\x6d\145"];
            if (!(empty($k1[$tX]) || $k1[$tX] === $eL["\x44\105\x46\x41\125\x4c\124"])) {
                goto U1;
            }
            $k1[$tX] = $k1["\x44\x45\106\101\x55\114\x54"];
            U1:
            Hh:
        }
        jz:
        Ss:
        j2:
        $vN->mo_save_environment_settings("\163\x61\x6d\154\x5f\151\x64\160\137\141\164\x74\162\x69\x62\165\164\145\137\x6d\x61\x70\160\151\156\x67", $k1);
        $Lw = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\137\163\141\155\x6c\x5f\143\x75\x73\x74\x6f\155\137\141\x74\164\162\163\x5f\x6d\x61\160\160\x69\x6e\x67", true);
        $Lw = maybe_unserialize($Lw);
        if (!empty($Lw["\x44\x45\x46\101\125\x4c\124"])) {
            goto f_;
        }
        $Lw["\x44\105\106\101\125\114\x54"] = array();
        f_:
        $X9 = $Lw;
        $dY = array();
        $dg = array();
        $Wz = array();
        $KD = array();
        if (empty($_POST["\155\157\137\x73\141\155\154\x5f\143\x75\x73\x74\x6f\155\137\141\x74\164\x72\x69\x62\x75\164\145\x5f\153\x65\171\x73"])) {
            goto up;
        }
        $dg = array_map("\164\162\151\155", $_POST["\155\x6f\137\x73\141\155\x6c\137\143\165\x73\x74\x6f\x6d\x5f\x61\x74\x74\x72\x69\142\x75\164\145\x5f\x6b\x65\171\163"]);
        up:
        if (empty($_POST["\155\x6f\137\x73\x61\x6d\154\137\143\x75\x73\164\157\155\x5f\x61\x74\164\162\x69\x62\x75\164\x65\x5f\x76\x61\154\x75\145\x73"])) {
            goto Pm;
        }
        $Wz = array_map("\x74\x72\x69\155", $_POST["\x6d\x6f\x5f\163\x61\155\154\x5f\x63\165\x73\164\157\155\137\141\164\x74\162\x69\x62\x75\164\x65\x5f\x76\141\154\x75\x65\163"]);
        Pm:
        $J4 = count($dg);
        if (!($J4 > 0)) {
            goto Wy;
        }
        $dg = array_map("\150\164\155\x6c\x73\160\145\x63\x69\141\x6c\143\x68\141\x72\163", $dg);
        $Wz = array_map("\x68\164\155\x6c\163\160\145\x63\151\x61\x6c\143\150\x61\x72\x73", $Wz);
        $kP = 0;
        pa:
        if (!($kP < $J4)) {
            goto Ai;
        }
        if (empty($_POST["\x6d\x6f\x5f\x73\141\155\x6c\x5f\144\x69\x73\160\154\x61\x79\x5f\x61\164\164\162\151\x62\x75\x74\145\137" . $kP])) {
            goto LN;
        }
        $KD = SAMLSPUtilities::mo_saml_array_push($KD, $kP);
        LN:
        $kP++;
        goto pa;
        Ai:
        Wy:
        $mN = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\154\x5f\x61\x74\x74\x72\163\x5f\164\x6f\137\144\x69\163\160\154\141\171\137\151\144\x70", true);
        $ds = $mN;
        $mN[$fx] = $KD;
        if (!($fx == "\x44\105\x46\x41\125\x4c\x54")) {
            goto U2;
        }
        if (empty($KI)) {
            goto oY;
        }
        foreach ($KI as $bh) {
            $tX = $bh["\151\144\160\x5f\156\x61\x6d\145"];
            if (!(!empty($mN["\x44\105\x46\101\x55\114\124"]) && (empty($mN[$tX]) || $mN[$tX] === $ds["\x44\105\106\x41\x55\x4c\124"]))) {
                goto ep;
            }
            $mN[$tX] = $mN["\x44\105\106\x41\x55\114\124"];
            ep:
            eM:
        }
        p9:
        oY:
        U2:
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\x5f\x61\x74\164\x72\163\x5f\x74\157\137\x64\x69\x73\x70\154\x61\171\x5f\151\144\x70", $mN);
        $dY = array_combine($dg, $Wz);
        $dY = array_filter($dY);
        if (!empty($Lw)) {
            goto iL;
        }
        $Lw = array();
        iL:
        if (!empty($dY)) {
            goto oH;
        }
        if (empty($Lw[$fx])) {
            goto JL;
        }
        unset($Lw[$fx]);
        JL:
        goto XE;
        oH:
        $Lw[$fx] = $dY;
        XE:
        if (!($fx == "\104\105\106\101\125\114\x54")) {
            goto GD;
        }
        if (!(!empty($KI) and is_array($KI))) {
            goto Yk;
        }
        foreach ($KI as $bh) {
            $tX = $bh["\151\144\x70\x5f\x6e\x61\155\145"];
            if (!(!empty($Lw["\x44\x45\x46\101\x55\x4c\124"]) && (empty($Lw[$tX]) || $Lw[$tX] === $X9["\104\x45\x46\101\125\x4c\124"]))) {
                goto AB;
            }
            $Lw[$tX] = $Lw["\104\105\x46\101\125\x4c\124"];
            AB:
            rY:
        }
        xU:
        Yk:
        GD:
        $vN->mo_save_environment_settings("\155\157\x5f\163\141\x6d\x6c\x5f\x63\x75\163\164\157\155\137\x61\x74\164\x72\x73\137\155\141\160\160\151\x6e\147", $Lw);
        $s8 = "\101\164\x74\162\x69\142\165\164\145\40\x4d\x61\x70\160\151\x6e\x67\40\163\141\166\145\144\40\x73\x75\143\143\x65\x73\x73\146\165\x6c\154\x79\x2e";
        update_option("\x6d\157\137\x73\141\x6d\154\137\155\145\x73\163\141\147\145", $s8);
        SAMLSPUtilities::mo_saml_show_success_message();
        v2:
        if (!self::mo_check_option_admin_referer("\162\145\x73\145\164\137\141\x74\164\162\137\155\141\160\160\151\156\x67")) {
            goto tm;
        }
        if (empty($_POST["\x72\x65\163\x65\164\x5f\151\x64\x70\x5f\156\141\155\x65"])) {
            goto kQ;
        }
        $fx = htmlspecialchars($_POST["\162\x65\x73\145\164\x5f\151\x64\160\137\x6e\x61\x6d\145"]);
        $k1 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\154\137\x69\144\160\x5f\141\x74\x74\162\151\142\x75\x74\x65\x5f\155\141\x70\160\151\x6e\x67", true));
        $Rx = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\163\x61\x6d\154\137\x63\x75\163\x74\x6f\155\137\141\x74\x74\x72\x73\x5f\155\141\x70\x70\x69\156\147", true));
        $KD = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\155\154\x5f\141\x74\164\162\163\137\164\x6f\137\144\151\x73\x70\154\x61\171\137\x69\144\160", true);
        if (empty($k1[$fx])) {
            goto tt;
        }
        unset($k1[$fx]);
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\x5f\151\x64\x70\x5f\x61\x74\x74\x72\x69\142\x75\x74\145\137\x6d\141\x70\160\x69\x6e\x67", $k1);
        tt:
        if (empty($Rx[$fx])) {
            goto P5;
        }
        unset($Rx[$fx]);
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\x61\155\x6c\x5f\x63\x75\x73\164\157\155\137\x61\164\164\162\163\137\155\141\160\x70\x69\x6e\147", $Rx);
        P5:
        if (empty($KD[$fx])) {
            goto rs;
        }
        unset($KD[$fx]);
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\x5f\141\164\164\162\163\x5f\164\157\137\x64\x69\163\160\154\x61\x79\x5f\x69\144\160", $KD);
        rs:
        update_option("\x6d\x6f\x5f\x73\141\155\154\137\155\x65\x73\163\141\147\145", "\x41\x74\x74\x72\x69\x62\x75\164\145\40\x4d\x61\160\x70\x69\x6e\x67\x20\x68\x61\x73\x20\142\145\145\156\40\x72\x65\163\145\164\40\146\x6f\x72\40" . $fx . "\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        kQ:
        tm:
        if (!self::mo_check_option_admin_referer("\x6d\157\x5f\163\x61\x6d\154\137\x65\156\x61\142\x6c\x65\137\154\x6f\x67\151\x6e\137\162\145\x64\x69\162\145\x63\164\137\157\x70\164\151\157\x6e")) {
            goto iN;
        }
        if (mo_saml_is_sp_configured()) {
            goto Zb;
        }
        update_option("\155\x6f\x5f\x73\141\155\154\x5f\x6d\x65\x73\163\x61\x67\x65", "\x50\x6c\x65\x61\x73\145\40\143\157\x6d\x70\x6c\145\x74\x65\x20" . addLink("\x53\145\162\x76\151\143\145\40\120\162\157\166\151\144\x65\x72", add_query_arg(array("\164\x61\x62" => "\x73\141\166\145"), $_SERVER["\122\105\121\x55\105\x53\124\137\x55\122\111"])) . "\40\x63\x6f\x6e\146\151\147\165\162\141\x74\151\x6f\x6e\x20\146\151\162\x73\164\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto h7;
        Zb:
        if (!empty($_POST["\x6d\x6f\137\x73\x61\x6d\x6c\137\145\x6e\141\x62\154\145\137\154\x6f\147\151\x6e\137\162\x65\144\x69\x72\145\143\x74"])) {
            goto O8;
        }
        $Sb = "\x66\141\x6c\163\x65";
        goto Tc;
        O8:
        $Sb = htmlspecialchars($_POST["\155\157\x5f\x73\141\155\x6c\x5f\145\x6e\141\x62\x6c\x65\x5f\154\x6f\x67\x69\x6e\137\162\145\144\151\162\145\143\164"]);
        Tc:
        if ($Sb == "\164\x72\165\145") {
            goto cc;
        }
        $vN->mo_save_environment_settings("\x6d\157\x5f\x73\141\155\154\x5f\x65\x6e\x61\x62\x6c\x65\x5f\154\x6f\x67\x69\x6e\x5f\x72\x65\x64\x69\x72\145\x63\x74", '');
        goto zD;
        cc:
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\141\155\154\x5f\x65\x6e\141\x62\x6c\x65\137\154\157\147\151\x6e\137\x72\x65\x64\x69\x72\x65\143\164", "\x74\x72\x75\x65");
        $vN->mo_save_environment_settings("\155\157\x5f\x73\x61\x6d\154\137\x61\154\x6c\157\x77\137\167\x70\137\163\x69\147\156\x69\x6e", "\x74\162\165\x65");
        zD:
        update_option("\155\x6f\x5f\163\141\155\x6c\137\155\145\163\x73\141\147\145", "\x53\151\x67\x6e\40\151\x6e\x20\157\x70\164\151\x6f\x6e\x73\x20\165\160\144\141\x74\145\x64\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        h7:
        iN:
        if (!self::mo_check_option_admin_referer("\x72\145\163\x65\164\137\144\157\155\141\151\156\137\x72\145\163\164\162\151\x63\x74\151\157\x6e")) {
            goto wV;
        }
        if (empty($_POST["\x72\145\x73\145\164\x5f\x69\x64\x70\137\156\x61\x6d\x65"])) {
            goto xP;
        }
        $fx = htmlspecialchars($_POST["\x72\145\163\145\x74\x5f\151\x64\160\137\156\x61\155\145"]);
        $P9 = maybe_unserialize(EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\154\x5f\144\x6f\155\x61\x69\x6e\x5f\162\145\x73\x74\162\x69\143\164\x69\157\x6e", true));
        if (empty($P9[$fx])) {
            goto WU;
        }
        unset($P9[$fx]);
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\x5f\144\x6f\155\141\x69\156\x5f\x72\145\163\164\162\151\x63\164\x69\x6f\x6e", $P9);
        WU:
        update_option("\155\157\x5f\163\x61\155\x6c\137\155\145\x73\163\141\147\145", "\104\157\155\x61\151\156\40\122\x65\x73\x74\x72\151\143\164\x69\157\x6e\x20\150\141\x73\40\142\x65\x65\156\40\162\145\x73\x65\x74\40\146\x6f\x72\x20" . $fx . "\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        xP:
        wV:
        if (!self::mo_check_option_admin_referer("\x72\145\163\145\164\137\162\157\x6c\x65\x5f\155\x61\x70\160\151\x6e\x67")) {
            goto W8;
        }
        if (empty($_POST["\162\145\x73\145\164\x5f\151\x64\160\137\x6e\141\155\x65"])) {
            goto RY;
        }
        $fx = htmlspecialchars($_POST["\162\145\163\x65\164\137\151\144\160\137\x6e\141\155\x65"]);
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\x6d\154\137\x69\x64\160\137\x72\x6f\154\145\x5f\x6d\x61\160\x70\151\156\x67", true);
        if (empty($Tj[$fx])) {
            goto at;
        }
        unset($Tj[$fx]);
        $vN->mo_save_environment_settings("\163\x61\x6d\154\x5f\151\x64\160\x5f\162\x6f\154\x65\137\155\141\x70\x70\x69\156\147", $Tj);
        at:
        update_option("\x6d\x6f\x5f\x73\141\x6d\x6c\x5f\x6d\x65\x73\x73\141\x67\x65", "\x52\x6f\154\x65\x20\x4d\x61\160\x70\151\156\147\x20\x68\x61\163\x20\x62\x65\145\x6e\40\x72\145\163\145\x74\40\x66\157\162\x20" . $fx . "\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        RY:
        W8:
        if (!self::mo_check_option_admin_referer("\144\157\x6d\141\x69\x6e\137\162\145\x73\164\162\151\x63\164\151\x6f\156\137\x69\x64\x70")) {
            goto u1;
        }
        if (empty($_POST["\x64\x6f\155\141\151\156\x5f\x72\x65\163\164\x72\x69\143\164\151\157\156\x5f\x69\x64\x70\x5f\156\x61\155\x65"])) {
            goto OD;
        }
        $P9 = htmlspecialchars($_POST["\144\x6f\155\141\x69\x6e\x5f\x72\145\x73\164\162\151\x63\164\x69\157\x6e\137\x69\144\160\x5f\156\x61\x6d\x65"]);
        OD:
        $vN->mo_save_environment_settings("\163\x61\x6d\x6c\137\x64\x6f\x6d\x61\x69\156\x5f\162\145\x73\x74\x72\151\143\x74\151\x6f\156\x5f\151\x64\x70", $P9);
        u1:
        if (!self::mo_check_option_admin_referer("\163\141\x6d\154\137\146\157\162\155\137\144\157\155\x61\151\x6e\137\x72\145\x73\164\x72\x69\143\x74\151\x6f\x6e\137\157\x70\164\151\x6f\x6e")) {
            goto JA;
        }
        if (empty($_POST["\144\157\155\x61\151\x6e\x5f\162\145\x73\x74\x72\151\143\x74\x69\157\x6e\137\x69\x64\x70\x5f\156\x61\155\x65"])) {
            goto Y9;
        }
        $P9 = htmlspecialchars($_POST["\144\x6f\155\141\x69\156\137\x72\145\x73\x74\x72\151\143\x74\x69\x6f\x6e\137\151\144\x70\137\x6e\141\155\x65"]);
        Y9:
        if (!empty($P9)) {
            goto rx;
        }
        $P9 = "\104\105\x46\101\125\x4c\124";
        rx:
        $n8 = !empty($_POST["\x6d\157\x5f\163\x61\x6d\154\137\145\x6e\x61\x62\154\145\x5f\x64\x6f\155\x61\151\156\x5f\x72\x65\x73\164\x72\151\143\x74\151\157\156\137\x6c\x6f\147\151\156"]) ? htmlspecialchars($_POST["\155\x6f\137\x73\x61\x6d\154\137\x65\x6e\x61\142\x6c\x65\x5f\144\157\x6d\141\151\x6e\x5f\162\145\163\x74\x72\151\x63\164\151\157\x6e\137\154\157\147\151\x6e"]) : '';
        $su = !empty($_POST["\155\x6f\x5f\x73\x61\x6d\154\x5f\x61\x6c\x6c\157\167\x5f\x64\x65\x6e\171\137\165\163\145\x72\x5f\167\x69\x74\x68\x5f\x64\x6f\x6d\141\x69\156"]) ? htmlspecialchars($_POST["\155\x6f\x5f\x73\x61\155\154\x5f\x61\x6c\154\157\167\137\x64\145\156\x79\x5f\165\x73\145\162\x5f\167\x69\164\x68\137\144\x6f\x6d\x61\151\156"]) : "\141\x6c\154\157\x77";
        $AX = !empty($_POST["\x73\141\x6d\154\x5f\x61\x6d\x5f\x65\155\x61\151\154\x5f\x64\x6f\155\x61\151\156\163"]) ? htmlspecialchars($_POST["\163\141\155\x6c\x5f\x61\x6d\x5f\145\x6d\141\x69\154\137\x64\x6f\x6d\x61\151\156\x73"]) : '';
        $AX = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($AX);
        $n_ = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\x6d\x6c\x5f\x64\x6f\x6d\141\x69\x6e\x5f\162\x65\x73\164\x72\151\x63\164\151\x6f\x6e", true);
        $n_[$P9] = array("\145\156\141\x62\x6c\x65\x5f\144\157\155\141\x69\156\137\x72\145\x73\x74\162\151\x63\164\151\x6f\x6e" => $n8, "\x61\154\x6c\157\x77\x5f\x64\x65\x6e\x79\137\154\x6f\147\151\x6e" => $su, "\145\x6d\x61\151\x6c\137\144\157\155\141\x69\x6e\x73" => $AX);
        $vN->mo_save_environment_settings("\x73\141\155\x6c\x5f\x64\157\155\x61\x69\x6e\137\x72\x65\163\x74\x72\x69\143\x74\151\157\156", $n_);
        $vN->mo_save_environment_settings("\163\141\155\154\137\144\157\155\x61\151\x6e\x5f\x72\x65\163\x74\162\151\x63\x74\x69\157\x6e\137\x69\144\x70", $P9);
        update_option("\155\157\x5f\x73\x61\x6d\x6c\x5f\x6d\145\163\x73\x61\147\x65", "\104\x6f\x6d\141\x69\x6e\40\122\x65\x73\x74\x72\x69\143\x74\151\x6f\156\40\x68\x61\163\40\142\x65\145\x6e\40\163\x61\x76\145\x64\40\x73\x75\143\x63\145\163\163\x66\165\x6c\154\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        JA:
        if (!self::mo_check_option_admin_referer("\162\x6f\x6c\x65\x5f\155\141\160\x70\151\x6e\147\137\151\x64\x70\x5f\156\141\x6d\x65\137\x66\157\162\155")) {
            goto ZA;
        }
        if (empty($_REQUEST[mo_options_enum_role_mapping::ROLE_IDP_NAME])) {
            goto mF;
        }
        $vN->mo_save_environment_settings(mo_options_enum_role_mapping::ROLE_IDP_NAME, $_REQUEST[mo_options_enum_role_mapping::ROLE_IDP_NAME]);
        mF:
        ZA:
        if (!self::mo_check_option_admin_referer("\x6c\x6f\147\151\156\137\x77\151\x64\x67\145\164\x5f\x73\x61\x6d\154\x5f\162\157\x6c\145\137\x6d\141\x70\x70\x69\156\x67")) {
            goto J9;
        }
        if (mo_saml_is_extension_installed("\x63\x75\x72\154")) {
            goto WC;
        }
        update_option("\x6d\x6f\137\163\141\155\x6c\x5f\155\x65\163\163\141\147\145", "\105\x52\x52\117\x52\x3a\40\x3c\141\x20\150\162\145\x66\75\42\150\x74\x74\x70\72\x2f\57\160\x68\160\56\156\x65\164\x2f\x6d\x61\156\x75\x61\x6c\57\145\156\x2f\x63\165\x72\x6c\x2e\x69\x6e\163\164\141\154\154\141\164\x69\157\156\56\160\150\x70\x22\40\x74\141\x72\147\145\x74\x3d\42\x5f\x62\x6c\x61\x6e\x6b\x22\x3e\120\110\x50\x20\x63\x55\x52\x4c\x20\x65\170\164\145\x6e\163\x69\157\x6e\x3c\x2f\x61\76\40\x69\163\x20\x6e\x6f\164\x20\151\156\163\164\x61\x6c\154\x65\144\x20\157\162\x20\144\x69\x73\141\x62\x6c\x65\144\x2e\40\123\x61\x76\x65\40\x52\157\x6c\145\40\115\141\160\160\x69\156\x67\x20\146\141\x69\154\145\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        WC:
        $pj = '';
        if (!empty($_POST["\155\x6f\x5f\x73\x61\155\x6c\x5f\x64\157\156\164\137\143\162\145\141\x74\145\137\x75\x73\x65\x72\x5f\x69\x66\x5f\x72\x6f\154\x65\x5f\x6e\157\164\x5f\x6d\141\x70\160\x65\144"])) {
            goto D_;
        }
        if (!empty($_POST["\163\141\155\x6c\x5f\x61\x6d\137\144\x6f\156\164\137\141\x6c\154\157\167\137\x75\156\154\151\163\x74\x65\x64\137\x75\x73\x65\162\137\162\x6f\x6c\145"])) {
            goto lD;
        }
        $sx = "\165\156\x63\150\145\x63\153\x65\x64";
        $pj = $_POST["\163\x61\x6d\154\137\141\x6d\137\x64\145\146\x61\x75\x6c\164\x5f\x75\163\x65\162\137\x72\x6f\154\x65"];
        $qL = "\x75\x6e\143\x68\x65\143\x6b\145\144";
        goto YP;
        D_:
        $sx = "\143\150\145\143\x6b\x65\x64";
        $pj = false;
        $qL = "\165\156\x63\x68\145\143\153\145\144";
        goto YP;
        lD:
        $sx = "\165\x6e\143\x68\x65\143\x6b\x65\144";
        $pj = false;
        $qL = "\x63\x68\145\x63\153\145\144";
        YP:
        if (!empty($_POST["\155\157\x5f\x73\x61\155\154\137\153\145\145\x70\x5f\145\x78\151\163\x74\151\156\x67\137\165\163\x65\x72\x73\137\x72\x6f\154\145"])) {
            goto pp;
        }
        $C5 = "\x75\x6e\143\150\x65\143\153\145\x64";
        goto Mr;
        pp:
        $C5 = "\143\150\145\143\x6b\145\144";
        Mr:
        if (!empty($_POST["\x6d\x6f\137\163\141\155\x6c\x5f\144\157\156\164\137\141\x6c\x6c\x6f\x77\x5f\x75\163\145\x72\x5f\164\x6f\x6c\157\x67\151\x6e\137\x63\162\x65\x61\164\145\x5f\x77\151\164\x68\137\147\x69\x76\x65\x6e\x5f\x67\162\x6f\x75\160\x73"])) {
            goto l3;
        }
        $TB = "\x75\x6e\x63\150\x65\x63\x6b\x65\144";
        goto KZ;
        l3:
        $TB = "\143\150\145\x63\153\145\x64";
        KZ:
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\155\x6c\137\x69\144\x65\x6e\164\151\x74\171\137\160\x72\x6f\166\151\x64\145\x72\163", true);
        $Tj = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\x6c\137\x69\144\x70\x5f\x72\157\154\145\x5f\x6d\x61\x70\x70\151\156\x67", true);
        if (!empty($Tj["\x44\x45\x46\101\x55\x4c\124"])) {
            goto BV;
        }
        $Tj["\x44\x45\x46\x41\x55\114\124"] = array();
        BV:
        $PU = $Tj;
        $fx = $_POST[mo_options_enum_role_mapping::ROLE_IDP_NAME];
        if (!(!empty($KI[$fx]) || $fx == "\x44\105\106\x41\125\x4c\x54")) {
            goto SW;
        }
        if (!empty($_POST["\155\x6f\x5f\163\x61\155\154\x5f\x72\x65\x73\164\162\x69\x63\164\x5f\165\163\145\x72\163\x5f\167\x69\x74\x68\x5f\147\x72\157\x75\x70\x73"])) {
            goto jp;
        }
        $Tj[$fx]["\x6d\157\137\x73\x61\155\154\137\162\x65\163\164\x72\x69\143\164\x5f\165\x73\x65\162\163\x5f\167\x69\x74\x68\x5f\147\162\157\165\160\x73"] = '';
        goto hN;
        jp:
        $tV = sanitize_text_field($_POST["\x6d\157\x5f\163\141\x6d\x6c\137\x72\x65\x73\x74\x72\x69\x63\164\137\x75\x73\145\162\163\x5f\x77\x69\164\150\137\147\162\157\165\x70\163"]);
        $Tj[$fx]["\155\x6f\137\163\x61\x6d\154\x5f\162\145\x73\164\162\151\143\164\137\x75\x73\x65\x72\x73\137\x77\151\164\x68\x5f\147\x72\x6f\165\x70\163"] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($tV);
        hN:
        $wp_roles = new WP_Roles();
        $i4 = $wp_roles->get_names();
        foreach ($i4 as $ld => $Ye) {
            $a1 = "\x73\141\x6d\154\x5f\141\155\x5f\x67\x72\157\165\160\137\x61\x74\x74\162\x5f\x76\141\154\x75\145\x73\137" . $ld;
            $jw = !empty($_POST[$a1]) ? sanitize_text_field($_POST[$a1]) : '';
            $Tj[$fx][$ld] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($jw);
            rb:
        }
        hl:
        $Tj[$fx]["\144\x65\146\141\x75\154\x74\x5f\x72\157\154\x65"] = $pj;
        $Tj[$fx]["\x64\x6f\x6e\x74\137\x63\162\145\141\164\x65\137\165\163\x65\162"] = $sx;
        $Tj[$fx]["\144\157\156\164\x5f\x61\x6c\x6c\157\x77\137\x75\156\x6c\x69\x73\164\x65\x64\137\x75\x73\145\162"] = $qL;
        $Tj[$fx]["\153\x65\x65\160\137\145\x78\x69\163\164\x69\156\147\137\x75\x73\145\162\x73\x5f\x72\157\x6c\x65"] = $C5;
        $Tj[$fx]["\144\x6f\156\164\x5f\141\x6c\x6c\157\167\x5f\165\x73\x65\162\137\x74\157\x6c\x6f\147\151\156\x5f\x63\162\145\x61\164\x65\137\167\x69\164\x68\137\x67\x69\x76\145\156\x5f\x67\x72\x6f\165\160\163"] = $TB;
        SW:
        $Tj = array_filter($Tj, "\x66\151\154\x74\145\x72\137\145\x6d\x70\164\x79\x5f\166\x61\x6c\x75\145\163");
        if (!($fx == "\x44\105\106\x41\125\114\124")) {
            goto V5;
        }
        if (!(!empty($KI) and is_array($KI))) {
            goto Mt;
        }
        foreach ($KI as $bh) {
            $tX = $bh["\x69\x64\160\137\156\x61\x6d\145"];
            if (!(empty($Tj[$tX]) || $Tj[$tX] === $PU["\x44\x45\106\101\x55\x4c\x54"])) {
                goto At;
            }
            $Tj[$tX] = $Tj["\x44\105\106\x41\x55\x4c\x54"];
            At:
            JN:
        }
        My:
        Mt:
        V5:
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\137\151\x64\x70\137\162\157\x6c\x65\x5f\x6d\x61\x70\x70\x69\x6e\x67", $Tj);
        update_option("\155\157\137\x73\x61\155\154\x5f\x6d\x65\163\x73\141\x67\x65", "\x52\x6f\x6c\x65\40\x4d\x61\x70\x70\x69\x6e\x67\40\144\x65\164\x61\151\154\163\40\163\141\x76\x65\x64\x20\163\x75\x63\143\145\163\163\x66\165\154\x6c\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        J9:
        if (!self::mo_check_option_admin_referer("\155\157\x5f\163\141\155\x6c\137\x75\160\x64\141\164\x65\137\x69\144\x70\x5f\163\x65\x74\x74\151\156\147\163\x5f\157\160\x74\x69\x6f\x6e")) {
            goto Kc;
        }
        if (!(!empty($_POST["\x6d\157\137\x73\141\155\154\x5f\163\160\137\x62\x61\163\x65\137\x75\x72\154"]) && !empty($_POST["\x6d\157\x5f\163\141\x6d\x6c\137\163\160\x5f\145\156\x74\x69\164\171\x5f\151\x64"]))) {
            goto VC;
        }
        $bg = esc_url_raw(filter_var($_POST["\x6d\x6f\137\163\x61\155\x6c\137\163\x70\x5f\142\141\x73\145\x5f\165\x72\x6c"], FILTER_SANITIZE_URL));
        $O5 = sanitize_text_field($_POST["\x6d\157\137\x73\x61\x6d\154\x5f\163\x70\x5f\x65\x6e\164\x69\x74\171\137\151\x64"]);
        if (!(substr($bg, -1) == "\x2f")) {
            goto BY;
        }
        $bg = substr($bg, 0, -1);
        BY:
        $vN->mo_save_environment_settings("\155\x6f\x5f\x73\x61\x6d\x6c\x5f\x73\160\137\142\x61\x73\145\137\165\x72\x6c", $bg);
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\141\x6d\154\x5f\x73\160\137\145\156\x74\x69\x74\x79\137\x69\144", $O5);
        VC:
        update_option("\155\x6f\137\x73\141\155\154\137\x6d\x65\x73\163\141\147\x65", "\123\145\x74\164\151\x6e\147\163\40\165\x70\x64\141\164\145\x64\40\x73\x75\x63\x63\x65\163\163\x66\x75\x6c\x6c\171\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        Kc:
        if (!self::mo_check_option_admin_referer("\x6d\x6f\137\x73\141\155\x6c\137\x75\160\144\141\x74\x65\137\170\x6d\154\x5f\x6f\x72\x67\x61\156\151\x7a\x61\164\x69\x6f\x6e\x5f\x6d\145\164\x61\144\x61\164\141")) {
            goto W2;
        }
        if (!empty($_POST["\155\x6f\x5f\163\x61\155\154\x5f\x6f\x72\147\x5f\156\141\155\x65"]) && !empty($_POST["\155\157\x5f\163\x61\155\154\x5f\157\x72\x67\137\165\x72\x6c"]) && !empty($_POST["\x6d\157\137\163\141\155\x6c\137\x6f\x72\x67\137\x64\x69\163\160\x6c\x61\171\x5f\x6e\141\x6d\145"]) && !empty($_POST["\x6d\157\137\x73\141\155\154\137\x74\145\x63\x68\x5f\x6e\141\155\x65"]) && !empty($_POST["\155\x6f\137\163\x61\155\x6c\x5f\164\145\x63\x68\x5f\x65\155\141\x69\154"]) && !empty($_POST["\155\157\x5f\163\141\x6d\154\x5f\x73\x75\x70\x70\157\x72\164\137\156\141\155\145"]) && !empty($_POST["\155\x6f\137\x73\x61\x6d\154\137\163\x75\x70\160\x6f\162\164\137\145\155\x61\151\154"])) {
            goto po;
        }
        update_option("\x6d\x6f\137\x73\x61\x6d\154\x5f\155\x65\x73\163\141\147\x65", "\x41\x6c\x6c\40\x66\151\145\154\144\x73\40\141\162\x65\x20\x72\x65\161\x75\151\162\145\x64\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto Lu;
        po:
        $WI = sanitize_text_field(wp_unslash($_POST["\155\157\137\x73\x61\155\154\137\x6f\162\x67\137\156\141\155\x65"]));
        $aO = sanitize_text_field(wp_unslash($_POST["\x6d\157\137\x73\141\x6d\x6c\x5f\x6f\162\147\137\x64\x69\163\x70\154\x61\171\137\156\x61\155\x65"]));
        $sR = filter_var($_POST["\x6d\157\137\x73\x61\155\154\x5f\157\x72\147\x5f\165\162\x6c"], FILTER_SANITIZE_URL);
        $Al = sanitize_text_field(wp_unslash($_POST["\155\157\x5f\x73\x61\x6d\154\137\164\145\143\150\x5f\x6e\141\155\145"]));
        $W_ = sanitize_text_field(wp_unslash($_POST["\155\x6f\x5f\163\141\x6d\154\137\163\165\x70\x70\157\162\164\x5f\156\141\x6d\145"]));
        $iB = filter_var($_POST["\x6d\157\137\x73\141\x6d\154\x5f\163\x75\x70\160\157\x72\164\137\x65\x6d\141\x69\154"], FILTER_SANITIZE_EMAIL);
        $kz = filter_var($_POST["\155\157\137\163\141\x6d\154\x5f\164\145\x63\x68\137\145\155\141\151\154"], FILTER_SANITIZE_EMAIL);
        if (!is_email($iB) || !is_email($kz)) {
            goto o4;
        }
        if (!filter_var($sR, FILTER_VALIDATE_URL)) {
            goto HG;
        }
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_NAME_OPTION, $WI);
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_URL_OPTION, $sR);
        update_option(Mo_Saml_Organization_Metatadata_Options::ORGANIZATION_DISPLAY_NAME_OPTION, $aO);
        update_option(Mo_Saml_Organization_Metatadata_Options::TECHNICAL_PERSON_NAME_OPTION, $Al);
        update_option(Mo_Saml_Organization_Metatadata_Options::TECHNICAL_PERSON_EMAIL_OPTION, $kz);
        update_option(Mo_Saml_Organization_Metatadata_Options::SUPPORT_PERSON_NAME_OPTION, $W_);
        update_option(Mo_Saml_Organization_Metatadata_Options::SUPPORT_PERSON_EMAIL_OPTION, $iB);
        update_option("\155\157\137\163\141\155\154\x5f\155\145\x73\163\141\x67\145", "\123\x65\164\164\151\x6e\x67\163\40\165\x70\144\141\x74\x65\144\40\163\165\143\143\145\163\x73\x66\x75\154\x6c\x79\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        goto Px;
        HG:
        update_option("\x6d\157\137\163\141\155\x6c\137\x6d\x65\x73\163\141\x67\x65", "\120\154\x65\x61\x73\145\40\x65\156\x74\x65\162\40\x76\x61\x6c\x69\144\40\x75\x72\154\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        Px:
        goto rX;
        o4:
        update_option("\x6d\157\x5f\x73\x61\x6d\x6c\137\155\x65\x73\x73\x61\147\x65", "\120\154\x65\141\163\x65\40\145\x6e\x74\x65\x72\x20\166\x61\154\x69\x64\x20\x65\155\141\x69\x6c\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        rX:
        Lu:
        W2:
        if (!self::mo_check_option_admin_referer("\x73\141\155\154\x5f\165\x70\154\x6f\x61\144\x5f\155\x65\164\x61\144\141\164\141")) {
            goto kA;
        }
        if (!function_exists("\x77\160\x5f\150\x61\156\x64\154\145\137\x75\160\154\157\x61\144")) {
            require_once Mo_Saml_WordPress_Files::MO_SAML_WP_ADMIN_FILE;
        }
        if (!(isset($_POST["\163\141\x6d\x6c\137\x69\144\x65\156\x74\x69\164\171\137\x6d\145\164\x61\144\141\164\x61\x5f\160\x72\x6f\166\x69\144\145\x72"]) && !preg_match("\x23\136\x28\77\41\136\x5c\x64\53\x24\51\x5b\137\141\55\172\101\x2d\x5a\60\x2d\71\x5d\x2b\x24\x7c\x5e\x5b\x5f\x61\x2d\172\101\x2d\x5a\135\x5b\x5f\141\x2d\172\x41\x2d\132\60\55\71\x5d\52\x24\43", $_POST["\163\141\x6d\154\137\x69\x64\x65\156\164\151\164\171\x5f\x6d\x65\x74\x61\144\141\164\141\x5f\x70\162\x6f\166\x69\x64\x65\x72"]))) {
            goto IX;
        }
        update_option("\x6d\157\x5f\163\x61\155\154\137\x6d\x65\163\163\x61\x67\145", "\x50\154\x65\x61\x73\145\x20\155\x61\x74\143\150\x20\x74\x68\x65\40\162\145\x71\x75\145\163\164\145\144\40\x66\157\x72\155\x61\164\x20\x66\157\162\40\111\x64\145\156\164\x69\164\171\40\120\x72\x6f\166\151\144\x65\x72\40\116\141\x6d\x65\x2e\x20\x4f\x6e\154\x79\40\141\x6c\x70\x68\x61\142\145\x74\x73\54\x20\156\165\155\x62\145\162\x73\40\141\x6e\x64\40\x75\156\x64\145\162\x73\143\x6f\162\145\40\151\x73\x20\x61\154\154\157\167\145\x64\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        IX:
        $vN->mo_save_environment_settings("\143\165\x72\x72\x65\x6e\x74\x5f\x69\x64\160\x5f\x64\145\164\141\151\x6c\163", array());
        $SG = ini_get("\155\141\170\137\x65\170\145\143\x75\164\x69\x6f\156\137\x74\x69\x6d\x65");
        $SG = !empty($SG) ? intval($SG) : 30;
        set_time_limit(0);
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object();
        $fS->mo_saml_handle_upload_metadata();
        set_time_limit($SG);
        kA:
        if (!self::mo_check_option_admin_referer("\x6d\x70\137\163\141\x6d\154\137\143\x65\x72\164\137\x69\144\160\137\x6f\160\164\x69\x6f\156")) {
            goto oS;
        }
        if (!empty($_POST["\163\x61\x6d\x6c\x5f\143\x65\162\x74\x5f\x69\x64\160"])) {
            goto JP;
        }
        update_option("\x6d\157\137\x73\141\155\154\137\143\x65\x72\164\x5f\151\x64\x70\137\x6e\x61\155\145", "\x44\105\106\x41\x55\114\124");
        goto BQ;
        JP:
        update_option("\x6d\x6f\x5f\x73\x61\155\154\137\x63\145\162\x74\137\x69\144\x70\137\156\141\155\x65", htmlspecialchars($_POST["\x73\141\155\x6c\x5f\143\x65\162\x74\137\x69\144\x70"]));
        BQ:
        oS:
        if (!self::mo_check_option_admin_referer("\x75\x70\x67\162\141\144\x65\x5f\x63\x65\x72\x74")) {
            goto R5;
        }
        $mF = file_get_contents(plugin_dir_path(__FILE__) . "\162\x65\163\157\x75\x72\143\145\x73" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PUBLIC_CERT_FILE_NAME);
        $Lu = file_get_contents(plugin_dir_path(__FILE__) . "\162\145\163\157\165\162\x63\145\163" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
        $tX = "\x44\x45\106\x41\125\x4c\x54";
        if (empty($_POST["\151\x64\160\137\156\x61\x6d\x65"])) {
            goto WX;
        }
        $tX = htmlspecialchars($_POST["\151\x64\160\x5f\156\141\x6d\145"]);
        WX:
        $eu = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\155\x6c\137\151\x64\145\156\x74\x69\x74\x79\137\x70\x72\x6f\166\151\144\x65\x72\x73", true, EnvironmentHelper::getCurrentEnvironment());
        if ($tX == "\104\105\106\x41\x55\114\x54") {
            goto NB;
        }
        $eu[$tX]["\x73\x70\x5f\x63\145\x72\164"] = $mF;
        $eu[$tX]["\163\160\137\160\x72\x69\166\137\x6b\145\171"] = $Lu;
        goto QM;
        NB:
        update_option("\155\157\137\x73\141\x6d\x6c\137\x63\x75\x72\162\x65\156\x74\137\143\x65\162\x74", $mF);
        update_option("\x6d\x6f\137\x73\141\155\154\x5f\x63\165\162\162\x65\156\164\137\143\145\162\164\137\x70\162\x69\166\x61\164\x65\x5f\x6b\x65\171", $Lu);
        foreach ($eu as $bh) {
            unset($bh["\x73\160\x5f\143\x65\x72\x74"]);
            unset($bh["\x73\160\x5f\160\x72\151\166\137\x6b\x65\171"]);
            Vp:
        }
        h5:
        QM:
        $vN->mo_save_environment_settings("\163\141\155\x6c\x5f\151\144\x65\x6e\x74\x69\164\171\x5f\160\x72\157\166\x69\144\145\x72\163", $eu);
        update_option("\x6d\157\x5f\163\141\x6d\154\x5f\x6d\x65\163\163\141\x67\x65", "\x43\x65\x72\164\151\x66\x69\143\x61\164\145\x20\x55\x70\x67\162\141\144\145\144\x20\x73\x75\x63\x63\145\163\163\x66\x75\154\154\171");
        SAMLSPUtilities::mo_saml_show_success_message();
        R5:
        if (self::mo_check_option_admin_referer("\x61\x64\x64\x5f\143\x75\x73\x74\x6f\x6d\x5f\x63\x65\x72\164\151\x66\x69\x63\141\164\x65")) {
            goto hF;
        }
        if (!self::mo_check_option_admin_referer("\141\x64\x64\137\x63\165\163\164\x6f\x6d\x5f\x6d\x65\163\x73\x61\x67\145\x73")) {
            goto cb;
        }
        $vN->mo_save_environment_settings("\155\157\137\x73\141\155\x6c\137\141\143\x63\157\x75\x6e\x74\137\143\x72\x65\x61\164\151\157\x6e\137\x64\151\163\141\142\154\x65\144\x5f\x6d\163\147", sanitize_text_field($_POST["\155\157\x5f\x73\x61\x6d\154\137\x61\x63\x63\157\165\156\164\x5f\143\162\145\x61\x74\x69\157\x6e\137\144\x69\x73\141\x62\154\145\144\x5f\x6d\163\x67"]));
        $vN->mo_save_environment_settings("\x6d\157\137\x73\x61\x6d\154\x5f\162\145\x73\x74\x72\x69\143\164\145\144\137\x64\x6f\155\x61\151\156\137\x65\162\162\157\x72\137\x6d\x73\x67", sanitize_text_field($_POST["\155\x6f\137\163\141\155\154\137\162\x65\163\x74\x72\151\143\x74\x65\144\x5f\x64\157\x6d\x61\x69\x6e\137\x65\x72\x72\x6f\162\x5f\x6d\x73\147"]));
        update_option("\x6d\157\137\x73\141\x6d\x6c\137\155\145\163\x73\x61\x67\145", "\103\x6f\156\x66\x69\x67\x75\x72\x61\x74\151\157\x6e\x20\x68\141\x73\40\x62\145\145\156\x20\x73\x61\166\x65\144\40\x73\x75\x63\x63\145\x73\x73\x66\165\x6c\x6c\171\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        cb:
        goto Q2;
        hF:
        if (!empty($_POST["\x73\x75\142\x6d\x69\x74"]) and $_POST["\x73\165\142\155\x69\x74"] == "\125\160\x6c\157\141\144") {
            goto HW;
        }
        if (!(!empty($_POST["\163\165\x62\155\x69\164"]) and $_POST["\163\x75\142\x6d\x69\x74"] == "\122\145\163\145\164")) {
            goto qQ;
        }
        delete_option("\x6d\x6f\x5f\x73\x61\155\154\x5f\143\165\x73\164\157\x6d\137\143\x65\x72\x74");
        delete_option("\x6d\157\x5f\x73\141\155\x6c\137\x63\165\163\x74\157\x6d\137\x63\145\x72\164\137\160\162\151\x76\141\164\145\137\x6b\145\x79");
        update_option("\155\x6f\137\163\x61\155\x6c\x5f\143\165\x72\x72\x65\156\x74\x5f\x63\x65\162\x74", !empty($mF));
        update_option("\155\x6f\x5f\x73\x61\155\x6c\137\143\x75\162\162\x65\x6e\164\x5f\x63\145\x72\164\x5f\x70\162\151\x76\x61\164\145\x5f\x6b\145\x79", !empty($Lu));
        update_option("\x6d\x6f\x5f\x73\141\x6d\154\x5f\155\x65\x73\x73\141\147\145", "\122\145\x73\x65\x74\x20\x43\145\x72\164\151\x66\x69\143\x61\x74\145\40\163\165\x63\x63\145\163\x73\146\165\154\x6c\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        qQ:
        goto Me;
        HW:
        if (!@openssl_x509_read($_POST["\x73\141\155\154\137\x70\165\x62\154\151\x63\137\170\x35\x30\71\x5f\x63\x65\162\x74\151\146\151\143\141\164\145"])) {
            goto r1;
        }
        if (!@openssl_x509_check_private_key($_POST["\x73\x61\155\154\x5f\x70\165\x62\154\x69\x63\137\170\65\x30\71\137\143\145\x72\x74\151\146\151\143\x61\x74\145"], $_POST["\163\141\x6d\154\x5f\160\162\151\166\x61\x74\x65\137\170\65\x30\x39\137\x63\x65\x72\x74\x69\x66\x69\143\141\164\x65"])) {
            goto mD;
        }
        if (openssl_x509_read($_POST["\163\141\x6d\x6c\137\160\165\142\x6c\151\x63\x5f\170\65\60\x39\x5f\x63\x65\x72\x74\x69\x66\151\x63\141\x74\145"]) && openssl_x509_check_private_key($_POST["\163\141\x6d\154\x5f\160\x75\x62\x6c\151\x63\x5f\x78\65\60\71\x5f\x63\145\162\x74\151\x66\151\x63\141\x74\145"], $_POST["\163\x61\x6d\154\x5f\x70\162\151\x76\141\x74\145\137\170\x35\60\71\137\x63\x65\x72\164\151\146\x69\143\141\x74\145"])) {
            goto PT;
        }
        goto u9;
        r1:
        update_option("\155\157\137\x73\141\155\x6c\137\x6d\145\x73\163\x61\x67\x65", "\111\x6e\x76\x61\154\151\144\x20\103\x65\162\164\151\x66\151\143\141\164\x65\40\146\157\162\x6d\141\x74\x2e\40\120\154\x65\141\x73\x65\x20\x65\x6e\x74\x65\x72\40\141\x20\166\x61\x6c\151\144\x20\x63\x65\162\x74\151\146\x69\143\x61\164\145\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto u9;
        mD:
        update_option("\x6d\157\x5f\x73\141\155\x6c\137\x6d\145\x73\163\141\x67\x65", "\111\x6e\x76\141\x6c\151\x64\x20\120\x72\151\166\x61\x74\x65\40\113\x65\x79\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto u9;
        PT:
        $e_ = $_POST["\163\141\x6d\154\137\x70\165\x62\x6c\151\x63\137\x78\x35\60\x39\x5f\x63\145\x72\x74\151\x66\151\143\x61\x74\x65"];
        $eq = $_POST["\x73\141\x6d\x6c\x5f\160\162\151\166\x61\164\x65\137\170\x35\x30\x39\x5f\143\x65\162\x74\151\x66\x69\143\141\x74\x65"];
        update_option("\x6d\x6f\137\163\x61\x6d\x6c\137\143\165\x73\164\157\x6d\137\x63\x65\162\x74", $e_);
        update_option("\x6d\x6f\137\163\x61\x6d\154\137\143\165\x73\x74\x6f\155\137\x63\145\x72\164\x5f\x70\x72\x69\x76\x61\164\x65\x5f\153\x65\171", $eq);
        update_option("\x6d\157\x5f\163\141\x6d\154\137\143\165\x72\162\x65\x6e\164\x5f\x63\x65\x72\x74", $e_);
        update_option("\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\143\165\x72\162\x65\x6e\164\x5f\143\145\x72\164\x5f\160\162\151\166\x61\x74\145\x5f\x6b\145\171", $eq);
        update_option("\155\x6f\x5f\163\x61\155\154\x5f\155\x65\163\163\x61\147\145", "\x43\165\163\164\157\x6d\40\103\145\162\x74\x69\146\x69\x63\141\x74\x65\40\165\160\x64\x61\x74\145\144\40\163\x75\x63\143\145\163\x73\x66\x75\154\x6c\x79\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        u9:
        Me:
        Q2:
        if (!self::mo_check_option_admin_referer("\x6d\157\137\162\145\154\x61\x79\137\x73\x74\x61\x74\145\137\x69\144\160\137\x6e\x61\x6d\x65")) {
            goto mB;
        }
        if (empty($_REQUEST["\155\157\x5f\163\x61\x6d\x6c\x5f\162\x65\154\x61\x79\137\163\x74\141\x74\x65\x5f\x69\x64\160\137\x6e\141\155\145"])) {
            goto ZT;
        }
        $fx = sanitize_text_field(wp_unslash($_REQUEST["\x6d\157\137\x73\141\x6d\x6c\x5f\x72\145\154\x61\171\x5f\163\164\141\x74\145\137\151\144\x70\x5f\156\x61\155\145"]));
        $vN->mo_save_environment_settings(Mo_Saml_Admin_Referer_Options::RELAY_STATE_IDP_NAME, $fx);
        ZT:
        mB:
        if (!self::mo_check_option_admin_referer("\155\157\x5f\x73\x61\x6d\x6c\x5f\x72\x65\154\x61\x79\x5f\x73\164\141\164\145\x5f\157\x70\164\x69\157\156")) {
            goto I4;
        }
        $fx = !empty($_POST["\x6d\157\137\x73\x61\x6d\x6c\137\x72\x65\x6c\141\x79\x5f\163\x74\141\x74\145\137\151\x64\x70\137\156\x61\x6d\x65"]) ? sanitize_text_field(wp_unslash($_POST["\x6d\157\x5f\163\x61\155\x6c\137\x72\145\x6c\x61\x79\x5f\163\164\141\164\x65\x5f\x69\x64\x70\x5f\156\x61\155\145"])) : "\104\105\x46\101\125\x4c\124";
        $LC = EnvironmentHelper::getOptionForSelectedEnvironment(mo_options_enum_sso_login::Relay_states, true);
        $aw = !empty($LC["\x6c\x6f\147\151\156\137\162\x65\154\x61\x79\137\x73\164\x61\164\x65"]) ? $LC["\154\x6f\x67\x69\156\137\162\145\x6c\141\171\x5f\163\164\x61\164\x65"] : array();
        $Sm = !empty($LC["\x6c\157\x67\157\x75\164\137\x72\145\x6c\x61\x79\x5f\163\x74\141\x74\x65"]) ? $LC["\x6c\157\x67\157\x75\164\x5f\x72\x65\154\141\x79\x5f\163\164\141\164\x65"] : array();
        $Qp = '';
        $cZ = '';
        if (!empty(trim($_POST["\x6d\157\137\x73\x61\x6d\x6c\x5f\x6c\x6f\x67\151\x6e\137\162\x65\x6c\x61\x79\137\x73\x74\141\164\145"])) && filter_var($_POST["\x6d\157\137\x73\141\155\154\137\154\157\x67\x69\x6e\137\162\145\x6c\x61\x79\137\x73\x74\x61\164\x65"], FILTER_VALIDATE_URL) === false || !empty(trim($_POST["\x6d\157\137\163\x61\x6d\x6c\137\x6c\157\x67\x6f\165\164\x5f\162\x65\154\141\x79\x5f\x73\x74\x61\164\x65"])) && filter_var($_POST["\x6d\157\x5f\x73\141\x6d\x6c\137\154\157\x67\157\x75\x74\x5f\162\145\154\141\x79\x5f\x73\x74\x61\x74\x65"], FILTER_VALIDATE_URL) === false) {
            goto Tg;
        }
        $Qp = !empty($_POST["\155\x6f\137\163\141\155\154\x5f\x6c\x6f\x67\151\156\x5f\x72\x65\154\x61\171\137\163\x74\141\164\x65"]) ? esc_url_raw(filter_var($_POST["\155\x6f\137\163\x61\155\x6c\x5f\x6c\157\x67\x69\x6e\137\x72\145\x6c\141\171\137\x73\x74\141\x74\145"], FILTER_SANITIZE_URL)) : '';
        $aw[$fx] = $Qp;
        $cZ = !empty($_POST["\x6d\x6f\x5f\163\x61\x6d\154\x5f\x6c\x6f\147\157\165\164\x5f\x72\145\x6c\x61\171\x5f\x73\164\x61\164\x65"]) ? esc_url_raw(filter_var($_POST["\x6d\157\137\163\141\155\x6c\137\154\x6f\x67\157\x75\164\x5f\162\x65\x6c\x61\171\x5f\x73\x74\x61\x74\145"], FILTER_SANITIZE_URL)) : '';
        $Sm[$fx] = $cZ;
        goto pL;
        Tg:
        update_option("\155\x6f\x5f\163\x61\155\x6c\137\x6d\145\163\163\x61\147\x65", "\111\x6e\166\x61\x6c\151\144\x20\x52\x65\x6c\x61\x79\40\123\164\x61\x74\145\50\163\51\x20\x66\x6f\x75\x6e\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        pL:
        $LC["\x6c\157\x67\151\156\137\x72\x65\x6c\x61\x79\x5f\x73\x74\141\x74\x65"] = $aw;
        $LC["\x6c\157\x67\157\x75\164\137\x72\145\154\x61\x79\x5f\x73\x74\141\164\x65"] = $Sm;
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_state, $Qp);
        $vN->mo_save_environment_settings(mo_options_enum_sso_login::Relay_states, $LC);
        update_option("\x6d\x6f\137\163\x61\155\x6c\x5f\155\x65\163\x73\x61\147\x65", "\x52\x65\154\x61\171\40\123\164\141\164\145\x20\165\x70\144\x61\164\145\x64\x20\163\165\143\x63\x65\163\163\146\x75\x6c\154\171\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        I4:
        if (!(self::mo_check_option_admin_referer("\155\157\137\x73\141\155\154\x5f\151\x64\160\137\154\x69\x73\164\x5f\x6f\160\164\151\157\x6e") && isset($_POST["\x6d\x6f\x5f\x73\141\155\154\137\151\x64\x70\x5f\154\x69\x73\x74\137\165\x72\x6c"]))) {
            goto s1;
        }
        $Ps = sanitize_text_field($_POST["\155\x6f\x5f\x73\x61\155\154\x5f\151\144\160\x5f\x6c\151\163\x74\137\165\162\x6c"]);
        if (!(substr($Ps, -1) != "\57" && strpos($Ps, "\x3f") == false && strpos($Ps, "\43") == false)) {
            goto Fw;
        }
        $Ps = $Ps . "\x2f";
        Fw:
        try {
            SAMLSPUtilities::mo_saml_validate_public_page_url($Ps);
        } catch (Exception $Uc) {
            $y3 = $Uc->getMessage();
            update_option(Mo_Saml_Options_Plugin_Admin::ADMIN_NOTICES_MESSAGE, $y3);
            SAMLSPUtilities::mo_saml_show_error_message();
            return;
        }
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\141\155\x6c\137\151\x64\x70\x5f\x6c\151\163\x74\137\165\162\154", $Ps);
        update_option("\155\157\x5f\x73\x61\155\x6c\x5f\155\145\163\x73\141\x67\145", "\x50\x75\142\154\x69\143\40\120\x61\147\x65\x20\125\162\154\x20\165\160\144\141\x74\x65\144\40\163\x75\143\x63\x65\x73\163\146\165\x6c\x6c\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        s1:
        if (!self::mo_check_option_admin_referer("\x6d\157\137\163\x61\155\x6c\137\163\x68\x6f\162\x74\143\x6f\144\x65\137\157\x70\x74\x69\x6f\x6e")) {
            goto cM;
        }
        $bM = empty($_POST["\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\x73\x68\x6f\x72\x74\143\157\144\145\137\154\x6f\x67\151\156\x5f\164\x65\170\164"]) ? "\114\x6f\147\151\x6e\x20\x77\x69\164\150\40" : sanitize_text_field($_POST["\x6d\157\137\163\x61\x6d\154\137\x73\x68\x6f\162\164\143\157\144\x65\137\154\157\x67\151\156\x5f\x74\145\x78\164"]);
        $vN->mo_save_environment_settings("\155\157\137\163\141\x6d\x6c\137\163\150\x6f\x72\x74\143\x6f\x64\x65\x5f\154\x6f\147\151\x6e\137\164\145\x78\164", $bM);
        update_option("\155\x6f\137\x73\x61\x6d\154\x5f\155\145\163\163\x61\x67\x65", "\123\x68\x6f\x72\164\x63\157\x64\145\x20\114\x6f\147\x69\156\40\x74\x65\x78\x74\x20\x75\160\x64\141\x74\x65\144\x20\163\x75\143\143\x65\163\x73\x66\x75\x6c\154\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        cM:
        if (!self::mo_check_option_admin_referer("\155\157\137\x73\141\155\x6c\x5f\x69\x64\x70\x5f\x73\150\157\x72\164\143\x6f\x64\x65\137\157\160\x74\x69\157\x6e")) {
            goto wg;
        }
        $bM = empty($_POST["\155\x6f\137\x73\x61\x6d\154\x5f\x69\x64\160\x5f\x73\150\157\x72\x74\143\157\144\x65\137\x6c\157\x67\151\156\137\x74\145\x78\x74"]) ? "\114\x6f\x67\151\156\40\x77\x69\164\x68\40\x23\43\111\104\x50\x23\43" : sanitize_text_field($_POST["\155\x6f\x5f\x73\141\155\x6c\137\151\x64\x70\137\163\150\157\162\x74\x63\x6f\144\145\137\x6c\157\147\151\x6e\137\x74\145\170\x74"]);
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\151\x64\x70\137\163\x68\x6f\x72\x74\x63\157\x64\145\137\x6c\x6f\147\x69\156\137\164\145\170\164", $bM);
        update_option("\x6d\157\x5f\163\141\155\154\137\155\x65\163\163\x61\147\145", "\x53\x68\157\162\x74\x63\157\x64\145\x20\114\157\x67\x69\x6e\x20\164\145\170\x74\40\x75\x70\x64\141\164\x65\x64\40\163\x75\143\x63\145\x73\163\146\165\154\x6c\171\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        wg:
        if (!self::mo_check_option_admin_referer("\163\163\157\137\142\165\x74\164\x6f\156\x5f\157\160\x74\151\157\156")) {
            goto Xb;
        }
        if (empty($_POST["\163\163\157\x5f\142\165\x74\164\x6f\156\x5f\151\144\x70\137\156\x61\155\x65"])) {
            goto Ug;
        }
        $bK = htmlspecialchars($_POST["\x73\163\157\x5f\x62\165\x74\164\157\x6e\x5f\151\144\x70\x5f\x6e\x61\155\x65"]);
        Ug:
        if (!empty($bK)) {
            goto hK;
        }
        $bK = "\104\105\x46\101\x55\114\124";
        hK:
        if (!empty($_POST["\155\157\137\163\141\x6d\154\x5f\141\x64\144\137\x73\x73\157\x5f\x62\165\x74\164\x6f\x6e\x5f\x77\x70"])) {
            goto EF;
        }
        $Ld = "\x66\141\154\163\x65";
        goto pt;
        EF:
        $Ld = htmlspecialchars($_POST["\x6d\x6f\137\163\x61\x6d\x6c\x5f\141\x64\x64\x5f\x73\163\157\x5f\142\x75\164\164\x6f\156\137\x77\x70"]);
        pt:
        if (!empty($_POST["\155\x6f\137\x73\x61\x6d\x6c\137\x75\x73\145\137\142\x75\164\164\x6f\156\137\141\163\137\x73\150\157\162\x74\143\x6f\144\145"])) {
            goto BR;
        }
        $bT = "\146\x61\154\x73\145";
        goto Vo;
        BR:
        $bT = htmlspecialchars($_POST["\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x75\163\x65\x5f\142\x75\164\164\157\156\137\x61\x73\x5f\163\150\x6f\x72\164\x63\x6f\x64\145"]);
        Vo:
        if (!empty($_POST["\155\x6f\x5f\163\141\x6d\x6c\137\x75\163\145\x5f\x62\x75\164\164\157\x6e\x5f\141\x73\x5f\x77\151\144\x67\x65\164"])) {
            goto Gz;
        }
        $XZ = "\146\x61\x6c\x73\x65";
        goto za;
        Gz:
        $XZ = htmlspecialchars($_POST["\x6d\157\137\163\141\155\154\x5f\x75\163\145\x5f\142\x75\x74\x74\157\x6e\137\x61\163\x5f\167\151\x64\147\x65\164"]);
        za:
        $LP = '';
        $YP = '';
        $sz = '';
        $M8 = '';
        $WU = '';
        $ym = '';
        $cU = '';
        $ue = '';
        $se = '';
        $Wy = "\141\142\x6f\x76\x65";
        if (empty($_POST["\x6d\157\137\163\141\155\x6c\x5f\142\165\164\x74\x6f\156\x5f\x73\151\172\145"])) {
            goto xg;
        }
        $YP = htmlspecialchars($_POST["\x6d\x6f\x5f\x73\141\x6d\154\137\x62\165\x74\164\157\156\x5f\163\151\x7a\x65"]);
        xg:
        if (empty($_POST["\x6d\157\x5f\x73\x61\x6d\154\x5f\142\165\x74\x74\157\156\x5f\167\x69\144\164\150"])) {
            goto UO;
        }
        $sz = htmlspecialchars($_POST["\155\x6f\x5f\163\141\x6d\x6c\x5f\142\x75\x74\x74\x6f\156\x5f\x77\x69\x64\x74\x68"]);
        UO:
        if (empty($_POST["\155\157\x5f\163\x61\x6d\x6c\x5f\x62\x75\164\164\157\156\137\x68\145\151\x67\150\164"])) {
            goto vR;
        }
        $M8 = htmlspecialchars($_POST["\155\157\x5f\x73\141\155\154\137\x62\165\x74\x74\157\156\x5f\150\145\x69\147\150\164"]);
        vR:
        if (empty($_POST["\x6d\157\x5f\163\141\x6d\154\137\x62\165\x74\x74\157\x6e\137\143\x75\162\x76\145"])) {
            goto b_;
        }
        $WU = htmlspecialchars($_POST["\x6d\x6f\137\163\x61\x6d\x6c\x5f\x62\165\x74\x74\157\x6e\137\143\165\162\x76\145"]);
        b_:
        if (empty($_POST["\155\157\137\x73\141\x6d\x6c\137\x62\x75\164\164\157\x6e\x5f\143\157\x6c\157\162"])) {
            goto ni;
        }
        $ym = htmlspecialchars($_POST["\x6d\157\137\x73\141\x6d\154\x5f\142\x75\164\x74\x6f\156\137\x63\157\x6c\x6f\x72"]);
        ni:
        if (empty($_POST["\x6d\157\137\x73\141\155\x6c\x5f\142\165\164\164\157\156\x5f\164\x68\145\155\x65"])) {
            goto h1;
        }
        $LP = htmlspecialchars($_POST["\155\157\137\x73\141\x6d\154\x5f\142\165\x74\x74\x6f\x6e\x5f\164\x68\145\x6d\145"]);
        h1:
        if (empty($_POST["\155\157\137\163\141\155\154\x5f\142\x75\164\x74\157\156\x5f\x74\x65\x78\164"])) {
            goto RC;
        }
        $cU = htmlspecialchars($_POST["\155\157\137\163\x61\x6d\154\137\x62\x75\x74\x74\157\156\x5f\x74\x65\170\x74"]);
        if (!(empty($cU) || $cU == "\114\x6f\x67\151\x6e")) {
            goto va;
        }
        $cU = "\x4c\x6f\147\x69\156";
        va:
        $cU = str_replace("\43\43\111\104\120\x23\x23", $bK, $cU);
        RC:
        if (empty($_POST["\155\157\x5f\163\x61\x6d\154\x5f\146\157\156\164\137\x63\x6f\154\157\x72"])) {
            goto Jc;
        }
        $ue = htmlspecialchars($_POST["\x6d\157\137\x73\x61\x6d\154\137\146\157\156\164\x5f\x63\157\x6c\157\x72"]);
        Jc:
        if (empty($_POST["\155\x6f\x5f\163\x61\155\x6c\137\x66\157\156\x74\137\163\x69\172\145"])) {
            goto JD;
        }
        $se = htmlspecialchars($_POST["\155\x6f\137\x73\141\x6d\x6c\x5f\x66\157\x6e\164\x5f\163\x69\x7a\145"]);
        JD:
        if (empty($_POST["\x73\163\157\137\142\165\164\x74\157\156\x5f\154\157\147\151\156\137\x66\x6f\162\x6d\x5f\x70\x6f\x73\151\164\x69\157\x6e"])) {
            goto zb;
        }
        $Wy = htmlspecialchars($_POST["\163\163\x6f\x5f\x62\x75\x74\164\x6f\156\137\x6c\157\147\x69\156\x5f\146\x6f\x72\x6d\137\160\x6f\x73\x69\164\151\157\x6e"]);
        zb:
        $nh = array("\141\144\x64\137\142\165\164\164\x6f\156\x5f\167\x70\x5f\154\x6f\147\151\156" => $Ld, "\165\x73\x65\x5f\142\165\x74\x74\157\156\x5f\x61\x73\x5f\x73\x68\157\162\164\x63\x6f\x64\x65" => $bT, "\x75\x73\145\137\142\165\164\x74\x6f\156\x5f\141\x73\x5f\167\x69\x64\x67\x65\x74" => $XZ, "\142\x75\164\164\157\156\137\164\x79\160\x65" => $LP, "\x62\x75\164\164\157\156\x5f\x73\151\172\x65" => $YP, "\142\x75\164\164\x6f\156\137\167\151\144\x74\x68" => $sz, "\x62\165\164\164\x6f\156\x5f\x68\145\151\147\x68\164" => $M8, "\142\x75\x74\164\157\x6e\137\x63\165\162\166\145" => $WU, "\142\x75\164\x74\x6f\156\137\143\x6f\154\x6f\x72" => $ym, "\x62\x75\164\164\x6f\156\137\164\145\170\x74" => $cU, "\x66\157\156\x74\137\x63\157\154\157\x72" => $ue, "\x66\x6f\x6e\x74\x5f\163\x69\172\145" => $se, "\x62\165\164\164\157\156\137\160\157\163\151\164\151\x6f\x6e" => $Wy);
        $m9 = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\x6c\137\163\163\157\x5f\x62\165\164\x74\x6f\156\137\x69\x64\160", true);
        $m9[$bK] = $nh;
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\137\x73\x73\x6f\x5f\142\x75\164\x74\x6f\x6e\x5f\x69\144\160", $m9);
        $vN->mo_save_environment_settings("\163\x61\x6d\x6c\x5f\142\x75\164\x74\x6f\156\137\151\144\160\137\x6e\141\155\145", $bK);
        update_option("\155\157\x5f\163\141\155\154\137\155\145\163\x73\x61\147\x65", "\x4c\157\147\x69\156\40\142\x75\x74\x74\x6f\156\x20\165\160\x64\x61\x74\x65\x64\x20\x73\165\x63\x63\145\163\x73\x66\x75\x6c\x6c\171\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        Xb:
        if (!self::mo_check_option_admin_referer("\163\163\x6f\x5f\x62\165\x74\x74\x6f\156\137\x69\x64\x70\137\x6e\141\x6d\x65\137\157\x70\164\151\x6f\x6e")) {
            goto x3;
        }
        if (!empty($_POST["\x73\x73\157\x5f\x62\x75\164\x74\157\156\137\x69\x64\160"])) {
            goto k1;
        }
        $fx = "\104\x45\x46\101\125\114\x54";
        goto zA;
        k1:
        $fx = htmlspecialchars($_POST["\x73\x73\x6f\x5f\x62\x75\x74\x74\x6f\x6e\137\x69\144\x70"]);
        zA:
        $vN->mo_save_environment_settings("\x73\x61\x6d\154\137\x62\x75\x74\164\x6f\156\x5f\151\144\160\137\x6e\x61\x6d\145", $fx);
        x3:
        if (!empty($_POST["\157\x70\x74\151\x6f\x6e"]) and $_POST["\157\160\x74\151\157\x6e"] == "\x72\x65\x73\x65\x74\137\163\163\x6f\x5f\142\x75\164\164\157\x6e\137\x6f\x70\x74\151\x6f\x6e") {
            goto wC;
        }
        if (self::mo_check_option_admin_referer("\x63\x6c\x65\x61\162\137\x61\164\x74\162\163\137\154\151\x73\x74")) {
            goto Z9;
        }
        if (!empty($_POST["\x6d\157\x5f\x73\x61\155\x6c\137\141\165\164\x6f\137\x72\x65\x64\151\162\x65\x63\164"]) && $_POST["\155\157\x5f\x73\141\x6d\154\x5f\141\165\x74\x6f\137\162\145\144\151\x72\145\x63\x74"] == "\146\x61\154\x73\x65") {
            goto Xi;
        }
        if (!empty($_POST["\x6d\x6f\x5f\x73\x61\155\154\x5f\x61\x75\x74\157\137\x72\x65\144\x69\162\145\x63\164"]) and $_POST["\x6d\x6f\137\x73\141\x6d\x6c\137\141\165\164\157\x5f\x72\145\144\151\162\x65\x63\x74"] == "\144\x65\146\141\165\154\164\137\x69\144\x70") {
            goto oK;
        }
        if (!empty($_POST["\x6d\157\137\x73\141\155\154\x5f\x61\165\x74\157\137\162\x65\x64\151\x72\x65\x63\164"]) && $_POST["\155\157\137\163\141\155\x6c\137\x61\165\x74\157\x5f\162\x65\144\x69\x72\145\x63\x74"] == "\162\x65\147\151\163\x74\145\162\x65\144\137\x6f\x6e\154\171") {
            goto AY;
        }
        if (!empty($_POST["\x6d\157\137\x73\x61\x6d\x6c\137\x61\165\x74\157\137\x72\x65\144\x69\x72\x65\x63\164"]) and $_POST["\x6d\x6f\x5f\x73\141\x6d\x6c\137\x61\x75\x74\x6f\137\x72\145\x64\x69\x72\145\x63\164"] == "\x70\x75\142\x6c\151\x63\x5f\160\x61\147\x65") {
            goto dp;
        }
        if (self::mo_check_option_admin_referer("\155\157\137\x73\x61\155\x6c\x5f\145\x6e\x61\142\x6c\145\x5f\x72\163\x73\x5f\x61\x63\x63\x65\163\x73\137\x6f\160\x74\x69\157\156")) {
            goto HJ;
        }
        if (self::mo_check_option_admin_referer("\x6d\157\x5f\x73\141\x6d\x6c\137\146\x6f\x72\143\145\x5f\x61\165\x74\x68\x65\156\x74\151\x63\x61\x74\151\157\156\x5f\157\x70\x74\x69\x6f\156")) {
            goto gy;
        }
        if (self::mo_check_option_admin_referer("\x6d\157\137\163\141\155\x6c\x5f\x64\157\155\x61\151\156\137\x6d\x61\160\x70\151\156\147\137\x63\x6f\x6e\146\151\147")) {
            goto Eq;
        }
        if (mo_saml_is_sp_configured() && self::mo_check_option_admin_referer("\155\157\x5f\163\141\155\x6c\137\141\x6c\x6c\157\x77\137\x77\x70\137\x73\x69\147\x6e\x69\156\x5f\157\x70\164\151\x6f\x6e")) {
            goto DD;
        }
        if (self::mo_check_option_admin_referer("\146\x65\x64\x65\x72\x61\x74\x69\x6f\x6e")) {
            goto Il;
        }
        if (self::mo_check_option_admin_referer("\x6d\x6f\137\x73\x61\x6d\x6c\137\141\x64\144\x5f\146\145\144\145\x72\x61\x74\151\x6f\x6e\x73")) {
            goto ot;
        }
        if (self::mo_check_option_admin_referer("\145\x64\151\164\137\x66\145\144\x65\162\x61\x74\x69\157\156")) {
            goto nV;
        }
        if (self::mo_check_option_admin_referer("\144\x65\154\x65\x74\x65\137\x66\x65\144\x65\x72\x61\164\x69\x6f\x6e")) {
            goto Xw;
        }
        if (!self::mo_check_option_admin_referer("\163\141\x76\x65\x5f\151\x64\160\137\154\151\x73\x74")) {
            goto x1;
        }
        $rK = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\154\137\144\145\146\141\x75\x6c\164\x5f\151\x64\160");
        $Ij = array();
        if (empty($_POST["\x65\156\x61\142\154\145\x5f\x69\x64\160"])) {
            goto YO;
        }
        $Ij = $_POST["\145\156\141\142\x6c\x65\137\151\x64\x70"];
        YO:
        $N9 = SAMLSPUtilities::mo_saml_fetch_idps_count_in_license();
        $HZ = count($Ij);
        if (!($HZ > $N9)) {
            goto XN;
        }
        update_option("\155\157\137\163\141\x6d\154\x5f\155\145\x73\x73\x61\x67\145", "\x59\x6f\165\40\x68\x61\x76\145\40\x45\130\103\x45\105\104\105\x44\40\171\x6f\165\162\x20\111\104\120\x20\x6c\x69\x6d\x69\x74\56\40\x59\x6f\x75\x20\143\x61\x6e\40\x75\160\147\162\x61\x64\x65\40\171\157\x75\x72\40\x6c\151\143\x65\x6e\x73\x65\x20\x6f\162\40\x64\x65\154\145\x74\x65\x2f\144\151\163\x61\x62\x6c\145\x20\165\156\x75\x73\145\144\x20\x49\104\120\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        XN:
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\155\x6c\x5f\151\x64\x65\x6e\x74\x69\164\x79\x5f\160\x72\157\x76\151\x64\145\162\163", true);
        foreach ($Qm as $fx => $tX) {
            if (SAMLSPUtilities::mo_saml_in_array($fx, $Ij) || $rK == $fx && $Qm[$fx]["\145\x6e\x61\142\154\x65\x5f\151\x64\160"]) {
                goto Wt;
            }
            $Qm[$fx]["\x65\x6e\141\x62\154\145\137\x69\x64\160"] = false;
            goto JQ;
            Wt:
            $Qm[$fx]["\x65\156\x61\142\x6c\x65\137\151\144\160"] = true;
            JQ:
            Pt:
        }
        OT:
        if (empty($Qm[''])) {
            goto xs;
        }
        unset($Qm['']);
        xs:
        $vN->mo_save_environment_settings("\163\141\155\x6c\x5f\x69\x64\145\x6e\164\151\164\x79\x5f\160\162\157\x76\x69\x64\x65\x72\x73", $Qm);
        update_option("\155\157\137\x73\141\155\154\x5f\155\x65\163\x73\x61\x67\x65", "\x49\104\120\163\x20\163\145\x74\164\x69\x6e\x67\x73\40\165\160\x64\141\x74\x65\x64\40\x73\165\x63\143\x65\x73\x73\146\x75\154\x6c\171\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        x1:
        goto Kt;
        Xw:
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\137\x73\x61\x6d\154\x5f\x66\145\144\145\x72\141\x74\x69\157\x6e\163", true);
        $Fz = $_POST["\146\x65\x64\145\162\141\x74\151\x6f\x6e\137\x6e\x61\x6d\145"];
        unset($tM[$Fz]);
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\x61\155\154\x5f\x66\x65\144\x65\x72\x61\x74\151\157\156\x73", $tM);
        Kt:
        goto iO;
        nV:
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\163\141\155\x6c\x5f\146\145\144\145\162\141\x74\x69\157\156\x73", true);
        $Fz = $_POST["\146\x65\144\x65\162\141\164\151\x6f\156\x5f\156\141\155\x65"];
        if (empty($tM[$Fz])) {
            goto He;
        }
        $p0 = $tM[$Fz];
        $FU = $_POST["\144\151\163\x63\157\166\145\162\x79\x5f\165\162\x6c"];
        $p0["\x64\x69\x73\x63\157\166\x65\x72\171\x5f\x75\162\x6c"] = $FU;
        $o4 = $this->mo_saml_save_federation_parameters();
        if (empty($o4)) {
            goto T3;
        }
        $p0["\160\x61\162\141\155\145\x74\x65\x72\163"] = $o4;
        T3:
        $tM[$Fz] = $p0;
        $vN->mo_save_environment_settings("\155\157\x5f\x73\141\x6d\154\x5f\x66\145\x64\145\162\141\164\x69\157\156\163", $tM);
        He:
        iO:
        goto nu;
        ot:
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\163\141\x6d\x6c\137\146\145\x64\145\162\141\x74\x69\x6f\156\x73", true);
        if (!(!empty($_POST["\x66\x65\144\x65\x72\x61\164\151\x6f\x6e\x5f\x6e\x61\155\145"]) and !empty($_POST["\x64\x69\x73\x63\x6f\x76\x65\162\x79\137\x75\x72\154"]))) {
            goto XQ;
        }
        $Fz = $_POST["\146\x65\144\x65\x72\x61\164\151\157\156\x5f\156\141\x6d\145"];
        $FU = $_POST["\x64\151\x73\x63\157\x76\145\162\171\137\165\x72\x6c"];
        $o4 = $this->mo_saml_save_federation_parameters();
        $tM[$Fz] = array("\x66\x65\144\145\x72\141\x74\151\157\x6e\x5f\x6e\141\x6d\145" => $Fz, "\x64\x69\x73\x63\157\x76\145\162\171\x5f\x75\x72\x6c" => $FU, "\x65\156\x61\x62\x6c\x65" => false);
        if (empty($o4)) {
            goto Uu;
        }
        $tM[$Fz]["\160\141\162\x61\x6d\145\x74\145\162\163"] = $o4;
        Uu:
        $vN->mo_save_environment_settings("\155\157\x5f\163\141\x6d\154\x5f\146\x65\x64\145\162\x61\x74\151\x6f\156\x73", $tM);
        XQ:
        nu:
        goto ob;
        Il:
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\137\x73\141\155\154\137\146\x65\x64\145\162\141\164\151\157\x6e\x73", true);
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\141\x6d\x6c\x5f\x73\x70\x5f\142\141\x73\x65\137\x75\x72\154");
        if (!empty($bg)) {
            goto RU;
        }
        $bg = home_url();
        RU:
        $O5 = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\x73\141\x6d\154\x5f\x73\160\x5f\145\x6e\164\x69\164\171\x5f\x69\144");
        if (!empty($O5)) {
            goto XJ;
        }
        $O5 = $bg . "\x2f\x77\x70\x2d\143\x6f\x6e\x74\145\156\x74\57\160\154\165\147\151\156\163\x2f\155\151\x6e\x69\157\x72\x61\x6e\x67\145\55\163\141\155\x6c\x2d\x32\60\55\x73\151\156\x67\154\x65\x2d\x73\151\x67\x6e\55\157\156\x2f";
        XJ:
        $iS = home_url() . "\57\77\157\x70\x74\x69\157\156\75\x73\x61\x6d\x6c\137\165\x73\145\x72\x5f\154\157\x67\151\156";
        if ($tM) {
            goto qj;
        }
        $tM["\x49\156\x43\x6f\x6d\155\157\x6e"] = array("\146\x65\144\x65\x72\141\164\x69\157\156\x5f\156\141\x6d\145" => "\x49\156\x43\x6f\x6d\x6d\x6f\x6e", "\144\151\x73\x63\157\166\x65\162\x79\137\165\x72\154" => "\150\164\x74\x70\x73\x3a\57\x2f\167\141\171\146\x2e\x69\x6e\x63\x6f\155\155\x6f\156\x66\x65\144\x65\x72\x61\x74\x69\157\156\56\x6f\x72\x67\57\x44\123\x2f\x57\101\131\106", "\x70\x61\x72\141\x6d\x65\x74\145\x72\x73" => array("\145\x6e\x74\151\x74\171\111\x44" => $O5, "\x72\x65\164\x75\162\x6e" => $iS), "\x65\x6e\141\142\154\x65" => false);
        $tM["\x48\101\x4b\x41"] = array("\x66\145\144\145\x72\x61\164\151\x6f\156\137\x6e\x61\x6d\x65" => "\x48\x41\113\x41", "\x64\x69\x73\x63\x6f\166\x65\162\171\x5f\x75\162\x6c" => "\x68\x74\x74\160\x73\x3a\57\x2f\150\x61\153\x61\x2e\146\x75\156\145\164\x2e\146\151\57\163\x68\151\142\x62\x6f\x6c\x65\x74\x68\x2f\x57\x41\x59\106", "\160\x61\x72\x61\155\145\164\x65\x72\163" => array("\x65\156\x74\x69\164\171\111\104" => $O5, "\162\145\164\x75\162\x6e" => $iS), "\x65\x6e\x61\142\154\x65" => false);
        $tM["\x48\113\101\x46"] = array("\146\x65\144\145\x72\x61\x74\x69\157\156\x5f\156\x61\155\145" => "\x48\x4b\x41\x46", "\144\x69\x73\143\157\x76\145\x72\x79\x5f\165\162\154" => "\x68\164\x74\x70\x73\72\x2f\57\144\163\x2e\x68\153\141\146\56\x65\x64\x75\x2e\150\153\57\x64\x69\163\x63\x6f\166\x65\162\171", "\x70\x61\162\141\155\145\x74\x65\162\163" => array("\145\x6e\x74\x69\164\171\111\x44" => $O5, "\x72\x65\x74\165\x72\x6e" => $iS), "\145\x6e\x61\142\154\145" => false);
        qj:
        if (!empty($_POST["\145\x6e\x61\x62\154\145\137\x66\145\x64\137\x73\x73\157"])) {
            goto R6;
        }
        foreach ($tM as $It => $p0) {
            $tM[$It]["\145\x6e\x61\x62\154\x65"] = false;
            km:
        }
        b0:
        goto ke;
        R6:
        $Fa = $_POST["\145\x6e\141\142\x6c\x65\x5f\x66\x65\144\x5f\x73\x73\157"];
        foreach ($tM as $It => $p0) {
            if (SAMLSPUtilities::mo_saml_in_array($It, $Fa)) {
                goto kR;
            }
            $tM[$It]["\145\156\141\x62\154\145"] = false;
            goto lX;
            kR:
            $tM[$It]["\145\156\141\x62\x6c\x65"] = true;
            lX:
            NP:
        }
        UB:
        ke:
        $vN->mo_save_environment_settings("\155\157\137\163\141\155\x6c\x5f\146\145\x64\x65\162\x61\x74\151\x6f\x6e\163", $tM);
        update_option("\155\157\137\x73\x61\x6d\x6c\137\x6d\145\163\163\x61\147\x65", "\106\x65\144\145\x72\141\164\x69\157\156\40\x69\156\x66\x6f\x72\x6d\x61\164\x69\157\156\40\x73\x61\x76\x65\x64\40\163\x75\x63\x63\145\163\x73\x66\165\x6c\154\171\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        ob:
        goto IL;
        DD:
        $bJ = !empty($_POST["\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\x62\141\x63\x6b\144\x6f\x6f\162\x5f\x75\x72\x6c"]) ? trim($_POST["\x6d\x6f\x5f\163\x61\155\x6c\x5f\142\141\143\153\144\157\157\162\x5f\165\x72\x6c"]) : '';
        if (isset($_POST["\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\x61\x6c\x6c\x6f\167\137\x77\160\x5f\x73\151\147\x6e\x69\156"]) && !empty(sanitize_text_field($_POST["\155\x6f\137\x73\x61\x6d\154\137\x61\x6c\154\x6f\x77\x5f\x77\160\137\163\x69\147\156\151\156"]))) {
            goto Tk;
        }
        $vy = "\x66\141\x6c\x73\145";
        goto Ko;
        Tk:
        $vy = sanitize_text_field($_POST["\155\157\137\x73\141\155\x6c\x5f\141\x6c\x6c\157\x77\137\x77\x70\x5f\163\151\147\x6e\x69\x6e"]);
        Ko:
        $vN->mo_save_environment_settings("\x6d\x6f\137\x73\x61\155\154\x5f\x61\x6c\154\157\x77\137\167\160\x5f\x73\151\x67\156\151\x6e", $vy);
        if (!preg_match("\57\136\133\x61\x2d\x7a\101\x2d\132\x30\55\x39\x5f\134\x2d\x5d\x2b\x24\57", $bJ)) {
            goto A1;
        }
        $vN->mo_save_environment_settings("\155\x6f\x5f\x73\x61\155\x6c\x5f\x62\x61\x63\x6b\144\157\157\x72\137\x75\x72\x6c", $bJ);
        SAMLSPUtilities::mo_saml_show_success_message();
        update_option("\155\157\137\163\x61\155\x6c\x5f\155\x65\x73\x73\x61\147\x65", "\x53\x69\x67\156\40\x69\x6e\x20\157\160\164\151\x6f\x6e\163\x20\165\x70\144\x61\164\145\144\x2e");
        goto a8;
        A1:
        update_option("\x6d\157\137\x73\x61\155\154\x5f\155\145\163\163\x61\147\x65", "\x4f\156\154\x79\x20\x61\154\160\x68\x61\x6e\x75\x6d\145\162\151\x63\x20\x63\150\141\x72\x61\143\164\x65\162\40\x61\x72\x65\40\141\154\x6c\x6f\x77\145\x64\x2e\x20\x41\154\x73\x6f\40\x74\150\145\40\146\x69\145\154\x64\x20\143\x61\156\156\x6f\164\40\142\145\40\145\x6d\x70\164\x79\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        a8:
        IL:
        goto cO;
        gy:
        if (mo_saml_is_sp_configured()) {
            goto ji;
        }
        update_option("\x6d\x6f\x5f\x73\141\155\x6c\x5f\x6d\x65\163\x73\x61\147\145", "\x50\154\145\x61\163\x65\x20\143\157\155\x70\154\x65\164\x65\40\74\x61\x20\150\x72\x65\146\x3d\x22" . add_query_arg(array("\x74\x61\142" => "\x73\141\x76\145"), $_SERVER["\122\x45\121\125\105\123\x54\x5f\125\122\x49"]) . "\42\40\x2f\x3e\123\x65\x72\166\x69\x63\145\x20\x50\162\157\x76\x69\x64\145\x72\x3c\x2f\x61\76\x20\x63\x6f\x6e\x66\151\x67\x75\x72\x61\164\x69\x6f\156\40\x66\151\162\163\164\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto mg;
        ji:
        if (!empty($_POST["\155\x6f\137\163\x61\155\x6c\137\146\157\162\x63\x65\x5f\141\165\164\150\x65\x6e\x74\151\143\x61\x74\x69\157\156"])) {
            goto yc;
        }
        $wk = "\x66\141\x6c\x73\145";
        goto QK;
        yc:
        $wk = $_POST["\x6d\x6f\x5f\x73\141\x6d\154\x5f\146\157\162\x63\x65\x5f\141\165\164\x68\x65\156\164\x69\143\x61\x74\x69\157\x6e"];
        QK:
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\x61\x6d\154\x5f\x66\x6f\162\143\145\137\x61\165\164\x68\145\x6e\x74\151\143\141\164\x69\x6f\156", $wk);
        update_option("\x6d\x6f\x5f\163\x61\155\154\137\x6d\145\163\x73\141\147\x65", "\x53\151\147\156\x20\151\x6e\x20\157\160\164\151\x6f\x6e\163\40\x75\x70\144\x61\x74\145\144\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        mg:
        goto cO;
        Eq:
        if (mo_saml_is_sp_configured()) {
            goto RP;
        }
        update_option("\155\x6f\137\x73\141\155\154\x5f\155\x65\163\163\141\x67\x65", "\120\154\x65\141\163\145\x20\x63\157\155\160\x6c\145\x74\x65\x20\74\141\40\150\x72\x65\146\75\42" . add_query_arg(array("\x74\x61\x62" => "\163\x61\x76\x65"), $_SERVER["\x52\105\x51\x55\105\123\124\x5f\x55\122\111"]) . "\42\40\x2f\76\123\145\162\166\x69\143\x65\40\120\x72\x6f\166\151\x64\145\x72\x3c\x2f\141\76\40\143\x6f\156\x66\151\147\x75\x72\x61\x74\x69\157\x6e\40\x66\151\x72\x73\164\56");
        goto wc;
        RP:
        $kq = "\146\141\154\163\x65";
        if (empty($_POST["\x6d\x6f\x5f\163\141\155\154\137\145\156\x61\142\154\145\137\x64\157\x6d\x61\x69\x6e\137\x6d\x61\160\x70\x69\x6e\147"])) {
            goto QJ;
        }
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\154\x5f\x69\144\145\x6e\x74\x69\x74\171\137\160\162\x6f\166\151\x64\145\x72\163", true);
        $LM = array();
        foreach ($KI as $ni => $SE) {
            $a1 = "\163\141\155\x6c\x5f\144\x6f\155\x61\151\x6e\x5f\x6d\x61\160\160\151\x6e\x67\137" . $ni;
            $yP = !empty($_POST[$a1]) ? sanitize_text_field($_POST[$a1]) : '';
            $LM[$ni] = SAMLSPUtilities::mo_saml_trim_semi_colon_separated_values($yP);
            if (preg_match("\57\x5e\x5c\x53\x2a\x24\57", $LM[$ni])) {
                goto L8;
            }
            update_option("\155\x6f\137\163\x61\155\x6c\137\155\145\163\x73\141\147\x65", "\123\160\x61\x63\145\x73\x20\141\162\145\40\156\x6f\164\x20\141\x6c\154\157\167\145\144\40\151\x6e\x20\x74\150\x65\x20\144\x6f\x6d\141\x69\156\40\x76\141\154\x75\145\163\56");
            SAMLSPUtilities::mo_saml_show_error_message();
            return;
            L8:
            FA:
        }
        Mj:
        $LM = array_filter($LM, "\x66\x69\x6c\x74\x65\x72\x5f\x65\155\160\164\x79\137\166\x61\x6c\165\145\x73");
        $vN->mo_save_environment_settings("\163\141\x6d\x6c\x5f\151\x64\160\x5f\x64\x6f\155\141\x69\x6e\x5f\x6d\x61\160\160\151\x6e\147", $LM);
        $kq = $_POST["\155\x6f\137\163\141\x6d\154\x5f\145\x6e\141\142\x6c\145\x5f\144\157\155\141\151\x6e\137\x6d\x61\160\160\x69\x6e\x67"];
        if (!empty($_POST["\144\157\155\x61\151\x6e\137\x6c\157\147\151\156\x5f\146\141\x69\x6c\145\x64\x5f\157\160\164\x69\x6f\x6e"])) {
            goto hq;
        }
        $bn = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\141\x6d\154\137\144\157\155\x61\151\x6e\137\154\x6f\x67\x69\156\x5f\x66\x61\x69\154");
        $Ao = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\x73\x61\x6d\x6c\137\x66\141\154\154\x62\141\x63\153\x5f\164\x6f\x5f\144\x65\146\141\x75\x6c\x74");
        if (!(!$bn && !$Ao)) {
            goto tC;
        }
        $vN->mo_save_environment_settings("\155\x6f\x5f\163\141\155\154\x5f\x64\157\155\141\151\x6e\x5f\x6c\x6f\147\151\x6e\x5f\146\141\151\154", "\x74\162\x75\x65");
        tC:
        goto dY;
        hq:
        $F3 = sanitize_text_field($_POST["\144\157\x6d\x61\151\x6e\x5f\x6c\157\x67\x69\x6e\x5f\146\141\151\x6c\x65\144\x5f\x6f\160\164\x69\x6f\x6e"]);
        $wz = '';
        $W3 = '';
        if ($F3 === "\165\163\145\137\x77\x70\x5f\143\162\145\144\145\x6e\164\x69\141\x6c\x73") {
            goto Fy;
        }
        if ($F3 === "\162\145\144\x69\162\145\143\164\137\x74\157\137\x64\145\146\x61\165\x6c\x74\137\x69\x64\x70") {
            goto I3;
        }
        goto Wu;
        Fy:
        $wz = "\164\x72\165\x65";
        $W3 = '';
        goto Wu;
        I3:
        $wz = '';
        $W3 = "\x74\162\x75\x65";
        Wu:
        $wz = $W3 === "\x74\x72\165\x65" ? '' : $wz;
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\141\x6d\x6c\x5f\144\157\155\141\x69\x6e\137\154\x6f\x67\x69\156\137\146\141\151\154", $wz);
        $vN->mo_save_environment_settings("\155\157\137\x73\x61\155\154\137\146\x61\x6c\154\142\x61\143\153\137\x74\157\x5f\144\145\146\x61\x75\154\164", $W3);
        dY:
        QJ:
        $vN->mo_save_environment_settings("\x6d\x6f\137\163\141\155\154\x5f\145\x6e\141\142\x6c\145\x5f\144\157\x6d\141\x69\x6e\x5f\155\x61\160\160\151\x6e\147", $kq);
        update_option("\155\x6f\137\163\x61\155\154\x5f\x6d\145\163\163\x61\147\145", "\104\x6f\155\141\151\x6e\x20\115\x61\x70\160\x69\156\x67\40\x64\145\x74\141\x69\x6c\163\x20\x73\141\x76\145\144\x20\163\x75\143\x63\x65\x73\163\146\165\154\154\x79\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        wc:
        cO:
        goto xz;
        HJ:
        if (mo_saml_is_sp_configured()) {
            goto Wi;
        }
        update_option("\x6d\157\x5f\163\x61\155\x6c\x5f\155\x65\163\x73\x61\147\145", "\120\154\x65\141\x73\x65\x20\143\157\155\x70\154\x65\x74\x65\x20" . addLink("\123\145\x72\166\151\x63\x65\x20\x50\x72\157\166\151\144\x65\x72", add_query_arg(array("\x74\x61\x62" => "\x73\x61\166\145"), $_SERVER["\x52\105\x51\x55\x45\123\x54\x5f\x55\x52\111"])) . "\40\143\x6f\x6e\x66\151\x67\x75\162\x61\x74\151\x6f\156\40\146\151\x72\163\x74\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto cr;
        Wi:
        if (array_key_exists("\x6d\x6f\137\163\x61\x6d\154\137\x65\156\141\142\x6c\x65\137\162\163\163\137\141\143\143\x65\163\163", $_POST)) {
            goto k5;
        }
        $uq = false;
        goto xm;
        k5:
        $uq = sanitize_text_field($_POST["\x6d\157\137\x73\141\155\154\137\x65\x6e\x61\x62\154\x65\x5f\x72\x73\x73\137\141\143\x63\x65\x73\x73"]);
        xm:
        if ($uq == "\x74\x72\165\145") {
            goto nx;
        }
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\141\x6d\x6c\137\x65\x6e\141\142\x6c\145\x5f\162\x73\163\x5f\x61\143\143\145\163\x73", '');
        goto rA;
        nx:
        $vN->mo_save_environment_settings("\x6d\157\137\163\x61\155\x6c\137\145\x6e\x61\142\154\145\137\162\163\163\137\x61\143\x63\145\163\163", "\x74\162\x75\145");
        rA:
        update_option("\155\x6f\137\x73\141\x6d\x6c\x5f\155\145\x73\x73\x61\147\x65", "\122\x53\x53\40\106\145\x65\144\40\157\x70\x74\x69\157\156\40\165\160\x64\141\164\x65\144\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        cr:
        xz:
        goto d8;
        dp:
        if (mo_saml_is_sp_configured()) {
            goto QQ;
        }
        update_option("\155\x6f\137\x73\x61\155\x6c\137\155\x65\163\163\141\147\145", "\x50\154\x65\x61\x73\145\x20\x63\157\155\x70\154\145\164\145\40\x3c\x61\x20\x68\162\145\x66\75\x22" . add_query_arg(array("\x74\141\142" => "\163\141\166\145"), $_SERVER["\122\x45\x51\x55\x45\123\x54\x5f\x55\122\111"]) . "\42\40\x2f\x3e\x53\x65\162\166\151\143\145\40\120\162\x6f\x76\151\x64\x65\162\74\57\141\76\40\143\157\156\146\151\x67\x75\x72\141\x74\x69\x6f\156\x20\146\x69\x72\163\164\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto RA;
        QQ:
        $vN->mo_save_environment_settings("\x6d\157\137\x73\x61\x6d\x6c\137\156\157\x5f\141\x75\164\157\x5f\x72\x65\144\151\162\145\x63\x74", '');
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\x61\155\154\137\162\145\144\x69\162\x65\x63\164\x5f\x64\x65\x66\x61\165\x6c\x74\137\x69\144\x70", '');
        $vN->mo_save_environment_settings("\x6d\157\137\x73\141\155\154\137\x72\x65\x67\x69\x73\x74\145\x72\145\144\137\157\156\154\171\137\141\x63\143\x65\x73\163", '');
        $vN->mo_save_environment_settings("\x6d\157\137\163\141\155\x6c\137\141\x75\x74\157\x5f\162\145\144\151\162\145\x63\x74\137\x74\x6f\137\x70\165\142\x6c\151\x63\137\160\x61\x67\145", "\164\162\165\145");
        update_option("\x6d\157\137\x73\x61\155\x6c\x5f\155\x65\163\163\141\147\145", "\123\x69\x67\156\x20\151\156\x20\x6f\160\x74\x69\x6f\x6e\x73\x20\165\160\144\141\x74\x65\144\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        RA:
        d8:
        goto Pq;
        AY:
        if (mo_saml_is_sp_configured()) {
            goto iE;
        }
        update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\155\145\x73\x73\141\147\145", "\x50\x6c\x65\141\x73\145\x20\143\x6f\155\160\x6c\x65\x74\145\40\74\141\40\150\162\x65\x66\x3d\42" . add_query_arg(array("\x74\141\142" => "\163\x61\166\x65"), $_SERVER["\122\x45\121\125\105\x53\x54\137\125\122\x49"]) . "\x22\x20\x2f\76\123\145\162\166\151\x63\145\x20\x50\162\157\166\151\144\145\x72\74\x2f\x61\76\x20\x63\157\156\x66\151\147\x75\162\x61\x74\151\x6f\156\x20\146\x69\x72\163\x74\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto UF;
        iE:
        $vN->mo_save_environment_settings("\155\157\x5f\x73\x61\x6d\154\x5f\x6e\x6f\x5f\x61\165\x74\157\x5f\162\145\144\151\162\x65\143\164", '');
        $vN->mo_save_environment_settings("\155\157\137\x73\x61\x6d\154\137\162\145\x64\151\162\145\x63\164\137\x64\145\x66\141\165\x6c\x74\137\151\144\x70", '');
        $vN->mo_save_environment_settings("\155\157\x5f\x73\141\155\x6c\x5f\162\145\x67\x69\163\x74\x65\162\x65\x64\x5f\157\x6e\154\x79\137\141\x63\143\145\x73\x73", "\164\162\165\x65");
        $vN->mo_save_environment_settings("\155\x6f\x5f\x73\141\155\154\137\x61\165\164\x6f\137\x72\145\144\151\162\x65\x63\164\x5f\x74\x6f\x5f\160\x75\x62\x6c\x69\143\137\160\141\147\x65", '');
        update_option("\x6d\x6f\137\x73\x61\x6d\154\137\x6d\x65\x73\163\x61\x67\x65", "\123\x69\x67\156\40\x69\156\40\157\160\164\151\157\156\x73\x20\x75\160\144\x61\164\145\144\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        UF:
        Pq:
        goto i6;
        oK:
        if (mo_saml_is_sp_configured()) {
            goto Td;
        }
        update_option("\x6d\157\x5f\163\141\x6d\154\x5f\x6d\x65\163\x73\x61\x67\145", "\x50\x6c\145\x61\x73\145\40\143\157\x6d\x70\154\145\164\x65\x20" . addLink("\x53\145\x72\166\151\143\145\x20\120\x72\x6f\166\x69\x64\x65\162", add_query_arg(array("\x74\141\x62" => "\x73\x61\166\145"), $_SERVER["\x52\105\121\x55\x45\x53\124\137\x55\122\x49"])) . "\40\x63\157\x6e\x66\151\147\165\x72\141\164\151\x6f\156\x20\146\x69\162\x73\x74\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto mb;
        Td:
        $vN->mo_save_environment_settings("\155\157\x5f\x73\141\x6d\154\137\x6e\157\x5f\141\165\164\157\x5f\x72\x65\144\151\x72\x65\x63\x74", '');
        $vN->mo_save_environment_settings("\155\x6f\137\163\141\155\154\x5f\162\x65\x64\151\x72\x65\x63\164\x5f\x64\x65\146\141\x75\154\x74\x5f\x69\144\x70", "\x74\x72\x75\x65");
        $vN->mo_save_environment_settings("\x6d\x6f\137\163\141\155\154\137\162\145\x67\151\x73\x74\145\162\145\144\x5f\x6f\x6e\154\x79\137\x61\143\x63\145\x73\163", '');
        $vN->mo_save_environment_settings("\155\x6f\x5f\163\141\x6d\154\x5f\141\x75\x74\x6f\x5f\162\145\144\x69\162\x65\x63\x74\x5f\164\x6f\x5f\160\x75\x62\154\x69\x63\x5f\160\141\147\x65", '');
        update_option("\155\157\137\163\x61\155\x6c\x5f\155\x65\x73\163\141\147\145", "\123\x69\147\x6e\40\x69\x6e\40\x6f\x70\x74\151\x6f\156\163\40\x75\x70\x64\x61\164\145\144\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        mb:
        i6:
        goto l0;
        Xi:
        if (mo_saml_is_sp_configured()) {
            goto SB;
        }
        update_option("\155\x6f\x5f\163\x61\x6d\x6c\x5f\155\x65\x73\163\141\x67\x65", "\120\154\145\141\x73\145\x20\x63\157\x6d\160\x6c\145\x74\x65\40" . addLink("\x53\145\x72\x76\151\143\145\x20\x50\x72\157\x76\151\x64\145\162", add_query_arg(array("\x74\141\142" => "\163\141\x76\x65"), $_SERVER["\x52\x45\x51\125\105\123\124\x5f\125\122\111"])) . "\x20\x63\x6f\x6e\x66\151\147\x75\x72\141\164\x69\157\x6e\40\x66\151\x72\x73\x74\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto Ih;
        SB:
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\x6e\x6f\x5f\141\x75\164\x6f\x5f\x72\145\144\x69\162\x65\x63\x74", "\164\162\165\145");
        $vN->mo_save_environment_settings("\155\x6f\137\x73\141\x6d\154\137\162\145\x64\151\162\145\x63\x74\137\x64\x65\x66\141\x75\x6c\164\x5f\151\144\160", '');
        $vN->mo_save_environment_settings("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\162\x65\x67\x69\163\164\145\162\145\x64\137\x6f\x6e\154\171\137\x61\143\x63\145\x73\x73", '');
        $vN->mo_save_environment_settings("\155\157\x5f\x73\x61\155\154\x5f\x61\165\x74\x6f\137\x72\x65\144\x69\x72\x65\x63\164\x5f\164\x6f\137\x70\165\142\x6c\151\143\x5f\x70\141\147\x65", '');
        update_option("\x6d\157\137\163\x61\x6d\154\x5f\155\145\x73\163\x61\x67\145", "\x53\x69\147\x6e\x20\151\x6e\x20\157\x70\164\x69\x6f\x6e\x73\40\x75\x70\x64\x61\x74\145\144\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        Ih:
        l0:
        goto E6;
        Z9:
        $vb = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\x61\x6d\x6c\x5f\x74\x65\x73\x74\x5f\143\157\156\146\x69\147\137\141\164\x74\162\x73", true);
        if (empty($_POST["\151\144\x70\x5f\x6e\x61\155\x65"])) {
            goto nH;
        }
        $tX = htmlspecialchars($_POST["\151\x64\x70\x5f\x6e\141\x6d\x65"]);
        if (empty($vb[$tX])) {
            goto WT;
        }
        unset($vb[$tX]);
        WT:
        nH:
        $vN->mo_save_environment_settings("\x6d\x6f\137\163\x61\x6d\x6c\137\x74\x65\163\x74\137\143\x6f\x6e\x66\151\147\x5f\141\x74\x74\x72\163", $vb);
        update_option("\x6d\157\137\x73\141\155\154\137\155\x65\163\163\141\x67\x65", "\x41\x74\x74\162\x69\x62\x75\x74\x65\x73\40\x6c\151\x73\x74\40\162\145\x6d\x6f\166\145\144\x20\x73\x75\x63\143\145\x73\x73\146\x75\x6c\x6c\171");
        SAMLSPUtilities::mo_saml_show_success_message();
        E6:
        goto zS;
        wC:
        $vN->mo_save_environment_settings("\163\x61\155\x6c\x5f\163\x73\x6f\x5f\142\165\164\x74\157\x6e\137\151\x64\x70", '');
        update_option("\155\x6f\x5f\x73\x61\155\154\x5f\x6d\x65\x73\163\141\x67\x65", "\x4c\157\x67\151\x6e\x20\142\x75\x74\164\157\x6e\x20\162\x65\x73\145\x74\40\163\165\143\x63\145\163\163\x66\x75\154\154\171\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        zS:
        if (self::mo_check_option_admin_referer("\155\x6f\x5f\163\x61\155\154\137\143\150\x65\x63\153\137\154\x69\143\x65\156\163\x65")) {
            goto mH;
        }
        if (self::mo_check_option_admin_referer("\155\x6f\137\x73\141\x6d\154\137\x66\x6f\162\147\x6f\164\x5f\160\x61\x73\x73\x77\x6f\x72\x64\137\146\157\162\x6d\x5f\157\x70\x74\151\x6f\x6e")) {
            goto fm;
        }
        if (!self::mo_check_option_admin_referer("\x6d\x6f\137\163\x61\155\x6c\x5f\166\145\x72\x69\146\x79\x5f\154\x69\143\x65\x6e\163\x65")) {
            goto bj;
        }
        if (!empty($_POST["\x6d\x6f\137\163\x61\x6d\154\x5f\154\151\x63\x65\156\x73\145\137\x6b\145\x79"])) {
            goto md;
        }
        update_option("\155\x6f\137\x73\141\155\x6c\137\155\145\x73\x73\141\147\x65", "\x41\154\154\40\x74\150\145\40\146\151\145\x6c\x64\x73\40\x61\162\145\40\x72\x65\x71\165\151\162\145\144\x2e\x20\120\x6c\145\141\x73\x65\x20\x65\156\164\145\x72\40\x76\x61\154\x69\144\40\x6c\151\143\x65\x6e\163\145\x20\x6b\x65\171\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        md:
        $Il = trim($_POST["\155\157\x5f\163\x61\155\x6c\x5f\x6c\x69\143\x65\156\163\x65\x5f\x6b\x65\x79"]);
        $V3 = new Customersaml();
        $cq = $V3->mo_saml_verify_license($Il, $this);
        if (!($cq === false)) {
            goto gd;
        }
        update_option("\155\157\137\x73\141\155\154\x5f\155\145\163\x73\141\147\x65", "\123\x6f\155\x65\164\x68\x69\x6e\x67\40\167\x65\156\164\x20\x77\x72\x6f\x6e\147\x20\x77\150\x69\154\145\x20\160\162\x6f\x63\145\163\x73\151\156\147\40\x74\x68\x69\x73\40\162\145\161\165\145\163\x74\x2e\40\x50\154\x65\x61\163\145\x20\x6c\157\x67\x69\x6e\40\141\x6e\x64\x20\x74\162\171\40\141\x67\141\x69\156");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        gd:
        $cq = json_decode($cq, true);
        if (!empty($cq["\x73\164\x61\164\x75\163"])) {
            goto Nc;
        }
        update_option("\x6d\157\x5f\163\x61\155\x6c\137\155\145\163\x73\141\147\145", "\x54\150\145\x20\154\151\143\x65\156\x73\145\40\x6b\145\171\40\x79\157\x75\40\x68\x61\x76\145\x20\145\156\164\145\x72\x65\x64\40\151\163\x20\x69\x6e\166\x61\154\x69\x64\56\40\120\154\x65\141\163\x65\x20\x65\x6e\164\145\162\x20\x61\40\166\141\154\151\x64\40\x6c\151\143\145\x6e\x73\145\x20\x6b\145\171\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Nc:
        $s4 = $V3->check_customer_ln();
        if ($s4) {
            goto Ww;
        }
        return;
        Ww:
        $w6 = json_decode($s4, true);
        if (strcasecmp($cq["\x73\x74\141\x74\x75\163"], "\x53\125\x43\103\105\123\x53") == 0 && strcasecmp($w6["\x73\x74\x61\164\x75\163"], "\x53\x55\103\x43\x45\x53\x53") == 0) {
            goto iS;
        }
        if (strcasecmp($cq["\163\x74\x61\x74\x75\x73"], "\106\101\x49\x4c\105\x44") == 0 || strcasecmp($w6["\x73\164\141\x74\x75\163"], "\106\x41\111\x4c\x45\104") == 0) {
            goto qb;
        }
        update_option("\x6d\157\x5f\163\141\155\x6c\x5f\x6d\145\x73\163\141\147\145", "\101\x6e\40\145\x72\162\157\x72\40\x6f\x63\143\x75\x72\x72\145\x64\40\167\x68\151\154\x65\40\160\x72\157\x63\x65\x73\163\x69\156\147\x20\x79\157\x75\x72\40\x72\x65\161\165\x65\x73\164\56\40\120\x6c\145\x61\163\145\x20\124\x72\x79\x20\141\147\141\151\x6e\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto UD;
        qb:
        if (strcasecmp($cq["\x6d\x65\x73\x73\x61\147\x65"], "\103\x6f\x64\x65\x20\150\x61\x73\40\x45\x78\x70\151\162\x65\x64") == 0) {
            goto IT;
        }
        if (strcasecmp($w6["\x6d\x65\x73\x73\x61\x67\x65"], "\114\x69\x63\145\156\x73\x65\40\x4e\x6f\164\40\106\157\x75\x6e\x64\56") == 0) {
            goto mR;
        }
        update_option("\155\x6f\x5f\163\x61\155\154\137\155\145\x73\163\x61\x67\145", "\131\157\x75\x20\x68\x61\x76\145\x20\145\x6e\x74\145\162\145\144\x20\x61\156\40\x69\156\166\141\154\x69\x64\x20\154\151\143\145\156\163\145\40\x6b\145\x79\x2e\x20\x50\x6c\145\141\163\145\40\145\156\164\x65\x72\x20\141\40\x76\x61\x6c\151\144\x20\x6c\x69\x63\145\x6e\x73\x65\40\153\145\171\x2e");
        goto ER;
        mR:
        update_option("\155\157\137\x73\x61\x6d\x6c\x5f\x6d\x65\163\x73\141\x67\x65", "\x59\x6f\x75\40\x64\157\40\x6e\157\x74\x20\x68\141\x76\x65\40\141\x20\166\141\154\151\144\x20\154\x69\143\145\x6e\x73\x65\40\x74\157\x20\x61\143\164\151\166\x61\164\x65\40\x74\x68\145\40\x70\x6c\x75\147\x69\156\x2e\x20\x50\x6c\x65\141\163\x65\40\x72\x65\x61\x63\x68\x20\157\165\x74\40\164\157\x20\x75\163\40\x61\164\x20\74\141\40\x68\x72\145\x66\75\42\x6d\x61\151\x6c\164\157\72\x73\141\x6d\x6c\x73\x75\x70\160\157\162\164\x40\x78\x65\x63\165\x72\x69\x66\171\x2e\143\x6f\x6d\42\x3e\163\141\x6d\154\x73\165\x70\160\157\x72\x74\x40\170\x65\143\x75\162\151\146\171\x2e\143\x6f\x6d\x3c\57\141\76\40\164\x6f\x20\165\x70\x67\162\141\144\x65\40\171\157\165\162\x20\154\151\143\145\x6e\163\145\40\x6f\162\40\x69\x66\x20\171\157\165\x20\x68\x61\166\145\x20\x61\156\171\40\x71\165\145\163\164\x69\157\x6e\x73\x2e");
        ER:
        goto Du;
        IT:
        update_option("\155\x6f\x5f\163\x61\155\154\137\155\145\x73\163\141\147\x65", "\114\x69\143\145\156\x73\145\x20\x6b\145\x79\40\171\x6f\x75\40\x68\x61\166\x65\x20\x65\156\x74\145\162\145\144\x20\150\141\x73\40\141\154\x72\x65\x61\x64\171\x20\x62\145\x65\x6e\x20\x75\163\x65\x64\x2e\40\120\x6c\x65\141\x73\145\x20\145\x6e\164\x65\x72\40\141\40\x6b\145\x79\40\x77\150\x69\x63\150\40\150\141\163\40\x6e\157\164\40\142\145\x65\x6e\x20\x75\x73\145\x64\x20\x62\145\x66\157\x72\x65\40\157\x6e\40\141\156\171\x20\x6f\164\x68\x65\162\40\x69\156\x73\x74\141\156\143\145\x20\x6f\x72\x20\x69\x66\40\x79\x6f\x75\x20\150\x61\x76\x65\40\x65\x78\x68\141\165\x73\x74\x65\x64\40\141\x6c\154\40\x79\x6f\165\162\40\153\x65\171\x73\40\x74\150\x65\x6e\x20\143\157\x6e\x74\x61\x63\164\x20\x75\x73\40\164\x6f\x20\142\x75\x79\x20\155\x6f\162\145\x2e");
        Du:
        SAMLSPUtilities::mo_saml_show_error_message();
        UD:
        goto iG;
        iS:
        $ni = get_option("\155\157\x5f\x73\x61\155\x6c\137\143\165\163\x74\x6f\x6d\x65\x72\137\164\x6f\x6b\145\156");
        update_option("\163\155\x6c\137\x6c\x6b", AESEncryption::encrypt_data($Il, $ni));
        if (empty($w6["\x6c\x69\143\x65\156\163\145\x45\x78\x70\151\x72\171"])) {
            goto da;
        }
        Mo_License_Service::update_license_expiry($w6["\x6c\x69\143\145\156\163\145\x45\x78\x70\x69\162\x79"]);
        da:
        update_option("\x6d\157\x5f\x73\141\155\154\x5f\155\145\x73\x73\x61\x67\x65", "\x59\x6f\165\x72\x20\x6c\151\x63\145\156\x73\145\40\151\x73\x20\x76\145\x72\x69\146\151\145\x64\56\x20\131\x6f\x75\x20\143\141\x6e\40\156\157\x77\40\x73\145\164\x75\160\x20\164\x68\145\40\160\x6c\x75\x67\151\156\x2e");
        update_option(Mo_Saml_Options::LAST_SYNCED_TIME, time());
        update_customer_idp_count($w6);
        SAMLSPUtilities::mo_saml_show_success_message();
        iG:
        bj:
        goto kg;
        fm:
        if (mo_saml_is_extension_installed("\x63\x75\162\154")) {
            goto WW;
        }
        update_option("\x6d\157\137\x73\141\x6d\x6c\137\x6d\145\x73\163\x61\147\145", "\x45\122\x52\x4f\122\72\40\74\141\40\x68\x72\x65\146\75\x22\x68\164\164\160\x3a\x2f\57\160\x68\160\56\x6e\x65\164\x2f\155\141\x6e\165\141\x6c\57\x65\x6e\57\x63\x75\x72\154\56\x69\x6e\x73\x74\141\154\154\x61\x74\151\x6f\156\56\160\150\160\42\x20\x74\x61\x72\x67\145\x74\x3d\x22\x5f\x62\154\141\x6e\x6b\x22\x3e\x50\110\120\40\x63\125\122\x4c\x20\x65\x78\x74\x65\156\x73\151\157\156\74\57\x61\x3e\40\x69\x73\x20\x6e\x6f\164\40\151\156\x73\x74\141\154\x6c\145\144\x20\157\x72\40\144\151\x73\141\142\x6c\145\144\x2e\x20\x52\x65\163\x65\156\x64\40\x4f\x54\120\40\146\141\x69\x6c\145\144\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        WW:
        $Ha = get_option("\155\x6f\137\x73\141\x6d\x6c\x5f\141\144\155\151\x6e\137\x65\x6d\x61\x69\154");
        $V3 = new Customersaml();
        $cq = json_decode($V3->mo_saml_forgot_password($Ha, $this), true);
        if (strcasecmp($cq["\x73\164\x61\164\165\163"], "\x53\125\103\x43\105\123\123") == 0) {
            goto oo;
        }
        update_option("\155\x6f\x5f\163\141\155\x6c\137\155\x65\163\x73\x61\x67\145", "\101\156\40\145\x72\x72\157\162\x20\x6f\143\143\x75\x72\162\145\144\40\x77\x68\x69\x6c\145\40\x70\162\157\143\145\163\x73\151\156\x67\40\x79\x6f\x75\162\40\x72\x65\161\165\145\x73\164\56\x20\120\x6c\x65\141\x73\145\40\124\x72\171\40\141\147\x61\x69\156\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto xf;
        oo:
        update_option("\155\x6f\x5f\163\x61\155\154\137\x6d\145\x73\x73\x61\147\145", "\x59\x6f\x75\x72\40\160\x61\163\x73\167\157\162\144\x20\150\141\x73\40\142\x65\145\156\40\162\x65\x73\x65\164\40\x73\165\143\x63\145\x73\163\146\x75\154\154\x79\56\x20\x50\x6c\145\141\x73\x65\x20\145\156\x74\145\x72\40\164\150\145\40\156\145\167\x20\160\x61\x73\163\x77\x6f\162\144\40\x73\x65\x6e\164\40\164\x6f\x20" . $Ha . "\x2e");
        SAMLSPUtilities::mo_saml_show_success_message();
        xf:
        kg:
        goto wp;
        mH:
        $this->mo_saml_sso_fetch_exisitng_configuration();
        $V3 = new Customersaml();
        $cq = $V3->check_customer_ln();
        if (!($cq === false)) {
            goto Bo;
        }
        update_option("\x6d\x6f\137\163\141\155\x6c\137\x6d\145\163\163\x61\147\x65", "\x53\x6f\155\x65\164\x68\x69\x6e\x67\40\x77\145\x6e\164\x20\167\162\157\156\147\x20\167\x68\151\154\x65\40\160\162\157\x63\145\163\163\151\156\x67\x20\x74\150\151\163\40\162\145\161\x75\x65\x73\164\x2e\x20\120\154\145\x61\x73\x65\40\154\157\x67\x69\156\40\x61\x6e\144\x20\x74\162\x79\40\141\x67\141\151\156");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Bo:
        if ($cq) {
            goto ao;
        }
        return;
        ao:
        $cq = json_decode($cq, true);
        if (strcasecmp($cq["\x73\x74\141\x74\165\163"], "\123\x55\103\x43\105\x53\x53") == 0) {
            goto Pi;
        }
        $ni = get_option("\x6d\157\x5f\x73\141\155\154\137\143\x75\x73\164\157\x6d\x65\162\x5f\164\x6f\x6b\145\x6e");
        update_option("\x73\x69\x74\145\x5f\x63\153\137\x6c", AESEncryption::encrypt_data("\146\x61\x6c\163\x65", $ni));
        $ow = add_query_arg(array("\164\141\x62" => "\154\151\143\x65\x6e\x73\151\156\147"), $_SERVER["\x52\x45\121\125\x45\x53\x54\137\125\122\x49"]);
        update_option("\x6d\157\137\163\x61\155\154\137\155\145\163\163\x61\147\145", "\131\157\x75\x20\150\x61\166\145\40\x6e\157\164\x20\x75\160\x67\162\141\144\145\x64\40\171\145\x74\56\40" . addLink("\x43\154\x69\143\153\x20\150\x65\162\x65", $ow) . "\40\x74\x6f\40\165\160\x67\x72\x61\x64\x65\x20\164\157\40\160\x72\145\155\x69\x75\x6d\40\166\145\x72\163\151\157\156\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto Mb;
        Pi:
        if (!empty($cq["\154\151\143\x65\156\163\145\x50\x6c\x61\156"])) {
            goto th;
        }
        $ni = get_option("\155\157\137\x73\x61\155\x6c\x5f\143\165\163\164\157\155\x65\162\137\164\x6f\x6b\x65\156");
        update_option("\163\x69\164\x65\x5f\x63\x6b\137\154", AESEncryption::encrypt_data("\x66\x61\x6c\163\x65", $ni));
        $ow = add_query_arg(array("\x74\141\x62" => "\x6c\x69\143\145\x6e\163\151\x6e\x67"), $_SERVER["\x52\105\121\125\105\123\124\x5f\125\122\111"]);
        update_option("\155\x6f\x5f\x73\x61\x6d\154\137\155\x65\x73\163\141\147\x65", "\x59\x6f\165\40\x68\141\166\x65\x20\156\157\x74\x20\165\x70\x67\x72\x61\144\145\x64\40\x79\145\x74\x2e\x20" . addLink("\x43\x6c\151\x63\x6b\x20\150\145\162\145", $ow) . "\40\x74\x6f\40\165\160\147\x72\x61\x64\x65\x20\164\157\x20\160\162\145\x6d\x69\165\155\40\166\145\x72\163\x69\x6f\156\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto j3;
        th:
        update_option("\155\157\x5f\163\141\155\x6c\137\x6c\x69\143\x65\x6e\x73\145\x5f\x6e\141\x6d\x65", base64_encode($cq["\x6c\x69\x63\x65\x6e\163\145\120\x6c\x61\156"]));
        $ni = get_option("\155\x6f\137\x73\x61\x6d\154\137\143\165\163\x74\x6f\155\x65\x72\x5f\x74\157\x6b\x65\156");
        if (empty($cq["\x6e\x6f\117\146\125\163\145\x72\163"])) {
            goto r8;
        }
        update_option("\155\157\x5f\163\141\x6d\x6c\x5f\x75\x73\162\x5f\154\155\x74", AESEncryption::encrypt_data($cq["\x6e\157\x4f\x66\x55\x73\x65\x72\163"], $ni));
        r8:
        if (empty($cq["\154\151\x63\145\x6e\163\145\x45\170\x70\x69\162\x79"])) {
            goto Jw;
        }
        Mo_License_Service::update_license_expiry($cq["\154\x69\143\145\x6e\163\x65\x45\x78\160\151\x72\171"]);
        Jw:
        update_option(Mo_Saml_Options::LAST_SYNCED_TIME, time());
        update_option("\x73\x69\x74\145\137\x63\153\x5f\154", AESEncryption::encrypt_data("\x74\162\x75\145", $ni));
        update_customer_idp_count($cq);
        $nQ = plugin_dir_path(__FILE__);
        $rT = home_url();
        $rT = trim($rT, "\x2f");
        if (preg_match("\x23\136\x68\164\x74\160\50\163\51\x3f\72\57\x2f\x23", $rT)) {
            goto PE;
        }
        $rT = "\150\x74\164\x70\x3a\x2f\57" . $rT;
        PE:
        $tj = parse_url($rT);
        $uA = preg_replace("\57\x5e\167\x77\x77\x5c\x2e\57", '', $tj["\150\x6f\x73\164"]);
        $UI = wp_upload_dir();
        $cj = $uA . "\x2d" . $UI["\142\141\163\145\x64\x69\162"];
        $YX = hash_hmac("\x73\x68\x61\62\65\66", $cj, "\64\x44\x48\x66\x6a\147\x66\152\x61\163\x6e\x64\146\163\x61\x6a\146\x48\107\112");
        $K4 = $this->djkasjdksa();
        $mT = round(strlen($K4) / rand(2, 20));
        $K4 = substr_replace($K4, $YX, $mT, 0);
        $tc = base64_decode($K4);
        if (is_writable($nQ . "\x6c\151\x63\145\x6e\x73\x65")) {
            goto Pd;
        }
        $K4 = str_rot13($K4);
        $b1 = "\142\x47\116\x6b\x61\155\x74\x68\x63\62\x70\x6b\141\x33\x4e\x68\x59\62\x77\75";
        $DR = base64_decode($b1);
        update_option($DR, $K4);
        goto Iz;
        Pd:
        file_put_contents($nQ . "\154\x69\x63\x65\156\x73\145", $tc);
        Iz:
        update_option("\x6c\143\167\x72\x74\154\x66\x73\x61\155\154", true);
        $ow = add_query_arg(array("\164\x61\142" => "\x67\x65\x6e\x65\x72\x61\154"), $_SERVER["\x52\105\121\x55\x45\123\124\x5f\x55\x52\x49"]);
        update_option("\x6d\157\x5f\163\x61\x6d\x6c\x5f\x6d\x65\x73\x73\141\147\x65", "\x59\157\165\x20\150\x61\166\x65\x20\163\x75\143\x63\145\163\x73\146\x75\154\x6c\171\40\163\x79\x6e\x63\145\144\x20\x79\x6f\x75\x72\x20\154\x69\143\145\x6e\x73\x65\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        j3:
        Mb:
        wp:
        if (self::mo_check_option_admin_referer("\x6d\157\x5f\163\141\x6d\x6c\x5f\162\145\x6d\x6f\x76\x65\x5f\x61\x63\x63\x6f\165\156\164")) {
            goto sR;
        }
        if (!self::mo_check_option_admin_referer("\x6d\157\137\x73\141\155\x6c\x5f\x72\x65\147\151\x73\164\x65\x72\137\167\x69\x74\150\x5f\160\x68\x6f\x6e\145\x5f\157\160\164\x69\x6f\156")) {
            goto gX;
        }
        if (mo_saml_is_extension_installed("\143\165\162\154")) {
            goto Iw;
        }
        update_option("\x6d\x6f\137\x73\141\x6d\154\137\x6d\x65\x73\163\141\147\145", "\105\122\122\x4f\x52\72\40\x3c\141\40\x68\x72\x65\x66\x3d\42\x68\x74\164\x70\72\57\57\x70\x68\160\56\x6e\145\164\57\155\x61\156\165\x61\x6c\x2f\x65\x6e\57\x63\x75\x72\154\56\x69\156\x73\164\x61\x6c\x6c\141\x74\x69\x6f\x6e\56\x70\150\x70\42\40\164\141\162\147\145\x74\75\42\x5f\x62\x6c\141\x6e\x6b\42\76\120\x48\x50\40\x63\x55\122\x4c\x20\145\170\x74\145\156\163\151\157\x6e\74\57\141\76\x20\x69\x73\40\x6e\x6f\164\x20\x69\156\x73\x74\141\154\x6c\145\144\x20\x6f\x72\40\x64\151\x73\x61\142\154\145\144\x2e\x20\x52\145\163\x65\156\144\x20\117\124\x50\x20\146\141\x69\154\145\x64\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Iw:
        $rF = sanitize_text_field($_POST["\160\150\157\x6e\145"]);
        $rF = str_replace("\40", '', $rF);
        $rF = str_replace("\x2d", '', $rF);
        update_option("\155\157\x5f\x73\141\155\154\x5f\141\144\155\151\156\137\x70\x68\157\x6e\145", $rF);
        $V3 = new CustomerSaml();
        $cq = json_decode($V3->send_otp_token('', $rF, $this, FALSE, TRUE), true);
        if (strcasecmp($cq["\x73\x74\141\164\x75\163"], "\123\x55\x43\103\105\x53\123") == 0) {
            goto hv;
        }
        update_option("\x6d\x6f\137\163\x61\x6d\154\x5f\x6d\145\x73\163\141\147\145", "\x54\150\x65\162\x65\x20\x77\141\163\x20\141\156\40\x65\x72\x72\157\162\40\151\156\40\163\145\156\144\x69\156\147\x20\x53\x4d\123\x2e\40\120\x6c\x65\x61\x73\145\x20\143\x6c\x69\143\153\x20\157\156\40\x52\145\163\x65\x6e\x64\40\x4f\x54\120\x20\x74\x6f\x20\164\x72\x79\40\x61\x67\141\151\x6e\56");
        update_option("\x6d\157\x5f\x73\x61\x6d\154\x5f\162\145\x67\151\163\164\x72\141\x74\x69\x6f\x6e\x5f\x73\x74\x61\164\165\x73", "\115\x4f\x5f\117\124\x50\137\x44\105\x4c\111\126\x45\x52\x45\x44\x5f\106\101\111\x4c\125\x52\105\137\120\110\117\x4e\x45");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto UM;
        hv:
        update_option("\155\x6f\x5f\163\x61\155\154\x5f\155\145\163\x73\141\x67\145", "\x20\101\40\x6f\x6e\145\40\x74\151\155\x65\40\160\x61\163\163\143\157\x64\x65\40\x69\163\x20\163\145\x6e\x74\x20\x74\157\x20" . get_option("\155\157\137\x73\x61\155\154\x5f\x61\144\x6d\151\156\x5f\x70\x68\157\x6e\x65") . "\56\40\x50\x6c\145\x61\163\x65\x20\x65\156\164\x65\x72\40\x74\150\145\40\x6f\x74\x70\x20\150\145\x72\x65\40\x74\x6f\x20\166\x65\x72\151\146\171\x20\x79\x6f\x75\x72\x20\145\x6d\141\151\154\56");
        update_option("\155\157\x5f\163\x61\x6d\154\137\x74\x72\x61\x6e\x73\141\x63\164\151\x6f\x6e\111\144", $cq["\164\x78\111\144"]);
        update_option("\155\x6f\137\163\141\155\x6c\137\162\x65\x67\x69\163\164\162\141\x74\x69\157\156\x5f\163\164\x61\164\x75\x73", "\x4d\117\137\x4f\124\120\137\x44\105\114\x49\126\x45\122\105\x44\x5f\x53\125\103\x43\x45\x53\x53\x5f\120\110\117\x4e\105");
        SAMLSPUtilities::mo_saml_show_success_message();
        UM:
        gX:
        goto Z5;
        sR:
        $this->mo_sso_saml_deactivate();
        Mo_License_Service::reset_license_values();
        add_option("\155\x6f\137\163\141\x6d\154\x5f\162\x65\147\151\x73\164\x72\141\x74\151\157\156\x5f\x73\x74\x61\x74\165\163", "\x72\145\155\x6f\166\145\144\137\141\143\x63\x6f\165\x6e\164");
        $ow = add_query_arg(array("\164\x61\x62" => "\154\x6f\147\x69\156"), $_SERVER["\x52\105\x51\125\x45\123\x54\x5f\125\x52\x49"]);
        header("\114\x6f\143\141\x74\151\x6f\x6e\x3a\x20" . $ow);
        Z5:
        if (self::mo_check_option_admin_referer("\x6d\x6f\137\163\141\155\x6c\x5f\x76\145\x72\151\146\171\137\x63\x75\x73\x74\x6f\x6d\145\162")) {
            goto AM;
        }
        if (self::mo_check_option_admin_referer("\155\x6f\x5f\163\x61\x6d\154\x5f\x63\x6f\x6e\164\141\x63\164\x5f\x75\x73\x5f\x71\x75\145\162\171\137\x6f\x70\164\151\157\156")) {
            goto uW;
        }
        if (self::mo_check_option_admin_referer("\155\x6f\x5f\x73\141\x6d\x6c\x5f\x72\145\x73\x65\156\x64\137\157\x74\x70\137\x65\x6d\141\151\154")) {
            goto ck;
        }
        if (!empty($_POST["\x6f\x70\164\151\157\156"]) and $_POST["\157\160\x74\151\157\x6e"] == "\155\x6f\x5f\x73\x61\155\x6c\x5f\x72\x65\163\145\156\144\137\x6f\x74\x70\x5f\x70\x68\x6f\156\x65") {
            goto sV;
        }
        if (self::mo_check_option_admin_referer("\155\157\x5f\163\141\x6d\x6c\137\x67\x6f\137\142\141\x63\153")) {
            goto VM;
        }
        if (self::mo_check_option_admin_referer("\x6d\x6f\x5f\x73\x61\x6d\x6c\137\162\x65\x67\x69\163\164\x65\162\137\x63\165\x73\164\157\x6d\145\162")) {
            goto ZS;
        }
        if (self::mo_check_option_admin_referer("\155\x6f\x5f\163\141\155\154\x5f\144\x65\x66\141\165\x6c\164\137\x69\144\x70")) {
            goto qZ;
        }
        goto Zi;
        ZS:
        if (mo_saml_is_extension_installed("\143\165\x72\x6c")) {
            goto Te;
        }
        update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\x6d\145\x73\x73\141\147\145", "\105\122\122\117\122\72\x20\74\141\x20\x68\162\145\x66\75\42\150\x74\x74\x70\72\x2f\x2f\x70\x68\160\x2e\x6e\145\x74\x2f\x6d\x61\156\x75\141\x6c\57\x65\156\x2f\x63\165\x72\154\x2e\151\156\163\x74\x61\x6c\154\x61\164\x69\x6f\156\x2e\160\150\x70\x22\40\164\141\162\x67\x65\x74\75\x22\x5f\x62\x6c\x61\156\153\x22\x3e\x50\x48\120\40\143\125\122\114\40\x65\x78\164\145\x6e\163\x69\157\156\x3c\x2f\141\x3e\x20\151\163\x20\x6e\157\164\x20\151\x6e\163\x74\141\154\154\145\x64\40\x6f\x72\40\x64\151\x73\x61\x62\x6c\x65\144\56\40\122\145\147\x69\x73\x74\x72\x61\x74\151\x6f\x6e\40\x66\141\151\x6c\x65\x64\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Te:
        $Ha = '';
        $rF = '';
        $Y3 = '';
        $D2 = '';
        if (empty($_POST["\145\x6d\x61\x69\x6c"]) || empty($_POST["\x70\x61\x73\163\x77\x6f\162\x64"]) || empty($_POST["\x63\x6f\x6e\146\151\x72\x6d\120\141\163\x73\167\157\x72\144"])) {
            goto Zs;
        }
        if (strlen($_POST["\x70\x61\163\x73\x77\x6f\x72\x64"]) < 6 || strlen($_POST["\143\x6f\156\146\x69\162\155\120\x61\x73\x73\167\x6f\x72\x64"]) < 6) {
            goto vh;
        }
        if ($this->checkPasswordPattern(strip_tags($_POST["\160\141\x73\163\x77\157\x72\144"]))) {
            goto wP;
        }
        $Ha = sanitize_email($_POST["\145\x6d\x61\151\154"]);
        $rF = sanitize_text_field($_POST["\x70\150\x6f\x6e\x65"]);
        $Y3 = stripslashes(strip_tags($_POST["\160\141\163\163\167\157\x72\144"]));
        $D2 = stripslashes(strip_tags($_POST["\143\x6f\156\146\151\162\155\x50\x61\x73\163\167\x6f\x72\x64"]));
        goto Xd;
        wP:
        update_option("\x6d\157\137\x73\141\x6d\x6c\137\155\x65\163\163\141\x67\145", "\115\151\x6e\x69\155\x75\x6d\40\66\40\x63\150\141\x72\141\x63\164\145\162\163\40\x73\x68\x6f\165\x6c\144\40\x62\145\x20\160\162\x65\x73\145\x6e\x74\x2e\x20\x4d\141\x78\x69\x6d\x75\155\x20\61\65\40\x63\x68\x61\x72\x61\143\164\x65\x72\x73\x20\x73\x68\157\x75\154\x64\40\x62\145\40\x70\x72\145\163\x65\156\x74\x2e\x20\117\x6e\154\171\x20\x66\157\x6c\x6c\157\x77\151\156\x67\40\163\171\x6d\x62\157\x6c\x73\40\x28\x21\x40\43\56\44\45\x5e\x26\x2a\55\137\x29\40\x73\x68\x6f\165\x6c\144\x20\142\x65\40\160\x72\145\x73\145\x6e\x74\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Xd:
        goto AW;
        vh:
        update_option("\155\157\137\163\x61\x6d\x6c\x5f\155\x65\163\x73\x61\147\x65", "\x43\150\x6f\x6f\x73\x65\x20\141\40\x70\141\163\163\167\x6f\162\x64\40\x77\151\x74\150\x20\155\151\156\x69\155\165\x6d\x20\154\145\x6e\147\x74\x68\40\x36\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        AW:
        goto rL;
        Zs:
        update_option("\155\x6f\137\163\x61\155\x6c\137\x6d\145\163\x73\x61\x67\x65", "\x41\x6c\154\40\164\150\x65\40\146\x69\x65\x6c\144\x73\x20\x61\x72\x65\40\x72\145\161\165\151\162\145\x64\56\x20\x50\x6c\x65\x61\x73\x65\40\x65\156\x74\145\162\40\166\x61\x6c\151\144\x20\x65\156\x74\x72\151\145\163\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        rL:
        update_option("\x6d\157\x5f\163\141\x6d\154\137\x61\144\x6d\151\156\137\145\155\x61\x69\x6c", $Ha);
        update_option("\155\157\137\163\141\x6d\154\x5f\141\x64\155\x69\x6e\137\160\x68\x6f\x6e\x65", $rF);
        if (strcmp($Y3, $D2) == 0) {
            goto WQ;
        }
        update_option("\x6d\x6f\x5f\x73\141\x6d\x6c\137\x6d\x65\x73\163\x61\x67\145", "\120\x61\163\x73\x77\x6f\162\144\163\40\x64\157\x20\156\157\164\x20\x6d\x61\x74\x63\x68\x2e");
        delete_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\137\x76\x65\x72\x69\146\171\137\x63\x75\163\x74\x6f\155\145\x72");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto ov;
        WQ:
        update_option("\155\157\137\163\x61\155\154\x5f\x61\x64\155\x69\156\x5f\160\x61\163\163\167\x6f\x72\x64", $Y3);
        $Ha = get_option("\155\157\137\x73\x61\155\154\x5f\141\x64\x6d\x69\156\137\145\x6d\141\x69\x6c");
        $V3 = new CustomerSaml();
        $fj = $V3->check_customer($this);
        if ($fj) {
            goto Lm;
        }
        return;
        Lm:
        $cq = json_decode($fj, true);
        if (strcasecmp($cq["\x73\x74\141\x74\165\x73"], "\103\125\x53\x54\117\115\105\x52\x5f\x4e\x4f\124\x5f\x46\x4f\x55\116\x44") == 0) {
            goto U8;
        }
        $this->get_current_customer();
        goto Gj;
        U8:
        $cq = json_decode($V3->send_otp_token($Ha, '', $this, TRUE, FALSE), true);
        if (strcasecmp($cq["\x73\x74\x61\164\x75\x73"], "\x53\125\103\103\105\123\123") == 0) {
            goto uL;
        }
        update_option("\x6d\x6f\137\x73\141\155\154\x5f\155\145\163\163\x61\147\x65", "\124\x68\x65\x72\145\40\x77\x61\x73\40\141\x6e\40\x65\162\162\157\x72\x20\x69\156\40\x73\x65\x6e\x64\151\156\147\x20\x65\155\141\151\x6c\x2e\40\x50\154\145\141\x73\x65\x20\166\x65\162\151\146\x79\x20\x79\x6f\165\162\x20\145\155\x61\151\x6c\40\x61\156\x64\40\164\x72\171\40\x61\x67\141\151\156\56");
        update_option("\x6d\157\x5f\x73\x61\x6d\154\137\162\145\147\x69\163\x74\162\141\x74\x69\x6f\156\137\x73\x74\141\x74\165\163", "\x4d\x4f\x5f\x4f\124\120\137\x44\x45\114\111\x56\105\122\105\x44\137\x46\x41\x49\x4c\125\122\x45\x5f\105\x4d\x41\111\114");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto iw;
        uL:
        update_option("\x6d\x6f\x5f\163\141\x6d\154\137\155\145\x73\x73\141\147\x65", "\x20\x41\40\x6f\x6e\x65\40\x74\151\155\x65\40\x70\141\x73\x73\143\x6f\x64\x65\40\x69\x73\40\x73\145\x6e\164\40\x74\157\x20" . get_option("\155\157\137\163\x61\155\154\137\x61\144\155\x69\156\137\x65\155\141\151\x6c") . "\x2e\40\x50\x6c\x65\x61\x73\x65\x20\145\x6e\164\x65\162\x20\x74\x68\x65\40\x6f\164\x70\x20\150\x65\x72\145\40\164\x6f\40\166\x65\162\x69\x66\171\x20\171\157\x75\x72\x20\x65\x6d\141\151\x6c\56");
        update_option("\x6d\157\137\x73\141\155\154\x5f\x74\x72\x61\156\163\x61\143\x74\x69\x6f\x6e\111\144", $cq["\164\170\111\x64"]);
        update_option("\x6d\157\x5f\163\x61\x6d\154\137\162\x65\147\151\x73\x74\162\x61\x74\x69\157\156\x5f\x73\x74\141\x74\x75\163", "\115\x4f\137\117\124\120\x5f\104\x45\x4c\x49\126\105\122\105\x44\x5f\123\x55\x43\103\x45\x53\x53\x5f\105\115\101\111\114");
        SAMLSPUtilities::mo_saml_show_success_message();
        iw:
        Gj:
        ov:
        goto Zi;
        qZ:
        $tX = sanitize_text_field($_POST["\x69\144\x70\137\x6e\x61\x6d\x65"]);
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\x6c\x5f\151\x64\145\x6e\164\151\164\171\137\160\x72\157\166\x69\144\x65\162\x73", true);
        if ($Qm[$tX]["\145\156\141\x62\154\145\x5f\x69\x64\x70"]) {
            goto sr;
        }
        update_option("\x6d\x6f\x5f\x73\141\x6d\154\137\x6d\145\x73\x73\141\x67\x65", "\120\154\x65\141\163\145\x20\x45\x6e\x61\x62\x6c\x65\x20\x74\150\x65\40\x49\104\120\x20\x74\x6f\40\155\141\153\x65\40\x69\x74\40\x44\x65\146\141\165\x6c\x74\40\111\104\x50\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto DB;
        sr:
        $vN->mo_save_environment_settings("\x73\141\x6d\x6c\137\144\x65\x66\x61\165\x6c\164\137\151\144\160", $tX);
        DB:
        Zi:
        goto Jf;
        VM:
        update_option("\155\157\x5f\x73\x61\155\x6c\137\162\x65\147\x69\163\x74\x72\141\164\151\157\x6e\x5f\163\x74\141\164\x75\x73", '');
        update_option("\x6d\157\137\x73\141\155\x6c\137\166\x65\162\151\x66\171\x5f\143\165\163\164\x6f\x6d\x65\162", '');
        delete_option("\x6d\x6f\x5f\163\141\x6d\x6c\137\156\x65\167\x5f\162\145\147\x69\x73\164\x72\x61\x74\x69\x6f\156");
        delete_option("\x6d\157\x5f\163\141\x6d\x6c\x5f\141\144\155\x69\x6e\137\x65\155\x61\x69\x6c");
        delete_option("\x6d\x6f\137\163\x61\155\x6c\x5f\141\144\155\x69\156\x5f\x70\x68\157\156\145");
        Jf:
        goto pP;
        sV:
        if (mo_saml_is_extension_installed("\x63\x75\162\154")) {
            goto e3;
        }
        update_option("\155\x6f\137\163\x61\x6d\x6c\x5f\155\145\163\x73\141\x67\145", "\x45\x52\x52\117\x52\72\x20\x3c\x61\x20\150\162\x65\x66\x3d\42\x68\164\164\x70\72\57\x2f\160\x68\x70\x2e\x6e\x65\x74\57\155\x61\156\165\x61\154\x2f\x65\156\x2f\x63\165\162\x6c\x2e\x69\x6e\163\x74\141\x6c\154\141\164\x69\x6f\156\x2e\160\150\160\42\40\164\x61\x72\x67\x65\x74\x3d\x22\x5f\142\154\x61\x6e\x6b\x22\76\120\110\120\x20\x63\x55\x52\x4c\40\x65\x78\164\145\156\163\151\x6f\x6e\74\57\x61\76\40\151\x73\x20\x6e\157\164\40\151\x6e\163\x74\141\x6c\x6c\145\x64\x20\157\x72\40\x64\151\163\141\142\154\x65\144\56\40\x52\x65\x73\145\156\x64\x20\x4f\124\x50\40\x66\141\151\154\x65\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        e3:
        $rF = get_option("\x6d\157\137\163\141\155\x6c\137\x61\144\155\x69\x6e\137\160\x68\157\156\x65");
        $V3 = new CustomerSaml();
        $cq = json_decode($V3->send_otp_token('', $rF, $this, FALSE, TRUE), true);
        if (strcasecmp($cq["\x73\164\x61\x74\165\x73"], "\x53\x55\103\103\x45\123\x53") == 0) {
            goto Q8;
        }
        update_option("\155\x6f\x5f\x73\141\x6d\154\x5f\155\145\x73\x73\x61\147\145", "\x54\150\145\162\x65\40\167\x61\163\x20\141\156\x20\145\162\162\157\x72\40\151\156\40\163\145\x6e\144\151\156\x67\x20\145\155\x61\151\x6c\56\40\x50\154\145\141\x73\145\40\143\154\x69\143\153\x20\157\156\x20\122\x65\163\145\x6e\144\40\x4f\124\x50\x20\164\x6f\x20\164\x72\171\x20\141\147\x61\x69\x6e\x2e");
        update_option("\155\157\137\x73\x61\x6d\x6c\137\x72\x65\x67\x69\163\164\162\141\x74\151\157\x6e\137\x73\x74\141\164\165\x73", "\115\x4f\x5f\x4f\x54\120\137\x44\x45\x4c\111\x56\x45\x52\105\x44\137\106\x41\111\x4c\125\122\105\x5f\120\110\117\x4e\x45");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto Gi;
        Q8:
        update_option("\x6d\x6f\137\163\141\x6d\x6c\x5f\x6d\x65\163\163\141\x67\145", "\40\101\40\157\156\145\40\x74\x69\155\145\x20\160\x61\x73\x73\143\157\x64\x65\40\151\x73\x20\163\145\x6e\164\40\x74\157\x20" . $rF . "\40\x61\147\141\151\156\56\x20\120\x6c\x65\x61\163\x65\x20\x63\x68\145\143\153\x20\x69\x66\x20\171\157\165\x20\147\157\164\40\164\x68\x65\40\157\x74\160\x20\x61\x6e\144\x20\145\x6e\x74\145\162\x20\x69\x74\40\150\x65\x72\x65\56");
        update_option("\155\157\137\163\141\155\154\x5f\164\162\x61\x6e\x73\141\143\164\x69\157\156\x49\x64", $cq["\164\x78\111\144"]);
        update_option("\155\x6f\137\x73\141\x6d\x6c\x5f\x72\145\147\x69\x73\164\162\x61\x74\151\157\156\137\163\164\141\164\x75\x73", "\x4d\x4f\137\117\x54\120\137\104\105\x4c\x49\x56\105\122\105\104\x5f\123\125\x43\103\105\123\x53\x5f\x50\110\117\x4e\105");
        SAMLSPUtilities::mo_saml_show_success_message();
        Gi:
        pP:
        goto TS;
        ck:
        if (mo_saml_is_extension_installed("\143\165\162\x6c")) {
            goto t2;
        }
        update_option("\x6d\157\137\163\141\155\154\x5f\155\x65\x73\163\x61\147\145", "\x45\122\x52\117\122\72\x20\x3c\x61\40\150\162\x65\x66\x3d\x22\150\x74\164\x70\x3a\57\57\x70\150\160\56\156\x65\x74\57\x6d\x61\x6e\x75\141\x6c\x2f\145\156\x2f\143\165\x72\x6c\56\151\x6e\163\164\x61\154\x6c\141\164\x69\157\x6e\56\x70\150\x70\x22\40\x74\141\162\x67\x65\164\x3d\x22\x5f\142\x6c\x61\x6e\153\x22\x3e\x50\110\120\x20\x63\x55\x52\x4c\40\x65\170\x74\145\x6e\163\151\x6f\156\x3c\x2f\x61\x3e\40\151\163\40\x6e\157\164\40\151\156\x73\x74\x61\x6c\154\x65\144\40\x6f\162\x20\144\151\x73\x61\142\154\145\144\56\x20\x52\145\x73\145\x6e\x64\x20\117\x54\120\x20\x66\141\x69\154\145\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        t2:
        $Ha = get_option("\x6d\157\137\163\141\155\154\x5f\x61\x64\x6d\x69\156\137\145\155\x61\151\154");
        $V3 = new CustomerSaml();
        $cq = json_decode($V3->send_otp_token($Ha, '', $this, TRUE, FALSE), true);
        if (strcasecmp($cq["\x73\164\x61\x74\165\x73"], "\x53\125\x43\x43\x45\x53\x53") == 0) {
            goto uR;
        }
        update_option("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\x6d\145\163\x73\141\147\145", "\x54\x68\x65\162\x65\40\167\x61\163\x20\141\156\x20\145\162\162\x6f\162\x20\x69\x6e\x20\x73\x65\156\x64\151\156\x67\x20\x65\x6d\x61\x69\x6c\x2e\x20\x50\154\145\141\x73\x65\x20\143\x6c\151\143\153\40\x6f\x6e\x20\122\x65\x73\x65\156\x64\x20\x4f\x54\120\x20\164\x6f\40\x74\x72\171\40\x61\147\141\x69\156\56");
        update_option("\x6d\157\x5f\163\x61\x6d\154\137\x72\x65\x67\151\163\164\162\141\164\x69\157\x6e\137\x73\x74\141\164\165\x73", "\115\117\137\117\x54\120\137\104\105\x4c\x49\126\x45\x52\105\x44\137\106\101\111\x4c\x55\x52\105\137\105\x4d\101\111\x4c");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto zU;
        uR:
        update_option("\x6d\x6f\x5f\163\141\155\x6c\137\155\x65\x73\163\x61\x67\145", "\x20\101\x20\157\x6e\145\40\164\151\155\x65\x20\160\x61\x73\163\143\157\144\x65\40\151\x73\40\163\145\x6e\164\40\164\x6f\40" . get_option("\x6d\x6f\137\x73\x61\155\x6c\137\141\144\155\151\156\137\x65\155\141\151\x6c") . "\40\x61\147\x61\x69\x6e\56\x20\120\x6c\x65\141\x73\x65\40\x63\150\145\143\153\x20\x69\x66\x20\x79\157\x75\x20\147\x6f\x74\40\x74\x68\145\40\x6f\x74\160\40\x61\156\x64\40\x65\156\x74\145\x72\40\151\x74\40\x68\x65\162\x65\x2e");
        update_option("\155\x6f\137\163\x61\155\154\x5f\164\x72\141\x6e\163\141\x63\164\151\157\156\111\x64", $cq["\x74\170\x49\x64"]);
        update_option("\x6d\157\137\163\141\155\154\137\162\x65\147\151\163\x74\162\141\x74\x69\157\156\137\x73\164\x61\x74\x75\163", "\115\117\x5f\117\x54\120\x5f\x44\105\114\x49\x56\x45\122\x45\104\x5f\123\125\103\103\x45\123\123\x5f\x45\115\x41\x49\114");
        SAMLSPUtilities::mo_saml_show_success_message();
        zU:
        TS:
        goto tl;
        uW:
        if (mo_saml_is_extension_installed("\143\165\162\154")) {
            goto op;
        }
        update_option("\155\x6f\137\163\141\155\154\x5f\155\145\x73\x73\x61\147\145", "\105\122\122\x4f\x52\x3a\x20\74\141\40\x68\x72\145\x66\x3d\42\x68\164\x74\x70\72\x2f\x2f\x70\150\x70\56\156\145\x74\x2f\155\141\x6e\165\x61\154\x2f\145\x6e\57\x63\165\x72\154\x2e\151\156\163\x74\141\x6c\x6c\x61\164\151\157\156\56\x70\150\x70\x22\40\x74\x61\x72\147\145\x74\75\42\137\142\154\141\x6e\153\42\76\120\x48\x50\40\x63\x55\x52\x4c\40\145\x78\x74\145\156\x73\151\157\156\x3c\57\x61\x3e\x20\x69\x73\x20\x6e\157\164\x20\151\x6e\163\164\x61\x6c\x6c\145\x64\40\157\162\x20\x64\x69\163\141\142\x6c\145\x64\56\x20\x51\165\x65\x72\171\x20\x73\x75\x62\x6d\151\164\x20\x66\x61\151\x6c\145\x64\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        op:
        $Ha = $_POST["\155\x6f\x5f\163\x61\x6d\154\137\143\157\156\x74\141\143\164\x5f\x75\163\x5f\145\155\141\151\154"];
        $rF = $_POST["\155\157\x5f\163\x61\155\154\x5f\143\x6f\156\164\141\143\x74\x5f\x75\163\137\160\150\x6f\156\x65"];
        $Qq = trim($_POST["\x6d\157\137\163\x61\155\154\137\143\157\x6e\x74\141\x63\164\137\165\163\x5f\x71\165\x65\162\x79"]);
        if (!empty($_POST["\x73\x65\156\x64\137\160\154\x75\147\x69\156\137\x63\157\x6e\146\x69\147"])) {
            goto uI;
        }
        update_option("\163\x65\156\x64\x5f\x70\154\165\147\151\x6e\137\x63\157\156\146\151\x67", "\157\x66\146");
        goto Cf;
        uI:
        $Sv = miniorange_import_export(true, true);
        $Qq .= $Sv;
        update_option("\x73\x65\156\x64\x5f\x70\154\x75\147\151\x6e\x5f\x63\157\156\x66\x69\147", "\157\x6e");
        Cf:
        $V3 = new CustomerSaml();
        if (empty($Ha) || empty($Qq) || !filter_var($Ha, FILTER_VALIDATE_EMAIL)) {
            goto Mz;
        }
        $v9 = $V3->submit_contact_us($Ha, $rF, $Qq, $this);
        if ($v9 == false) {
            goto iK;
        }
        update_option("\x6d\157\137\x73\x61\155\x6c\x5f\155\x65\x73\x73\141\147\x65", "\x54\150\141\x6e\x6b\x73\x20\x66\157\162\x20\147\145\x74\164\151\x6e\x67\40\151\x6e\x20\164\x6f\x75\143\x68\41\40\x57\x65\40\x73\150\141\x6c\154\40\147\x65\x74\x20\x62\x61\x63\153\40\164\x6f\40\x79\157\x75\40\163\150\x6f\162\x74\x6c\x79\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        goto bd;
        iK:
        update_option("\155\157\137\x73\141\155\154\x5f\x6d\145\163\x73\x61\x67\145", "\131\x6f\165\162\x20\161\165\145\162\171\40\x63\x6f\165\154\144\x20\156\157\x74\x20\142\145\x20\163\165\142\x6d\x69\x74\x74\145\144\x2e\x20\120\x6c\x65\x61\x73\x65\x20\x74\162\x79\x20\141\147\x61\151\156\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        bd:
        goto g_;
        Mz:
        update_option("\155\x6f\137\x73\141\155\x6c\137\x6d\145\163\163\x61\147\x65", "\120\x6c\145\x61\163\x65\40\x66\151\x6c\154\40\x75\x70\40\105\155\141\151\154\40\x61\156\x64\x20\121\x75\x65\162\x79\40\146\151\x65\154\x64\163\40\x74\157\x20\x73\x75\142\155\x69\164\40\171\157\165\x72\x20\161\x75\x65\162\x79\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        g_:
        tl:
        goto EC;
        AM:
        if (mo_saml_is_extension_installed("\x63\x75\x72\154")) {
            goto Nl;
        }
        update_option("\x6d\x6f\137\163\x61\155\x6c\x5f\x6d\145\163\163\x61\147\145", "\105\x52\x52\117\x52\x3a\x20\74\x61\x20\x68\162\145\146\75\x22\x68\164\164\x70\x3a\57\57\x70\150\160\x2e\x6e\145\164\x2f\x6d\x61\156\165\x61\x6c\x2f\145\156\x2f\143\165\162\154\x2e\151\x6e\163\164\x61\x6c\154\x61\164\x69\157\156\x2e\160\150\x70\42\x20\164\x61\162\x67\145\x74\75\x22\137\142\154\x61\x6e\153\x22\76\120\110\120\x20\143\x55\122\114\40\145\170\x74\x65\156\163\151\x6f\156\x3c\x2f\x61\76\40\151\x73\x20\156\x6f\164\40\x69\156\x73\x74\141\x6c\154\145\x64\40\157\162\40\x64\x69\163\141\x62\x6c\x65\144\56\x20\x4c\157\x67\151\156\x20\x66\x61\x69\x6c\x65\144\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Nl:
        $Ha = '';
        $Y3 = '';
        if (empty($_POST["\145\155\x61\x69\154"]) || empty($_POST["\x70\x61\163\163\167\x6f\x72\x64"])) {
            goto mS;
        }
        if ($this->checkPasswordPattern(strip_tags($_POST["\x70\x61\x73\163\167\x6f\x72\144"]))) {
            goto bi;
        }
        $Ha = sanitize_email($_POST["\x65\x6d\141\151\154"]);
        $Y3 = stripslashes(strip_tags($_POST["\x70\x61\163\x73\x77\157\162\x64"]));
        goto yH;
        bi:
        update_option("\155\x6f\x5f\163\141\155\x6c\x5f\155\x65\163\163\141\147\145", "\x4d\151\x6e\151\155\x75\x6d\x20\66\40\x63\x68\x61\x72\x61\x63\164\145\162\163\40\163\x68\157\x75\x6c\144\40\142\x65\x20\x70\x72\145\x73\x65\x6e\x74\56\40\115\141\170\x69\155\165\x6d\40\61\65\40\x63\150\x61\162\x61\x63\x74\145\162\163\40\x73\150\x6f\x75\x6c\x64\40\x62\145\x20\x70\162\145\163\145\x6e\164\56\40\117\156\154\x79\40\146\x6f\x6c\x6c\157\x77\x69\x6e\147\x20\x73\171\155\142\157\154\163\x20\50\41\100\43\56\44\45\x5e\x26\52\x2d\x5f\x29\40\x73\150\x6f\165\x6c\x64\x20\x62\x65\x20\160\162\145\163\145\156\x74\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        yH:
        goto WG;
        mS:
        update_option("\155\157\x5f\163\x61\x6d\x6c\x5f\x6d\x65\163\x73\141\147\145", "\x41\x6c\154\40\164\x68\x65\40\x66\151\145\154\144\x73\x20\x61\x72\x65\40\162\145\x71\165\x69\162\145\x64\56\40\120\x6c\145\141\163\145\x20\145\156\x74\145\162\x20\166\x61\154\151\144\x20\x65\x6e\164\162\x69\x65\163\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        WG:
        update_option("\x6d\157\x5f\163\141\x6d\154\x5f\x61\144\x6d\151\156\137\145\155\x61\151\x6c", $Ha);
        update_option("\155\157\137\163\141\155\154\137\x61\144\155\x69\x6e\137\160\x61\163\x73\167\x6f\162\x64", $Y3);
        $V3 = new Customersaml();
        $cq = $V3->get_customer_key($this);
        if ($cq) {
            goto Y1;
        }
        return;
        Y1:
        $gJ = json_decode($cq, true);
        if (json_last_error() == JSON_ERROR_NONE) {
            goto zu;
        }
        update_option("\155\x6f\x5f\x73\x61\x6d\x6c\x5f\x6d\145\163\163\x61\x67\x65", "\x49\156\x76\141\154\x69\x64\40\165\x73\x65\x72\x6e\x61\155\x65\x20\157\x72\x20\160\x61\x73\163\x77\x6f\x72\x64\x2e\40\120\154\145\x61\163\x65\40\x74\162\171\x20\x61\147\x61\x69\x6e\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto ib;
        zu:
        update_option("\x6d\157\x5f\163\141\155\x6c\x5f\141\x64\155\151\x6e\137\x63\x75\x73\164\157\x6d\x65\x72\137\x6b\145\171", $gJ["\151\144"]);
        update_option("\x6d\157\x5f\163\x61\x6d\154\137\141\x64\x6d\x69\x6e\x5f\x61\x70\151\x5f\x6b\145\x79", $gJ["\141\x70\x69\113\x65\x79"]);
        update_option("\x6d\x6f\x5f\x73\141\155\154\137\x63\165\x73\164\x6f\155\x65\x72\137\x74\157\x6b\x65\x6e", $gJ["\x74\x6f\153\x65\156"]);
        if (empty($gJ["\160\x68\157\x6e\x65"])) {
            goto zf;
        }
        update_option("\x6d\157\137\163\141\155\x6c\x5f\141\x64\x6d\151\156\x5f\x70\x68\x6f\x6e\x65", $gJ["\160\x68\157\x6e\x65"]);
        zf:
        update_option("\x6d\x6f\x5f\x73\141\x6d\154\x5f\141\144\155\x69\x6e\x5f\160\x61\163\x73\x77\157\162\144", '');
        update_option("\155\x6f\x5f\163\141\x6d\x6c\x5f\155\x65\163\x73\x61\x67\145", "\x43\165\x73\x74\x6f\x6d\x65\x72\40\162\x65\x74\162\x69\145\166\x65\144\x20\163\165\x63\x63\145\163\163\x66\165\154\x6c\x79");
        update_option("\x6d\x6f\x5f\163\141\155\x6c\x5f\x72\145\147\151\163\x74\162\x61\164\151\157\x6e\x5f\163\164\x61\x74\165\x73", "\105\170\151\163\164\x69\x6e\x67\40\x55\163\x65\162");
        delete_option("\x6d\157\x5f\163\x61\155\x6c\137\166\145\162\151\x66\171\137\143\165\x73\164\x6f\155\145\x72");
        if (get_option("\163\x6d\154\x5f\x6c\153")) {
            goto O1;
        }
        SAMLSPUtilities::mo_saml_show_success_message();
        goto pQ;
        O1:
        $ni = get_option("\x6d\x6f\x5f\163\141\155\154\x5f\143\x75\163\x74\x6f\x6d\x65\x72\137\164\157\x6b\145\156");
        $Il = AESEncryption::decrypt_data(get_option("\x73\x6d\x6c\137\154\153"), $ni);
        $cq = json_decode($V3->mo_saml_verify_license($Il, $this), true);
        if (strcasecmp($cq["\163\164\141\164\x75\x73"], "\123\125\x43\x43\105\x53\x53") == 0) {
            goto Rs;
        }
        update_option("\x6d\x6f\x5f\163\141\155\154\137\155\145\163\x73\141\147\x65", "\114\151\x63\x65\x6e\x73\x65\x20\x6b\145\x79\x20\x66\x6f\162\x20\x74\x68\151\x73\40\151\156\163\164\141\x6e\143\x65\x20\151\x73\40\x69\156\143\157\x72\162\145\x63\164\56\40\115\x61\153\x65\40\x73\x75\162\145\x20\171\157\165\40\x68\x61\166\x65\40\156\x6f\x74\x20\164\x61\155\x70\x65\162\x65\x64\40\x77\151\x74\x68\40\x69\164\40\141\x74\x20\141\154\154\x2e\x20\x50\x6c\145\141\163\145\40\145\156\164\x65\162\40\x61\x20\x76\141\154\151\144\x20\154\151\143\145\156\x73\x65\x20\153\x65\171\56");
        delete_option("\163\155\154\137\x6c\153");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto ly;
        Rs:
        SAMLSPUtilities::mo_saml_show_success_message();
        ly:
        pQ:
        ib:
        update_option("\155\x6f\x5f\x73\x61\155\154\137\x61\x64\155\151\156\x5f\160\x61\x73\163\167\157\162\x64", '');
        EC:
        if (!self::mo_check_option_admin_referer("\155\157\x5f\x73\x61\155\154\x5f\x76\x61\154\151\144\141\x74\145\137\x6f\164\160")) {
            goto N8;
        }
        if (mo_saml_is_extension_installed("\143\165\162\x6c")) {
            goto qw;
        }
        update_option("\155\157\x5f\163\x61\155\x6c\137\x6d\x65\x73\x73\x61\x67\145", "\105\x52\x52\117\122\72\40\74\141\40\150\x72\145\x66\75\x22\x68\164\x74\x70\72\x2f\57\160\x68\160\x2e\156\x65\x74\57\155\x61\156\x75\x61\x6c\57\145\156\x2f\143\x75\x72\154\x2e\x69\156\x73\164\x61\154\154\141\164\151\x6f\x6e\x2e\x70\150\x70\42\40\x74\x61\162\147\x65\x74\75\42\x5f\142\154\x61\156\x6b\x22\76\x50\x48\x50\40\143\125\x52\x4c\40\145\170\x74\145\x6e\x73\151\x6f\156\74\x2f\141\x3e\40\x69\163\x20\156\x6f\x74\40\x69\156\163\x74\141\x6c\154\145\x64\40\157\162\x20\x64\x69\x73\141\x62\x6c\x65\144\x2e\x20\x56\141\x6c\151\x64\x61\164\x65\40\117\124\x50\40\146\x61\x69\x6c\145\x64\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        qw:
        $pl = '';
        if (empty($_POST["\157\x74\160\x5f\x74\157\153\x65\x6e"])) {
            goto A7;
        }
        $pl = sanitize_text_field($_POST["\x6f\164\160\137\x74\157\153\x65\156"]);
        goto MN;
        A7:
        update_option("\x6d\x6f\137\163\141\155\154\x5f\x6d\x65\163\x73\141\147\145", "\120\x6c\145\141\163\145\40\x65\156\x74\145\162\x20\141\40\166\x61\154\x75\x65\x20\x69\156\x20\157\164\160\x20\x66\x69\145\154\144\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        MN:
        $V3 = new CustomerSaml();
        $cq = json_decode($V3->validate_otp_token(get_option("\x6d\157\x5f\163\x61\x6d\154\137\164\x72\x61\x6e\x73\x61\x63\x74\151\157\156\x49\144"), $pl, $this), true);
        if (strcasecmp($cq["\163\x74\141\164\x75\163"], "\123\125\x43\x43\x45\x53\x53") == 0) {
            goto OY;
        }
        update_option("\x6d\x6f\x5f\163\x61\x6d\154\x5f\x6d\x65\163\163\141\x67\x65", "\111\x6e\x76\x61\154\x69\144\40\157\156\145\40\x74\x69\155\145\40\x70\x61\x73\163\x63\x6f\144\x65\56\40\x50\154\x65\x61\x73\x65\x20\x65\156\x74\145\162\x20\141\x20\166\141\x6c\151\x64\40\157\x74\x70\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto zJ;
        OY:
        $this->create_customer();
        zJ:
        N8:
        cH:
    }
    function mo_saml_save_federation_parameters()
    {
        $o4 = array();
        $eO = array();
        $cM = array();
        $j7 = array();
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\137\x73\141\155\154\137\163\160\137\x62\x61\163\145\x5f\165\162\x6c");
        if (!empty($bg)) {
            goto F1;
        }
        $bg = home_url();
        F1:
        $O5 = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\137\163\x61\x6d\x6c\137\163\160\137\145\156\x74\151\164\171\137\151\x64");
        if (!empty($O5)) {
            goto K1;
        }
        $O5 = $bg . "\57\x77\x70\x2d\x63\157\x6e\164\x65\156\x74\57\160\154\x75\147\x69\x6e\x73\57\155\x69\156\x69\157\x72\141\x6e\147\145\55\x73\141\x6d\154\x2d\62\x30\x2d\x73\151\x6e\147\x6c\145\55\x73\151\147\x6e\55\x6f\x6e\x2f";
        K1:
        $iS = $bg . "\57\77\157\160\164\151\157\156\75\x73\x61\x6d\x6c\x5f\165\163\x65\162\137\154\157\x67\x69\156";
        if (empty($_POST["\144\145\146\x61\165\x6c\x74\137\x70\x61\162\141\x6d\x65\164\x65\x72\163"])) {
            goto xQ;
        }
        $j7 = array("\x65\156\x74\x69\x74\x79\111\104" => $O5, "\162\145\x74\165\162\156" => $iS);
        xQ:
        if (empty($_POST["\x6d\157\137\x73\x61\x6d\x6c\x5f\x70\141\162\141\155\x65\x74\x65\x72\x5f\x6e\141\155\145\163"])) {
            goto i1;
        }
        $eO = $_POST["\x6d\x6f\137\163\141\x6d\x6c\x5f\160\141\x72\141\155\x65\x74\x65\162\137\156\141\155\x65\163"];
        i1:
        if (empty($_POST["\x6d\157\137\x73\141\x6d\154\x5f\160\141\x72\141\x6d\x65\164\x65\x72\x5f\166\x61\x6c\165\145\x73"])) {
            goto Pf;
        }
        $cM = $_POST["\x6d\x6f\137\163\141\x6d\x6c\137\160\141\162\x61\x6d\x65\164\x65\x72\x5f\x76\141\154\165\145\x73"];
        Pf:
        $o4 = array_combine($eO, $cM);
        $o4 = array_filter($o4);
        $o4 = Utilitites::mo_saml_array_merge($o4, $j7);
        return $o4;
    }
    function create_customer()
    {
        $V3 = new CustomerSaml();
        $gJ = json_decode($V3->create_customer($this), true);
        if (strcasecmp($gJ["\163\x74\x61\164\x75\163"], "\x43\x55\123\124\117\x4d\x45\x52\x5f\125\x53\105\x52\116\x41\115\105\x5f\x41\114\x52\105\101\x44\131\x5f\x45\x58\x49\x53\124\123") == 0) {
            goto vo;
        }
        if (!(strcasecmp($gJ["\163\x74\141\x74\x75\x73"], "\x53\x55\103\103\105\123\x53") == 0)) {
            goto MM;
        }
        update_option("\x6d\x6f\x5f\163\141\x6d\154\x5f\141\144\x6d\151\x6e\137\143\x75\163\164\x6f\155\145\162\137\x6b\x65\171", $gJ["\151\144"]);
        update_option("\155\157\137\163\141\155\154\137\x61\144\155\x69\156\x5f\141\160\151\x5f\x6b\x65\171", $gJ["\x61\160\151\113\145\x79"]);
        update_option("\x6d\157\x5f\x73\x61\155\154\x5f\143\165\x73\164\157\155\x65\x72\x5f\x74\157\x6b\145\x6e", $gJ["\x74\x6f\153\145\x6e"]);
        update_option("\155\x6f\x5f\x73\141\x6d\x6c\x5f\141\x64\155\151\x6e\137\160\x61\x73\x73\167\x6f\162\144", '');
        update_option("\155\x6f\137\163\141\155\x6c\x5f\155\145\x73\x73\x61\147\x65", "\124\150\x61\x6e\x6b\x20\171\157\x75\x20\x66\157\x72\40\x72\x65\x67\151\x73\164\145\162\151\156\147\x20\x77\151\164\150\x20\155\x69\x6e\151\x6f\162\x61\156\147\145\56");
        update_option("\x6d\157\137\x73\141\155\154\x5f\x72\x65\147\x69\163\164\162\141\x74\x69\157\x6e\137\x73\164\141\x74\165\163", '');
        delete_option("\155\x6f\x5f\163\x61\x6d\154\137\x76\x65\x72\x69\146\x79\137\143\165\163\x74\157\155\x65\162");
        delete_option("\x6d\157\137\x73\x61\155\154\x5f\x6e\x65\167\137\162\145\147\x69\163\164\x72\x61\164\x69\x6f\x6e");
        SAMLSPUtilities::mo_saml_show_success_message();
        MM:
        goto WD;
        vo:
        $this->get_current_customer();
        WD:
        update_option("\155\x6f\137\163\x61\x6d\154\137\x61\144\155\x69\x6e\x5f\160\x61\x73\163\167\x6f\x72\144", '');
    }
    function get_current_customer()
    {
        $V3 = new CustomerSaml();
        $cq = $V3->get_customer_key($this);
        if ($cq) {
            goto qC;
        }
        return;
        qC:
        $gJ = json_decode($cq, true);
        if (json_last_error() == JSON_ERROR_NONE) {
            goto mx;
        }
        update_option("\x6d\157\x5f\163\x61\155\154\x5f\155\145\163\163\141\147\x65", "\131\157\x75\x20\x61\x6c\162\x65\x61\144\171\40\x68\141\x76\145\x20\x61\x6e\x20\141\143\143\x6f\165\156\164\40\x77\151\x74\x68\40\x6d\151\x6e\151\x4f\162\x61\x6e\x67\145\56\x20\x50\154\145\x61\x73\145\x20\x65\x6e\164\x65\162\40\141\x20\x76\x61\x6c\x69\x64\40\x70\x61\x73\163\167\x6f\x72\x64\x2e");
        update_option("\x6d\157\137\163\141\x6d\x6c\137\x76\x65\x72\151\146\171\137\143\x75\163\x74\157\155\x65\162", "\x74\162\x75\x65");
        delete_option("\155\x6f\137\163\141\x6d\154\137\x6e\145\x77\137\x72\x65\147\151\163\164\162\x61\x74\x69\157\156");
        SAMLSPUtilities::mo_saml_show_error_message();
        goto IP;
        mx:
        update_option("\x6d\x6f\x5f\x73\x61\155\x6c\137\x61\144\x6d\x69\x6e\137\x63\x75\x73\164\157\155\145\x72\137\x6b\x65\171", $gJ["\151\x64"]);
        update_option("\x6d\x6f\137\163\141\155\154\137\141\x64\155\151\x6e\x5f\x61\x70\x69\x5f\153\145\171", $gJ["\141\160\x69\x4b\x65\x79"]);
        update_option("\155\x6f\137\x73\141\155\154\x5f\x63\165\163\x74\157\x6d\x65\162\137\x74\x6f\153\x65\156", $gJ["\164\x6f\153\145\156"]);
        update_option("\x6d\x6f\137\163\x61\155\154\137\141\144\155\x69\x6e\x5f\x70\x61\x73\163\167\157\x72\144", '');
        update_option("\x6d\x6f\137\163\x61\155\x6c\137\155\145\163\163\141\x67\145", "\131\157\165\x72\40\141\x63\x63\157\x75\156\x74\x20\x68\x61\x73\x20\x62\145\x65\156\x20\x72\145\164\x72\x69\145\x76\145\x64\40\x73\x75\143\x63\x65\x73\163\146\x75\x6c\154\171\x2e");
        delete_option("\155\157\x5f\163\x61\155\154\137\166\145\x72\x69\x66\x79\137\x63\165\x73\x74\x6f\155\145\162");
        delete_option("\155\157\x5f\x73\141\155\x6c\x5f\x6e\145\x77\x5f\x72\x65\x67\x69\163\164\162\x61\x74\151\157\156");
        SAMLSPUtilities::mo_saml_show_success_message();
        IP:
    }
    function djkasjdksa()
    {
        $V4 = "\41\x7e\100\43\44\45\x5e\46\x2a\x28\x29\x5f\53\x7c\x7b\175\x3c\76\77\x30\x31\62\63\64\65\x36\x37\x38\x39\x61\142\143\144\145\146\x67\150\151\x6a\x6b\x6c\155\x6e\157\x70\161\x72\163\164\165\x76\167\x78\171\x7a\x41\102\x43\x44\x45\106\x47\110\111\112\113\x4c\115\x4e\x4f\120\121\122\x53\124\x55\x56\x57\130\131\132";
        $h6 = strlen($V4);
        $XQ = '';
        $BT = 0;
        mm:
        if (!($BT < 10000)) {
            goto Xe;
        }
        $XQ .= $V4[rand(0, $h6 - 1)];
        qk:
        $BT++;
        goto mm;
        Xe:
        return $XQ;
    }
    function miniorange_sso_menu()
    {
        $jy = add_menu_page("\115\117\x20\x53\101\x4d\114\40\123\145\x74\164\x69\156\x67\163\x20" . __("\103\x6f\x6e\146\x69\x67\x75\x72\x65\40\123\x41\x4d\114\40\111\144\x65\x6e\x74\x69\164\x79\x20\120\162\157\x76\x69\x64\145\x72\40\146\157\x72\x20\x53\123\117", "\x6d\x6f\x5f\163\x61\x6d\x6c\137\163\x65\164\x74\x69\156\147\x73"), "\x6d\x69\x6e\x69\x4f\x72\x61\156\x67\145\40\x53\x41\115\114\40\62\x2e\x30\x20\x53\x53\x4f", "\141\x64\x6d\x69\x6e\x69\163\164\x72\x61\x74\x6f\x72", "\x6d\x6f\137\x73\x61\155\x6c\137\163\145\164\x74\x69\x6e\x67\163", array($this, "\155\x6f\x5f\154\157\147\x69\156\137\167\x69\144\x67\x65\x74\137\x73\141\x6d\x6c\x5f\157\160\164\x69\157\156\163"), plugin_dir_url(__FILE__) . "\151\x6d\141\x67\x65\163\x2f\x6d\x69\156\151\x6f\162\x61\156\147\x65\56\160\156\x67");
        if (!is_plugin_active("\155\x69\x6e\151\x6f\x72\141\156\x67\145\x2d\x66\145\x64\145\x72\141\164\x69\x6f\156\55\163\163\x6f\x2f\146\x65\x64\145\162\x61\164\151\157\156\x2d\163\163\x6f\x2e\x70\x68\160")) {
            goto PL;
        }
        add_submenu_page("\x6d\x6f\137\x73\x61\155\x6c\x5f\163\145\x74\x74\151\156\x67\x73", "\x46\145\144\145\162\141\x74\x69\157\156\40\x53\123\117", "\106\145\144\x65\x72\x61\x74\x69\157\156\40\123\x53\x4f", "\141\x64\155\x69\156\x69\x73\x74\162\141\x74\x6f\x72", "\155\157\137\x73\141\155\x6c\x5f\x66\x65\144\145\x72\141\164\x69\157\156\137\163\x73\x6f", "\155\x6f\x5f\163\141\x6d\x6c\137\146\x65\x64\145\162\141\164\x69\x6f\x6e\137\163\x73\157");
        PL:
        add_submenu_page("\155\157\x5f\163\x61\155\x6c\x5f\x73\145\x74\x74\151\156\x67\163", "\x4d\141\x6e\x61\x67\145\x20\x4d\165\154\164\151\x70\154\x65\x20\x45\x6e\166\x69\162\157\156\155\x65\x6e\164\163", "\x4d\141\x6e\141\x67\x65\40\115\x75\x6c\x74\x69\160\x6c\145\40\x45\156\166\x69\x72\x6f\x6e\155\x65\x6e\x74\163", "\x61\x64\x6d\x69\x6e\151\x73\164\x72\141\x74\x6f\162", "\x6d\157\x5f\155\165\x6c\x74\x69\x70\x6c\145\x5f\145\156\166\x69\162\x6f\156\x6d\145\156\164", "\155\x6f\x5f\x6d\x75\x6c\164\x69\160\154\145\x5f\x65\x6e\x76\151\162\x6f\156\x6d\145\x6e\164");
        add_submenu_page("\x6d\157\137\x73\141\155\154\x5f\163\145\164\164\151\x6e\147\x73", "\105\162\162\x6f\x72\x20\103\x6f\x64\145\163", "\x45\x72\x72\157\162\x20\103\x6f\x64\x65\163", "\141\x64\155\x69\x6e\x69\x73\x74\162\141\x74\157\162", "\x6d\157\x5f\145\x72\162\x6f\162\137\x63\157\x64\x65\x73", array("\x4d\x6f\137\x53\x61\x6d\x6c\137\105\x72\162\x6f\162\137\x43\x6f\x64\x65\163\x5f\x56\151\x65\x77", "\x6d\157\x5f\163\141\x6d\154\137\147\x65\164\137\145\162\162\x6f\162\137\x63\x6f\144\x65\x73\137\166\x69\x65\x77"));
    }
    function mo_saml_redirect_for_authentication($tX, $SP)
    {
        SAMLSPUtilities::mo_saml_check_is_extension_installed();
        if (Mo_License_Service::is_customer_license_verified()) {
            goto fD;
        }
        return;
        fD:
        if (!(!empty($tX) && !SAMLSPUtilities::mo_saml_is_user_logged_in())) {
            goto PS;
        }
        $Tw = esc_url(home_url()) . "\57\x3f\157\x70\164\x69\x6f\156\x3d\x73\141\x6d\x6c\x5f\165\x73\x65\x72\137\154\x6f\x67\151\156\46\x69\144\160\x3d" . esc_html($tX["\151\144\x70\x5f\x6e\141\x6d\145"]) . "\46\x72\x65\x64\x69\x72\x65\143\x74\137\x74\x6f\x3d" . esc_url($SP);
        if (is_feed()) {
            goto Ts;
        }
        echo "\x3c\163\x63\x72\x69\x70\164\x3e\167\151\x6e\144\157\167\x2e\154\x6f\143\141\x74\x69\157\x6e\56\x68\x72\x65\x66\75\47\40{$Tw}\40\x27\73\x3c\x2f\x73\143\x72\151\x70\x74\76";
        exit;
        goto xS;
        Ts:
        wp_redirect($Tw);
        xS:
        PS:
    }
    function mo_saml_login_error_message($s8)
    {
        echo "\74\144\151\166\40\x69\144\75\42\154\157\x67\151\x6e\x5f\x65\162\x72\157\162\61\42\76\40\74\x70\x3e\x3c\x73\164\x72\x6f\156\x67\76\x45\x52\122\x4f\122\74\57\x73\164\x72\x6f\156\x67\76\72\40" . $_SESSION["\155\157\137\163\x61\x6d\x6c"]["\x6c\x6f\147\x69\x6e\137\x65\x72\x72\157\x72\x5f\x6d\145\163\163\141\x67\x65"] . "\x3c\x2f\x70\76\74\57\x64\x69\166\76";
        unset($_SESSION["\155\157\137\x73\141\x6d\154"]["\x6c\x6f\147\151\x6e\137\145\x72\x72\157\162\x5f\155\x65\x73\163\141\x67\145"]);
    }
    function mo_saml_authenticate($user, $TH, $Y3)
    {
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\163\x61\x6d\x6c\x5f\142\141\143\153\144\x6f\157\162\x5f\x75\x72\154", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\163\x61\x6d\154\137\x62\x61\143\153\x64\x6f\x6f\162\x5f\x75\x72\x6c", false, $ha) : "\x66\x61\x6c\x73\x65";
        if (Mo_License_Service::is_customer_license_verified() && EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\163\x61\x6d\x6c\137\x65\156\141\x62\154\x65\x5f\144\x6f\155\141\151\156\137\x6d\141\160\160\151\156\x67", false, $ha) == "\164\x72\x75\x65" && (empty($_REQUEST["\163\141\x6d\154\137\x73\x73\157"]) || !empty($_REQUEST["\x73\x61\x6d\x6c\137\x73\x73\x6f"]) && $_REQUEST["\163\x61\x6d\x6c\x5f\x73\163\x6f"] != $Kh)) {
            goto Po;
        }
        return $user;
        goto NO;
        Po:
        if (empty($TH)) {
            goto bn;
        }
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\x6d\154\x5f\x69\144\x65\156\x74\151\x74\x79\x5f\x70\x72\157\166\151\144\145\x72\x73", true, $ha);
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\154\137\x69\x64\160\137\x64\157\x6d\141\x69\156\x5f\155\x61\160\x70\151\156\147", true, $ha);
        $B3 = '';
        if (empty($_REQUEST["\x72\x65\x64\151\x72\145\143\x74\137\164\157"])) {
            goto XZ;
        }
        $B3 = $_REQUEST["\162\x65\144\151\162\x65\143\x74\137\164\157"];
        XZ:
        if (strpos($TH, "\100") !== false) {
            goto sg;
        }
        if (empty($Qm) || EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\141\155\x6c\137\141\154\x6c\x6f\167\x5f\167\160\137\163\x69\147\156\151\x6e", false, $ha) != "\146\141\x6c\x73\145" && !empty($_REQUEST["\x73\x61\x6d\x6c\x5f\163\x73\157"]) && $_REQUEST["\163\141\x6d\x6c\137\x73\163\x6f"] == $Kh) {
            goto sq;
        }
        if (!empty($Y3)) {
            goto wf;
        }
        $NG = new WP_Error("\x6d\157\137\x73\x61\155\154\137\x69\x6e\x76\x61\x6c\x69\144\x5f\x65\x6d\x61\x69\154", __("\x3c\163\164\162\x6f\x6e\x67\76\105\122\122\117\122\x3c\57\x73\164\x72\x6f\156\147\76\x3a\x20\x50\154\145\x61\163\x65\x20\x65\156\164\x65\162\40\141\x20\x76\141\x6c\x69\x64\40\145\x6d\141\151\154\40\141\x64\144\x72\x65\x73\163\x2e"), '');
        return $NG;
        goto PC;
        sg:
        $rO = explode("\100", $TH, 2);
        $uA = trim($rO[1]);
        $uA = strtolower($uA);
        $wy = false;
        if (empty($LM)) {
            goto nr;
        }
        foreach ($LM as $ni => $SE) {
            $SE = str_replace("\40", '', $SE);
            $yP = array_map("\x74\162\x69\x6d", explode("\73", $SE));
            $yP = array_map("\x73\x74\x72\164\x6f\154\x6f\x77\145\162", $yP);
            if (!(SAMLSPUtilities::mo_saml_in_array($uA, $yP) && !empty($Qm[$ni]["\x65\156\x61\x62\x6c\145\x5f\151\144\x70"]))) {
                goto jH;
            }
            $u9 = $Qm[$ni];
            $wy = true;
            if (empty($Qm[$ni]["\145\156\141\142\x6c\x65\x5f\x69\x64\x70"])) {
                goto bh;
            }
            $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object();
            $Kq->mo_saml_redirect_sso_for_authentication($u9, $B3);
            goto B7;
            bh:
            $Mp = wp_authenticate_username_password($user, $TH, $Y3);
            return $Mp;
            B7:
            jH:
            o8:
        }
        Y7:
        nr:
        if ($wy) {
            goto Bh;
        }
        if (!EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\137\x73\x61\155\x6c\137\146\x61\x6c\154\x62\141\x63\x6b\x5f\x74\157\137\144\x65\146\x61\x75\x6c\x74", false, $ha)) {
            goto J5;
        }
        $sW = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\x6c\137\x64\x65\146\x61\x75\x6c\x74\x5f\x69\x64\160", false, $ha);
        if ($sW) {
            goto Ml;
        }
        $vN = new EnvironmentDao($ha);
        $vN->mo_save_environment_settings("\155\157\137\x73\x61\x6d\x6c\x5f\x66\x61\x6c\154\x62\x61\143\153\x5f\x74\157\x5f\x64\x65\x66\x61\x75\154\164", '');
        $vN->mo_save_environment_settings("\155\x6f\x5f\x73\141\155\x6c\x5f\144\157\x6d\x61\x69\156\x5f\x6c\x6f\x67\x69\x6e\x5f\146\141\x69\x6c", "\164\162\x75\145");
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\163\x61\x6d\154\137\x73\160\x5f\142\141\163\145\x5f\165\x72\154", false, $ha);
        if (!empty($bg)) {
            goto Wf;
        }
        $bg = home_url();
        Wf:
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["\127\120\x53\x41\x4d\114\x45\122\122\x30\63\64"]);
        goto Ib;
        Ml:
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object();
        $Kq->mo_saml_redirect_sso_for_authentication($Qm[$sW], $B3);
        Ib:
        J5:
        return $user;
        Bh:
        goto PC;
        sq:
        return $user;
        goto PC;
        wf:
        return $user;
        PC:
        bn:
        $NG = new WP_Error();
        $NG->add("\x65\155\160\x74\171\x5f\165\x73\145\x72\156\x61\x6d\145", __("\x3c\163\x74\x72\157\x6e\147\76\105\122\122\117\122\74\x2f\x73\x74\162\157\156\147\76\72\40\105\155\x70\x74\171\x20\x75\163\x65\162\x6e\x61\x6d\x65\x2e"));
        $NG->add("\145\x6d\x70\164\171\x5f\160\x61\x73\163\167\157\162\x64", __("\x3c\163\x74\x72\157\156\147\x3e\105\122\x52\x4f\x52\74\57\163\164\162\157\156\x67\x3e\x3a\40\105\x6d\x70\x74\x79\40\x70\x61\x73\163\x77\x6f\162\144\56"));
        return $NG;
        NO:
    }
    function mo_saml_redirect_to_idp_list_page_from_login_page()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto XP;
        }
        return;
        XP:
        $B3 = '';
        if (empty($_REQUEST["\x72\145\x64\x69\x72\145\x63\x74\x5f\164\157"])) {
            goto P_;
        }
        $B3 = $_REQUEST["\162\145\x64\151\x72\x65\x63\164\137\164\x6f"];
        P_:
        if (!SAMLSPUtilities::mo_saml_is_user_logged_in()) {
            goto vT;
        }
        if (!empty($B3)) {
            goto D7;
        }
        header("\x4c\157\143\141\164\151\157\x6e\x3a\40" . home_url());
        goto JJ;
        D7:
        header("\114\157\143\x61\x74\151\157\x6e\x3a\x20" . $B3);
        JJ:
        exit;
        vT:
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\x6d\x6c\137\144\x65\146\141\165\154\164\x5f\151\x64\x70", false, $ha);
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\x61\x6d\154\x5f\x65\156\x61\x62\154\145\137\x6c\157\147\x69\x6e\137\162\x65\x64\151\x72\x65\143\164", false, $ha) == "\164\162\165\x65")) {
            goto Qb;
        }
        if (!empty($vu)) {
            goto b6;
        }
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["\127\120\123\101\115\x4c\x45\x52\122\x30\63\x34"]);
        b6:
        $v8 = apply_filters("\x6d\157\x5f\x73\x61\x6d\154\137\160\x72\145\x5f\141\x75\164\x6f\137\162\145\144\x69\x72\145\143\x74\151\x6f\156", false);
        if (!$v8) {
            goto le;
        }
        return;
        le:
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\x73\x61\x6d\x6c\137\142\x61\143\x6b\144\157\157\162\137\x75\x72\154", false, $ha) ? trim(EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\x61\155\x6c\x5f\142\141\143\153\x64\157\157\x72\137\165\x72\x6c", false, $ha)) : "\x66\141\x6c\163\x65";
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\x5f\x73\141\x6d\x6c\x5f\141\154\x6c\x6f\x77\137\167\x70\137\163\x69\147\156\x69\156", false, $ha) == "\x74\x72\x75\x65")) {
            goto HR;
        }
        if (!empty($_REQUEST["\163\x61\155\x6c\x5f\163\163\x6f"]) && $_REQUEST["\163\141\155\154\x5f\163\163\157"] === $Kh) {
            goto ew;
        }
        if (!empty($_REQUEST["\x72\145\144\x69\162\x65\x63\164\137\x74\x6f"])) {
            goto C1;
        }
        goto dV;
        ew:
        return;
        goto dV;
        C1:
        $B3 = htmlspecialchars($_REQUEST["\162\x65\x64\x69\x72\x65\143\x74\x5f\164\157"]);
        if (!(strpos($B3, "\167\x70\55\141\x64\x6d\x69\x6e") !== false && strpos($B3, "\x73\x61\155\154\x5f\x73\x73\157\x3d" . $Kh) !== false)) {
            goto tq;
        }
        return;
        tq:
        dV:
        HR:
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\x6c\137\x69\x64\x65\156\x74\x69\x74\x79\x5f\x70\162\157\166\151\x64\145\x72\163", true, $ha);
        $bh = '';
        foreach ($Qm as $GZ) {
            if (!($GZ["\151\144\x70\137\x6e\x61\x6d\x65"] === $vu)) {
                goto Nu;
            }
            $bh = $GZ;
            Nu:
            T5:
        }
        A0:
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object();
        $Kq->mo_saml_redirect_sso_for_authentication($bh, $B3);
        Qb:
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\163\x61\155\x6c\x5f\x61\165\164\157\x5f\162\145\x64\151\162\145\x63\164\137\x74\x6f\137\x70\x75\142\154\x69\143\137\x70\141\147\x65", false, $ha) == "\x74\x72\x75\x65")) {
            goto LP;
        }
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\x61\155\x6c\x5f\x62\x61\x63\153\x64\x6f\x6f\162\x5f\x75\162\x6c", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\137\x73\141\155\x6c\x5f\x62\x61\x63\153\144\x6f\x6f\x72\x5f\165\x72\x6c", false, $ha) : "\x66\x61\154\x73\145";
        if (!empty($_GET["\154\157\147\x67\x65\144\157\165\164"]) && $_GET["\x6c\157\x67\x67\145\x64\157\165\x74"] == "\164\162\165\145") {
            goto Bt;
        }
        if (EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\163\141\155\x6c\137\x61\x6c\x6c\x6f\167\137\167\x70\137\163\151\147\156\x69\156", false, $ha) != "\x66\x61\154\163\145") {
            goto Dx;
        }
        goto dR;
        Bt:
        header("\114\157\143\x61\164\x69\157\156\72\40" . home_url());
        exit;
        goto dR;
        Dx:
        if (!empty($_REQUEST["\x73\x61\155\x6c\x5f\163\x73\x6f"]) && $_REQUEST["\x73\141\x6d\154\137\x73\163\x6f"] === $Kh) {
            goto DY;
        }
        if (!empty($_REQUEST["\x72\145\x64\x69\x72\145\143\x74\x5f\164\157"])) {
            goto hH;
        }
        goto PK;
        DY:
        return;
        goto PK;
        hH:
        $B3 = $_REQUEST["\x72\x65\x64\x69\162\x65\143\164\137\164\x6f"];
        if (!(strpos($B3, "\x77\x70\55\x61\144\155\151\x6e") !== false && strpos($B3, "\40\40\163\x61\155\154\x5f\x73\x73\157\75" . $Kh) !== false)) {
            goto Wg;
        }
        return;
        Wg:
        PK:
        dR:
        $Ps = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\163\x61\155\154\x5f\151\144\x70\x5f\154\151\x73\164\x5f\x75\x72\154", false, $ha);
        $x7 = (!empty($_SERVER["\110\x54\124\x50\x53"]) ? "\x68\164\x74\160\x73" : "\150\164\x74\160") . "\72\x2f\57{$_SERVER["\110\124\x54\120\x5f\x48\x4f\x53\x54"]}{$_SERVER["\x52\105\x51\125\105\123\124\137\x55\122\111"]}";
        if (!strcmp($x7, $Ps)) {
            goto RH;
        }
        header("\114\157\143\141\164\x69\x6f\156\x3a\40" . $Ps);
        exit;
        goto Yp;
        RH:
        return;
        Yp:
        LP:
    }
    function mo_saml_auto_redirect()
    {
        if (!(!Mo_License_Service::is_customer_license_verified() || SAMLSPUtilities::mo_saml_is_user_logged_in())) {
            goto Nk;
        }
        return;
        Nk:
        $ha = EnvironmentHelper::getCurrentEnvironment();
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\x61\155\x6c\x5f\145\156\141\142\x6c\145\x5f\162\163\x73\137\x61\x63\143\x65\x73\x73", false, $ha) == "\x74\x72\x75\145" && is_feed())) {
            goto CZ;
        }
        return;
        CZ:
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\163\141\x6d\x6c\137\x61\165\x74\157\137\162\x65\144\151\x72\145\143\164\137\x74\157\137\x70\x75\142\x6c\x69\143\x5f\160\x61\x67\x65", false, $ha) == "\x74\162\165\145" && !empty(EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\137\163\141\155\x6c\x5f\151\144\x70\137\154\x69\163\x74\137\165\162\154", false, $ha)))) {
            goto R8;
        }
        $v8 = apply_filters("\x6d\157\x5f\163\141\155\154\137\x70\162\145\x5f\x61\x75\164\157\137\x72\145\144\x69\162\x65\143\164\151\157\x6e", false);
        if (!$v8) {
            goto pF;
        }
        return;
        pF:
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\x73\x61\155\x6c\x5f\x62\x61\143\x6b\x64\x6f\157\162\x5f\165\x72\154", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\x5f\x73\141\x6d\x6c\x5f\x62\141\x63\x6b\144\x6f\x6f\162\x5f\165\162\154", false, $ha) : "\x66\x61\x6c\x73\145";
        if (!empty($_GET["\154\157\x67\x67\145\x64\157\165\164"]) && $_GET["\154\x6f\147\147\x65\x64\157\165\164"] == "\164\162\165\145") {
            goto kq;
        }
        if (EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\163\141\x6d\x6c\137\x61\x6c\x6c\x6f\167\137\167\160\x5f\163\151\147\156\151\156", false, $ha) != "\146\x61\x6c\x73\145") {
            goto rI;
        }
        goto OF;
        kq:
        header("\114\x6f\x63\x61\164\x69\157\156\72\40" . home_url());
        exit;
        goto OF;
        rI:
        if (!empty($_REQUEST["\x73\141\x6d\154\137\163\x73\157"]) && $_REQUEST["\163\141\x6d\x6c\137\163\x73\x6f"] === $Kh) {
            goto qd;
        }
        if (!empty($_REQUEST["\162\145\x64\x69\x72\145\x63\164\137\x74\x6f"])) {
            goto Hr;
        }
        goto yL;
        qd:
        return;
        goto yL;
        Hr:
        $B3 = $_REQUEST["\x72\145\144\x69\x72\x65\x63\164\x5f\164\x6f"];
        if (!(strpos($B3, "\167\x70\x2d\x61\144\155\x69\x6e") !== false && strpos($B3, "\x20\40\x73\x61\155\154\137\x73\163\x6f\75" . $Kh) !== false)) {
            goto uk;
        }
        return;
        uk:
        yL:
        OF:
        $Ps = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\137\x73\x61\155\x6c\137\151\144\160\x5f\154\x69\x73\164\137\x75\x72\154", false, $ha);
        $x7 = (!empty($_SERVER["\x48\124\x54\120\123"]) ? "\150\164\x74\x70\163" : "\x68\164\x74\160") . "\72\57\x2f{$_SERVER["\110\x54\124\x50\137\110\x4f\123\124"]}{$_SERVER["\x52\105\121\125\105\x53\x54\x5f\x55\122\111"]}";
        if (!strcmp($x7, $Ps)) {
            goto fA;
        }
        header("\x4c\157\143\141\x74\151\157\x6e\x3a\40" . $Ps);
        exit;
        goto OM;
        fA:
        return;
        OM:
        R8:
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\155\154\x5f\162\x65\144\x69\162\145\x63\x74\137\144\145\146\x61\165\x6c\164\x5f\x69\144\x70", false, $ha) == "\164\x72\x75\145")) {
            goto TX;
        }
        $v8 = apply_filters("\x6d\x6f\x5f\163\141\155\154\137\160\162\x65\137\141\x75\164\157\137\x72\145\x64\x69\x72\145\143\x74\151\157\x6e", false);
        if (!$v8) {
            goto GT;
        }
        return;
        GT:
        $SP = saml_get_current_page_url();
        $this->mo_saml_redirect_to_default_idp($SP);
        TX:
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\163\x61\155\154\137\x72\145\147\151\163\164\x65\162\145\x64\137\157\156\154\171\x5f\x61\143\x63\145\163\163", false, $ha) === "\x74\162\x75\x65")) {
            goto mv;
        }
        $v8 = apply_filters("\x6d\x6f\137\x73\141\155\x6c\137\x70\162\145\137\141\x75\164\x6f\137\162\x65\x64\x69\x72\145\143\164\x69\x6f\156", false);
        if (!$v8) {
            goto HD;
        }
        return;
        HD:
        $SP = saml_get_current_page_url();
        if (EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\163\141\x6d\154\137\x65\156\141\x62\x6c\x65\x5f\x6c\x6f\147\x69\x6e\x5f\x72\x65\144\151\x72\145\x63\164", false, $ha) === "\x74\x72\165\x65") {
            goto Zd;
        }
        $ow = site_url() . "\57\x77\160\x2d\x6c\x6f\147\x69\x6e\x2e\x70\x68\160";
        if (empty($SP)) {
            goto kb;
        }
        $ow = $ow . "\x3f\x72\145\144\151\162\x65\x63\164\137\164\x6f\75" . urlencode($SP) . "\x26\x72\x65\141\165\x74\x68\75\x31";
        kb:
        wp_safe_redirect($ow);
        exit;
        goto vQ;
        Zd:
        $this->mo_saml_redirect_to_default_idp($SP);
        vQ:
        mv:
    }
    function mo_saml_redirect_to_default_idp($SP)
    {
        $bh = '';
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $vu = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\x6c\137\144\x65\146\141\165\154\x74\137\151\144\x70", false, $ha);
        if (!empty($vu)) {
            goto mY;
        }
        Mo_Saml_Error_Message::mo_saml_display_error_code_message(Mo_Saml_Error_Codes::$error_codes["\127\x50\123\101\115\114\x45\122\122\60\63\x34"]);
        mY:
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\x6c\137\151\144\x65\156\164\151\164\171\137\x70\x72\157\166\151\144\145\162\x73", true, $ha);
        if (!(!empty($Qm) && is_array($Qm))) {
            goto To;
        }
        foreach ($Qm as $GZ) {
            if (!($GZ["\151\x64\160\137\156\141\155\145"] === $vu)) {
                goto m5;
            }
            $bh = $GZ;
            goto hS;
            m5:
            nf:
        }
        hS:
        To:
        $Kq = Mo_Saml_Redirection_Sso_Handler::mo_saml_get_object();
        $Kq->mo_saml_redirect_sso_for_authentication($bh, $SP);
    }
    function mo_saml_modify_login_form()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto PY;
        }
        return;
        PY:
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\163\141\x6d\154\137\x62\x61\x63\153\x64\x6f\157\x72\x5f\x75\x72\x6c", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\163\x61\155\x6c\x5f\x62\141\x63\x6b\x64\157\x6f\x72\x5f\x75\x72\x6c", false, $ha) : "\146\x61\x6c\x73\145";
        if (!(EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\137\163\141\155\154\137\141\154\154\157\167\x5f\167\x70\x5f\163\x69\x67\x6e\x69\156", false, $ha) != "\x66\x61\x6c\x73\x65" && (!empty($_REQUEST["\163\x61\155\154\137\163\163\x6f"]) && $_REQUEST["\163\141\x6d\x6c\137\163\x73\157"] == $Kh))) {
            goto qf;
        }
        echo "\x9\x9\11\74\163\x63\162\151\x70\x74\x3e\xd\12\11\x9\11\x9\152\121\x75\145\x72\x79\x28\42\x23\x75\163\145\162\137\x70\x61\163\x73\x22\x29\56\x72\145\x6d\157\x76\145\101\x74\x74\162\x28\x22\x64\x69\x73\141\x62\154\145\144\x22\51\x3b\15\xa\x9\x9\x9\74\57\x73\x63\162\x69\x70\164\x3e\15\xa\11\11\x9";
        echo "\x3c\x69\x6e\x70\165\164\40\x74\x79\x70\145\x3d\42\150\151\x64\x64\145\156\x22\x20\156\141\155\x65\75\x22\x73\141\155\154\137\x73\x73\x6f\x22\x20\166\141\154\165\145\75\x22" . $Kh . "\42\x3e";
        return;
        qf:
    }
    function mo_saml_add_login_links()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto Q7;
        }
        return;
        Q7:
        $this->add_federeation_link();
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\x6d\x6c\x5f\x69\x64\145\x6e\x74\151\164\171\137\160\162\157\166\x69\x64\x65\162\x73", true, $ha);
        $m9 = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\154\x5f\x73\163\157\x5f\x62\x75\x74\164\157\x6e\x5f\151\x64\x70", true, $ha);
        echo "\74\x73\143\162\151\160\x74\76\xd\xa\x9\x9\x9\11\152\x51\165\x65\x72\171\50\x64\157\x63\x75\x6d\145\x6e\164\x29\x2e\162\145\141\144\171\x28\x66\165\156\143\x74\x69\157\156\x20\50\51\x20\x7b\15\xa\11\x9\x9\11\x9\x6a\x51\x75\x65\x72\171\x28\x22\x23\154\x6f\147\151\x6e\x66\x6f\x72\x6d\42\x29\x2e\x61\160\x70\145\156\x64\50\x60\x3c\144\151\166\x20\x63\x6c\141\163\163\75\x22\163\x73\157\x2d\x62\165\x74\x74\x6f\156\163\55\x62\145\154\x6f\167\42\x20\163\164\171\154\x65\x3d\x22\160\141\x64\x64\151\156\147\55\x74\157\x70\x3a\x20\x33\65\x70\170\73\42\76\x3c\57\144\151\x76\76\140\51\x3b\15\xa\x9\x9\11\11\x9\166\x61\x72\40\44\145\154\x65\x6d\x65\x6e\x74\x20\75\40\152\121\x75\145\162\171\50\x22\43\165\163\145\x72\x5f\x6c\157\x67\151\x6e\42\51\x3b\15\xa\11\x9\11\11\x9\152\x51\165\x65\162\x79\x28\140\74\x64\151\166\40\x63\154\141\163\163\75\x22\163\x73\157\x2d\x62\x75\x74\x74\157\156\163\x2d\x61\142\157\x76\145\x22\x20\x73\164\x79\x6c\x65\75\42\x70\141\x64\x64\151\156\147\x2d\x74\x6f\160\72\40\x31\65\160\x78\x3b\42\76\74\57\x64\x69\166\76\140\51\56\x69\x6e\163\145\x72\x74\x42\x65\146\x6f\162\145\50\152\121\x75\x65\162\x79\x28\42\154\141\x62\x65\154\x5b\x66\x6f\162\x3d\x27\42\53\x24\x65\154\145\x6d\145\156\164\x2e\141\164\x74\162\x28\x27\151\x64\x27\51\x2b\42\x27\x5d\x22\51\51\x3b\xd\12\11\x9\11\x9\x7d\x29\x3b\15\xa\11\x9\74\57\x73\x63\162\151\x70\164\76";
        if (!(!empty($Qm) and is_array($Qm))) {
            goto uj;
        }
        foreach ($Qm as $bh) {
            $bK = $bh["\x69\144\160\137\156\x61\x6d\x65"];
            if (!(!empty($m9[$bK]["\x61\144\x64\x5f\x62\165\164\164\x6f\156\137\x77\160\x5f\154\157\x67\151\156"]) and $m9[$bK]["\141\x64\x64\137\x62\165\x74\x74\x6f\x6e\137\167\160\137\x6c\157\147\x69\x6e"] == "\164\x72\x75\145")) {
                goto cB;
            }
            $this->mo_saml_add_sso_button($m9, $bK);
            cB:
            Hn:
        }
        zV:
        uj:
    }
    function mo_saml_add_sso_button($m9, $bK)
    {
        if (SAMLSPUtilities::mo_saml_is_user_logged_in()) {
            goto dT;
        }
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $bg = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\137\163\x61\155\x6c\x5f\163\x70\x5f\x62\x61\x73\x65\x5f\165\x72\154", false, $ha);
        if (!empty($bg)) {
            goto Ac;
        }
        $bg = home_url();
        Ac:
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\154\x5f\x69\144\145\156\x74\151\164\x79\137\x70\x72\x6f\166\x69\144\x65\162\x73", true, $ha);
        if (!empty($Qm[$bK]["\x65\x6e\141\x62\x6c\x65\137\x69\144\x70"])) {
            goto lB;
        }
        return '';
        lB:
        $vB = get_sso_button($m9, $bK);
        $Wy = $vB["\142\x75\164\164\x6f\x6e\137\160\x6f\163\151\x74\x69\x6f\x6e"];
        $B3 = '';
        if (empty($_GET["\162\145\x64\151\x72\145\x63\x74\x5f\164\x6f"])) {
            goto BD;
        }
        $B3 = urlencode($_GET["\162\x65\x64\x69\x72\x65\143\x74\x5f\164\x6f"]);
        BD:
        $t2 = "\x3c\141\x20\x68\162\x65\146\x3d\x22" . $bg . "\x2f\77\157\160\164\151\x6f\156\75\163\141\155\154\x5f\165\163\x65\162\x5f\x6c\157\147\151\x6e\46\151\144\x70\75" . $bK . "\46\162\145\x64\151\162\145\143\164\x5f\x74\157\x3d" . $B3 . "\x22\40\x73\164\171\x6c\145\75\42\164\145\x78\x74\55\x64\145\143\157\162\x61\x74\x69\157\x6e\72\x6e\157\156\x65\x3b\x64\x69\163\x70\x6c\x61\x79\x3a\x66\154\145\170\73\x66\154\x65\170\x2d\144\151\162\145\143\164\x69\x6f\156\72\162\157\x77\73\x61\154\x69\x67\156\55\151\164\145\x6d\x73\72\x63\x65\156\164\x65\162\73\x6a\x75\x73\x74\x69\146\171\x2d\143\157\156\x74\x65\x6e\x74\72\x63\x65\156\x74\145\162\73\42\76" . $vB["\x6c\157\147\x69\156\137\142\165\164\x74\157\x6e"] . "\x3c\x2f\141\76";
        $t2 = "\x3c\144\151\x76\x3e" . $t2 . "\x3c\x2f\x64\x69\166\76";
        $Jb = array("\144\151\x76" => array("\x69\x64" => array(), "\x73\x74\x79\x6c\145" => array(), "\156\x61\155\x65" => array()), "\141" => array("\150\162\145\146" => array(), "\163\x74\171\154\145" => array()), "\151\155\x67" => array("\x73\164\x79\154\145" => array(), "\163\162\143" => array()), "\163\x63\x72\x69\x70\164" => array("\x74\171\160\145" => array()), "\x62" => array());
        if ($Wy == "\x61\x62\157\166\145") {
            goto pO;
        }
        $Jb = array("\x64\151\166" => array("\x69\x64" => true, "\x73\164\x79\x6c\145" => true), "\x61" => array("\x68\x72\145\146" => true, "\x73\164\171\154\x65" => true), "\151\x6d\147" => array("\x73\164\171\154\x65" => true, "\163\x72\x63" => true), "\x62" => array());
        $t2 = "\x3c\144\x69\166\40\x69\144\75\42" . "\x73\163\157\x5f\142\165\x74\164\157\x6e" . $bK . "\42\40\x73\164\x79\x6c\145\x3d\42\164\x65\x78\164\x2d\141\154\151\x67\x6e\x3a\143\x65\156\x74\x65\x72\x22\x3e\x3c\144\x69\166\40\163\x74\x79\154\x65\x3d\42\x70\141\x64\x64\x69\x6e\x67\72\x20\x31\60\160\170\x20\x30\73\x66\x6f\156\164\55\x73\151\x7a\x65\72\61\x34\x70\170\73\42\x3e\x3c\x62\x3e\x4f\x52\74\x2f\x62\x3e\x3c\x2f\x64\x69\166\x3e" . $t2 . "\x3c\x2f\x64\151\166\76";
        echo "\x3c\x73\x63\x72\151\x70\x74\76\xd\12\x9\x9\x9\11\152\121\165\x65\162\x79\50\x64\157\x63\165\x6d\x65\156\164\51\56\x72\x65\x61\x64\x79\50\x66\x75\x6e\x63\164\x69\x6f\x6e\40\x28\51\x20\x7b\15\12\11\11\11\11\11\x6a\121\x75\x65\162\x79\50\42\56\x73\163\157\55\142\x75\164\164\x6f\156\x73\x2d\142\145\154\157\167\42\51\x2e\141\160\160\145\x6e\144\x28\x27" . wp_kses($t2, $Jb) . "\47\x29\x3b\15\xa\11\x9\11\x9\x7d\51\x3b\xd\12\x9\x9\11\x9\74\57\163\x63\x72\151\x70\x74\x3e";
        return;
        goto oU;
        pO:
        $t2 = "\74\144\x69\x76\40\151\x64\x3d\x22" . "\x73\x73\157\x5f\x62\x75\x74\x74\x6f\156" . $bK . "\42\x20\x73\164\x79\154\145\75\42\x74\145\x78\x74\x2d\141\154\x69\x67\156\72\143\x65\x6e\x74\x65\x72\42\x3e" . $t2 . "\x3c\x64\x69\166\40\x73\x74\x79\154\145\75\42\x70\141\144\x64\151\x6e\x67\x3a\61\x30\160\170\x3b\x66\x6f\x6e\164\x2d\x73\151\172\x65\72\x31\x34\x70\x78\x3b\42\x3e\74\142\x3e\x4f\x52\x3c\57\x62\76\x3c\57\x64\x69\166\x3e\74\57\144\x69\166\x3e";
        echo "\x3c\163\x63\x72\151\x70\x74\x3e\xd\xa\x9\x9\11\x9\x6a\x51\x75\145\162\x79\50\x64\x6f\143\x75\155\145\x6e\x74\x29\x2e\162\x65\x61\x64\171\50\x66\165\156\143\x74\x69\157\x6e\40\x28\51\x20\173\xd\12\x9\11\11\11\11\x6a\x51\165\145\162\x79\x28\x22\56\163\163\157\x2d\x62\x75\x74\x74\157\156\x73\x2d\141\x62\157\166\x65\x22\51\x2e\x61\160\x70\x65\x6e\144\50\x27" . wp_kses($t2, $Jb) . "\x27\x29\x3b\xd\12\x9\11\x9\11\175\51\x3b\15\xa\11\x9\11\x9\74\x2f\x73\x63\x72\x69\160\x74\x3e";
        oU:
        dT:
    }
    function add_federeation_link()
    {
        $tM = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\141\x6d\x6c\x5f\x66\145\144\145\162\x61\x74\151\157\156\x73");
        if (!$tM) {
            goto P0;
        }
        foreach ($tM as $It => $p0) {
            if (!$p0["\x65\156\141\x62\x6c\145"]) {
                goto T7;
            }
            $ow = $p0["\x64\151\x73\143\x6f\x76\145\162\x79\137\x75\162\154"];
            if (empty($p0["\x70\x61\x72\141\x6d\145\164\x65\162\163"])) {
                goto wI;
            }
            if (empty($p0["\160\x61\x72\141\155\145\x74\145\162\x73"])) {
                goto e4;
            }
            $ow = $ow . "\x3f";
            foreach ($p0["\160\x61\x72\x61\x6d\145\x74\x65\x72\163"] as $Ht => $SE) {
                $ow = $ow . $Ht . "\75" . $SE;
                if (!next($p0["\160\141\162\141\x6d\145\164\145\162\163"])) {
                    goto S1;
                }
                $ow = $ow . "\x26";
                S1:
                k0:
            }
            IW:
            e4:
            wI:
            $t2 = "\x3c\142\162\x2f\x3e\x3c\150\162\x3e\15\xa\x9\11\x9\x9\11\74\x64\151\166\40\163\x74\x79\x6c\x65\75\x22\x74\145\x78\x74\x2d\x61\154\151\x67\156\x3a\143\x65\156\164\145\x72\73\x20\160\141\144\144\x69\x6e\x67\x3a\x35\x70\170\73\42\x3e\15\xa\11\11\x9\11\11\x9\74\x68\64\x3e\114\x6f\147\151\156\40\x77\x69\164\150\74\x2f\150\64\76\74\x62\x72\x2f\x3e\15\12\x9\11\11\x9\x9\x9\x3c\x61\40\150\x72\x65\x66\75\42" . $ow . "\x22\40\163\x74\x79\x6c\145\x3d\x22\x74\145\x78\x74\x2d\x64\145\143\x6f\x72\x61\x74\151\x6f\x6e\x3a\x6e\x6f\156\x65\x3b\42\x20\x74\141\x72\x67\145\164\75\42\x5f\x62\154\141\156\x6b\x22\x3e\15\xa\x9\11\11\11\x9\x9\11";
            if ($It == "\111\x6e\103\x6f\155\x6d\x6f\x6e") {
                goto Fm;
            }
            if ($It == "\x48\x41\x4b\x41") {
                goto WM;
            }
            if ($It == "\110\x4b\101\x46") {
                goto eD;
            }
            $t2 = $t2 . "\x3c\151\x6e\160\165\164\40\164\171\160\145\x3d\x22\x62\x75\164\x74\157\156\x22\40\166\x61\x6c\165\145\75\42" . $It . "\42\15\xa\11\x9\x9\11\11\11\11\11\163\x74\x79\x6c\145\x3d\x22\x77\x69\x64\x74\x68\x3a\61\60\60\160\170\x3b\15\12\x9\11\11\x9\x9\x9\x9\11\x9\x68\145\151\147\x68\x74\x3a\x35\x30\x70\170\73\xd\xa\x9\11\x9\11\x9\11\x9\11\x9\142\x6f\162\144\x65\x72\55\162\141\144\151\x75\163\x3a\x35\x70\170\x3b\xd\12\x9\x9\11\11\11\x9\x9\x9\x9\142\141\x63\x6b\x67\162\x6f\165\x6e\x64\x2d\143\157\154\157\162\x3a\x23\x30\x30\70\x35\x62\x61\x3b\xd\xa\x9\x9\11\11\x9\11\11\x9\11\142\x6f\162\x64\x65\x72\x2d\143\x6f\154\157\162\72\164\x72\x61\x6e\x73\160\x61\x72\145\156\164\x3b\15\12\x9\x9\x9\x9\11\11\x9\11\11\x63\x6f\154\157\x72\72\x23\x66\146\x66\x66\146\x66\73\15\xa\x9\11\11\11\x9\x9\x9\x9\x9\x66\x6f\156\x74\55\163\x69\172\145\x3a\x32\60\160\170\x3b\xd\12\x9\x9\x9\x9\x9\11\x9\x9\x9\160\x61\144\x64\151\x6e\x67\72\x30\160\x78\73\x22\x3e";
            goto o_;
            eD:
            $t2 = $t2 . "\x3c\151\x6d\147\x20\163\162\x63\x3d\x22" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "\x69\x6d\x61\147\x65\163\57\x68\153\x61\146\56\x70\156\x67\x22\40\163\164\x79\154\x65\x3d\x22\x62\157\162\x64\145\162\x3a\156\157\156\145\x3b\x20\167\x69\x64\164\x68\72\x32\x30\x30\x70\x78\73\40\150\x65\151\147\x68\x74\x3a\66\60\x70\x78\73\x22\40\x61\x6c\x74\75\42\110\113\101\x46\40\166\151\x61\x20\x6d\151\156\x69\x4f\x72\141\156\x67\x65\x22\76";
            o_:
            goto k8;
            WM:
            $t2 = $t2 . "\74\151\155\x67\x20\163\x72\x63\x3d\x22" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "\151\x6d\141\x67\145\163\57\x68\x61\x6b\x61\x2e\x70\x6e\147\x22\40\163\x74\171\x6c\x65\75\x22\142\x6f\162\x64\x65\162\72\x6e\157\156\145\73\40\x77\x69\x64\164\150\x3a\x31\65\60\x70\170\x3b\40\150\x65\151\147\x68\x74\x3a\67\x35\x70\x78\73\42\40\141\154\x74\x3d\x22\110\141\x6b\141\40\166\151\141\x20\155\151\x6e\x69\117\x72\141\156\x67\145\x22\x3e";
            k8:
            goto Wn;
            Fm:
            $t2 = $t2 . "\x3c\x69\x6d\147\x20\x73\x72\x63\x3d\42" . SAMLSPUtilities::mo_saml_get_plugin_base_url() . "\x69\155\141\x67\145\x73\x2f\x69\156\143\157\x6d\155\157\x6e\56\x67\151\146\42\40\163\x74\171\154\x65\x3d\x22\142\157\x72\144\145\162\72\x6e\x6f\156\145\x3b\40\167\x69\x64\x74\x68\72\62\x38\60\x70\x78\x3b\x20\x68\x65\151\x67\150\164\x3a\x36\x30\160\x78\73\42\x20\x61\x6c\164\75\42\111\156\143\x6f\x6d\155\x6f\156\40\166\151\141\x20\x6d\x69\156\151\117\162\141\x6e\147\x65\x22\x3e";
            Wn:
            $t2 = $t2 . "\xd\xa\x9\x9\11\11\x9\11\x3c\x2f\x61\x3e\xd\12\x9\x9\x9\11\11\74\57\144\151\x76\76\xd\12\x9\x9\x9\11\x9\74\x68\x72\76\74\x62\x72\57\x3e";
            echo $t2;
            T7:
            OX:
        }
        Co:
        P0:
    }
    function mo_saml_jquery_default_login()
    {
        wp_enqueue_script("\x6a\x71\x75\145\x72\171");
    }
    function mo_saml_footer_form()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto Vh;
        }
        return;
        Vh:
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $kq = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\155\x6c\137\145\156\x61\x62\154\145\x5f\144\157\155\141\151\x6e\137\x6d\141\x70\160\x69\156\147", false, $ha);
        $Sr = EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\x5f\x73\141\x6d\x6c\x5f\x64\157\155\141\151\x6e\137\x6c\x6f\x67\151\x6e\x5f\x66\x61\x69\154", false, $ha);
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\x61\x6d\x6c\137\151\x64\145\156\x74\151\x74\x79\x5f\160\x72\x6f\166\151\x64\145\x72\x73", true, $ha);
        $yP = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\154\x5f\x69\144\x70\137\x64\157\x6d\141\x69\x6e\x5f\x6d\141\x70\160\x69\156\147", true, $ha);
        $ba = array();
        $AE = array();
        foreach ($yP as $ni => $SE) {
            if (!(!empty($Qm[$ni]) && empty($Qm[$ni]["\145\156\141\x62\154\145\x5f\x69\144\160"]))) {
                goto qz;
            }
            $AE = $Qm[$ni]["\151\144\x70\x5f\x6e\x61\x6d\145"];
            if (empty($ba)) {
                goto DJ;
            }
            $ba = array($ba, $AE);
            goto AP;
            DJ:
            $ba = $AE;
            AP:
            qz:
            i4:
        }
        h0:
        if (!is_array($ba)) {
            goto wG;
        }
        $ba = implode("\54", $ba);
        wG:
        if ($kq == "\164\x72\165\145" && !empty($Qm)) {
            goto vF;
        }
        echo "\x9\x9\11\x3c\x73\143\162\x69\x70\x74\x3e\xd\12\x9\x9\x9\xd\12\11\x9\x9\152\121\165\x65\x72\171\x28\47\x6c\x61\142\145\154\133\x66\157\x72\x3d\x22\165\x73\x65\x72\x5f\x70\141\163\163\x22\135\47\x29\x2e\163\x68\x6f\167\x28\x29\73\xd\xa\11\x9\11\152\x51\x75\x65\x72\171\50\47\43\x75\x73\x65\x72\x5f\x70\x61\x73\x73\47\51\56\x73\150\x6f\x77\50\x29\x3b\15\xa\x9\11\11\152\121\x75\x65\x72\x79\x28\47\144\151\166\43\x6c\x6f\x67\x69\156\x20\160\43\156\141\166\47\x29\x2e\x73\x68\x6f\x77\x28\x29\x3b\15\12\x9\x9\x9\xd\xa\x9\x9\11\x6a\121\x75\x65\162\x79\x28\x27\43\165\163\x65\162\x5f\160\x61\163\x73\x27\51\x2e\166\141\x6c\x28\x22\x22\51\x3b\xd\12\11\11\11\xd\xa\11\x9\x9\74\57\163\x63\x72\x69\160\x74\x3e\15\12\11\11\11";
        goto RM;
        vF:
        echo "\x9\x9\x3c\x73\143\x72\x69\x70\x74\x3e\xd\xa\x9\11\x9\x63\x6f\x6e\163\x74\40\165\x73\x65\162\x4c\x6f\x67\x69\156\40\75\x20\144\157\x63\165\x6d\145\x6e\164\x2e\x71\165\x65\162\171\x53\145\154\x65\x63\x74\x6f\162\x28\x27\154\x61\x62\145\154\x5b\146\x6f\x72\75\42\165\x73\x65\162\137\154\x6f\147\x69\156\x22\135\47\51\73\xd\xa\11\11\x9\165\x73\x65\162\x4c\157\147\x69\156\x2e\164\145\x78\164\103\157\156\164\145\156\x74\x20\x3d\x20\42\x45\155\141\x69\154\x20\101\144\x64\162\x65\x73\x73\x22\73\15\xa\x9\x9\x9\152\121\x75\x65\x72\x79\x28\x27\43\x75\x73\x65\162\x5f\x70\x61\x73\163\x27\51\56\x61\x74\164\x72\x28\x27\x64\151\163\x61\x62\x6c\x65\144\47\x2c\40\x27\144\x69\163\x61\x62\154\145\x64\47\x29\73\xd\12\x9\11\x9\152\121\x75\145\162\171\x28\x20\42\x23\154\157\147\x69\x6e\x66\157\162\155\x22\40\51\x2e\163\x75\x62\155\x69\164\x28\x66\x75\156\x63\164\x69\157\x6e\x28\x20\145\x76\145\156\x74\x20\51\x20\x7b\15\xa\x9\x9\x9\x9\x76\141\162\x20\x75\x73\145\x72\156\141\155\x65\x20\x3d\40\x6a\121\x75\145\x72\171\x28\47\43\165\163\145\x72\137\x6c\157\x67\151\x6e\x27\x29\56\x76\141\154\50\51\73\xd\12\x9\x9\x9\x9\151\x66\x28\x75\x73\145\162\x6e\x61\x6d\145\x20\x21\75\x20\47\47\x29\173\15\12\11\x9\x9\11\x9\166\141\x72\40\166\141\154\151\144\145\155\x61\x69\x6c\40\x3d\40\x75\163\x65\x72\156\x61\x6d\x65\x2e\151\x6e\144\145\x78\117\146\50\x22\100\x22\x29\x3b\xd\12\11\x9\x9\11\11\151\x66\50\x76\141\x6c\x69\x64\x65\155\141\151\154\x20\41\x3d\x20\55\61\x29\x7b\15\12\11\x9\11\11\11\11\x76\141\x72\x20\165\163\145\162\156\x61\155\x65\x5f\x73\x70\154\x69\164\40\75\40\x75\163\145\162\x6e\x61\x6d\145\x2e\x73\x70\154\x69\x74\50\47\100\x27\51\73\xd\xa\x9\11\11\11\11\11\166\141\162\x20\144\157\x6d\141\x69\156\x20\75\40\165\x73\x65\162\156\141\155\x65\x5f\x73\x70\154\151\164\133\x31\135\73\15\12\x9\11\x9\11\x9\x9\144\x6f\x6d\x61\151\156\x20\75\x20\144\x6f\x6d\141\151\x6e\56\164\x6f\x4c\157\143\x61\x6c\x65\114\x6f\x77\145\162\103\x61\x73\x65\50\x29\73\xd\12\x9\x9\x9\11\x9\11\x6a\x51\165\x65\x72\171\x2e\x61\x6a\x61\170\50\173\15\xa\x9\11\x9\11\x9\x9\11\165\162\x6c\x3a\x22";
        echo home_url() . "\x3f\147\x65\164\x5f\144\157\155\141\x69\x6e\x5f\x6d\141\160\x70\151\156\147\75\x74\162\165\x65";
        echo "\42\x2c\15\xa\x9\11\11\x9\x9\x9\x9\141\163\x79\x6e\x63\x3a\40\x66\x61\154\163\x65\54\xd\12\11\11\11\11\x9\11\11\x73\165\x63\143\145\163\163\x3a\x66\x75\x6e\x63\x74\151\x6f\x6e\50\144\x61\164\141\x29\40\173\15\12\x9\x9\11\x9\x9\x9\x9\11\x69\x66\x28\x64\141\x74\x61\40\75\x3d\x3d\40\x75\x6e\144\x65\146\x69\156\145\x64\x20\174\174\40\x21\144\x61\x74\141\51\173\15\xa\11\11\11\11\x9\x9\11\x9\11\166\141\162\x20\160\x61\x73\x73\167\157\162\144\40\75\40\x6a\121\x75\145\162\171\x28\47\43\x75\163\145\162\x5f\x70\141\163\x73\47\x29\56\166\141\x6c\x28\x29\x3b\15\xa\x9\x9\11\11\11\11\11\11\11\151\146\x28\164\x79\x70\145\x6f\146\x20\160\141\163\163\167\157\x72\x64\40\x3d\75\x3d\x20\x27\165\x6e\144\x65\146\151\x6e\x65\x64\x27\40\x7c\174\40\160\141\x73\163\x77\x6f\x72\x64\40\x3d\x3d\x20\x27\47\x29\x7b\15\xa\x9\x9\x9\x9\11\x9\11\11\11\11\152\121\165\145\162\171\x28\47\x6c\x61\142\145\154\133\x66\157\162\x3d\x22\x75\163\x65\x72\x5f\x70\x61\163\x73\42\x5d\47\x29\x2e\163\150\157\x77\50\51\73\xd\xa\11\x9\11\11\11\x9\x9\x9\x9\11\x6a\121\x75\145\x72\171\50\47\43\x75\163\x65\x72\137\160\141\163\163\x27\x29\x2e\x73\x68\x6f\167\50\51\73\15\12\x9\11\11\x9\x9\11\x9\x9\x9\x9\152\x51\165\x65\162\171\x28\47\x64\151\x76\x23\x6c\157\147\x69\156\x20\160\43\x6e\x61\166\x27\x29\56\x73\150\157\167\x28\51\x3b\xd\xa\x9\11\x9\11\x9\x9\x9\x9\11\11\x65\x76\x65\156\x74\x2e\160\x72\x65\x76\x65\x6e\164\104\x65\x66\141\x75\154\164\x28\x29\73\xd\12\x9\11\11\11\11\x9\11\11\x9\x7d\xd\12\11\11\11\11\x9\11\11\11\x7d\x65\154\x73\145\x7b\15\12\11\x9\11\x9\x9\11\x9\11\x9\166\x61\x72\40\144\157\155\x61\151\156\x5f\155\141\164\x63\150\x20\x3d\40\146\x61\x6c\x73\x65\x3b\15\xa\11\x9\x9\x9\x9\x9\x9\x9\11\166\141\x72\x20\144\141\x74\141\117\142\x6a\40\75\40\x4a\x53\x4f\x4e\56\x70\x61\x72\x73\145\x28\144\141\x74\141\51\x3b\xd\12\11\x9\11\11\x9\x9\x9\11\x9\x76\141\162\40\x75\163\x65\137\x77\160\137\x63\162\x65\x64\145\156\164\151\141\x6c\163\x20\75\x20\42";
        echo $Sr;
        echo "\42\73\xd\xa\x9\11\x9\11\11\11\x9\11\11\x76\x61\162\x20\x6c\x69\x73\164\137\157\x66\x5f\144\151\163\141\x62\x6c\145\x64\137\x69\x64\160\163\x20\x3d\42";
        echo $ba;
        echo "\x22\15\12\xd\xa\11\11\11\x9\11\11\11\x9\11\152\121\x75\145\162\171\x2e\x65\141\x63\x68\x20\50\x64\x61\x74\x61\117\142\152\54\x20\x66\x75\x6e\143\x74\151\157\x6e\x20\x28\x6b\145\x79\54\x20\166\141\154\x75\145\x29\173\xd\xa\11\11\x9\x9\11\x9\11\11\11\x9\166\x61\x72\x20\x76\x61\x6c\x75\x65\x20\75\40\x76\x61\154\x75\x65\x2e\162\x65\160\154\141\143\145\x28\x2f\134\x73\x2b\57\147\54\40\47\47\x29\x3b\15\12\11\11\x9\x9\x9\x9\11\x9\11\11\166\x61\x72\40\x6d\x61\x70\x70\x69\156\147\137\x64\157\x6d\141\x69\x6e\x73\40\75\40\166\x61\154\x75\x65\x2e\x73\160\154\x69\x74\x28\x22\x3b\42\51\73\15\12\x9\x9\x9\11\11\x9\11\11\x9\x9\x76\x61\162\x20\155\x61\x70\x70\151\x6e\x67\x5f\x64\x6f\x6d\141\151\x6e\163\40\75\x20\x6d\x61\x70\x70\151\156\x67\x5f\144\157\x6d\141\x69\156\x73\56\x6d\141\160\50\x65\154\145\155\x65\156\x74\40\x3d\76\40\x65\154\x65\x6d\145\x6e\164\56\164\157\x4c\x6f\x77\x65\x72\x43\x61\163\x65\50\51\x29\x3b\xd\12\x9\11\11\11\x9\x9\11\x9\11\11\x76\x61\162\40\144\x6f\x6d\141\151\x6e\137\146\157\x75\156\x64\40\x3d\x20\x6a\121\x75\145\x72\171\56\151\x6e\x41\162\x72\x61\171\x28\144\x6f\x6d\x61\151\x6e\54\x6d\141\x70\160\151\x6e\147\137\x64\x6f\155\x61\151\156\x73\51\x3b\15\12\11\11\11\x9\x9\x9\x9\x9\x9\x9\151\146\x28\x64\157\x6d\141\151\x6e\137\x66\x6f\165\156\x64\40\x3e\40\x2d\61\51\173\15\xa\11\11\11\11\11\11\x9\11\x9\11\11\166\x61\x72\x20\x73\x65\x61\x72\143\x68\137\x64\151\x73\141\x62\154\x65\137\x69\144\160\40\75\40\x6c\151\x73\x74\x5f\x6f\x66\137\x64\151\x73\x61\142\x6c\145\144\x5f\151\x64\160\x73\x2e\x69\156\x63\x6c\165\144\145\163\50\x6b\145\171\51\15\xa\11\x9\x9\x9\x9\x9\x9\11\x9\x9\x9\151\x66\x28\163\145\x61\162\143\150\137\x64\151\163\x61\x62\154\145\x5f\x69\x64\x70\x20\x3d\75\40\x74\162\x75\x65\x29\15\12\11\x9\11\11\x9\11\x9\11\x9\11\11\11\x64\x6f\155\x61\x69\156\x5f\x6d\x61\164\143\150\x20\x3d\40\x66\x61\154\163\x65\73\15\12\x9\11\x9\11\x9\11\11\11\11\11\x9\145\154\x73\145\xd\12\11\11\11\11\x9\x9\11\x9\x9\x9\x9\11\144\157\x6d\x61\151\x6e\x5f\x6d\141\x74\143\150\40\x3d\x20\164\x72\x75\145\x3b\xd\12\11\11\x9\x9\x9\x9\11\x9\11\11\x7d\15\xa\x9\x9\x9\x9\x9\11\x9\x9\11\x7d\51\x3b\xd\xa\x9\11\x9\x9\x9\x9\x9\11\11\x69\x66\50\41\144\x6f\x6d\x61\151\156\137\155\141\x74\x63\x68\x29\173\xd\12\11\x9\x9\11\11\11\x9\11\11\x9\x9\11\xd\12\11\x9\x9\11\11\x9\11\x9\x9\11\11\x9\x69\x66\50\165\x73\x65\x5f\x77\160\x5f\x63\x72\145\144\145\x6e\x74\151\141\154\163\51\x7b\xd\12\x9\x9\11\11\x9\x9\x9\11\x9\11\11\11\11\x6a\x51\165\145\162\171\x28\x27\x6c\141\142\x65\154\133\146\x6f\x72\x3d\x22\165\x73\x65\x72\137\160\x61\x73\x73\42\135\x27\51\x2e\x73\x68\157\x77\x28\x29\x3b\xd\xa\11\x9\x9\x9\11\x9\x9\x9\x9\11\11\x9\x9\152\x51\x75\145\x72\x79\x28\x27\43\165\x73\x65\162\x5f\160\x61\163\163\47\x29\56\x73\x68\x6f\167\x28\x29\73\xd\xa\x9\x9\11\x9\x9\11\x9\x9\11\11\x9\x9\x9\x6a\121\165\145\x72\x79\x28\47\x64\x69\x76\43\154\157\147\x69\156\40\x70\x23\x6e\141\166\47\x29\x2e\x73\150\x6f\167\50\51\x3b\15\12\x9\x9\11\x9\x9\x9\x9\11\x9\11\11\x9\x9\xd\xa\11\x9\11\x9\x9\x9\11\x9\x9\11\11\11\x9\166\141\x72\x20\x70\x61\163\x73\x77\157\162\x64\x20\75\x20\152\121\x75\145\162\171\x28\47\43\165\x73\145\162\x5f\160\141\163\x73\x27\x29\56\x76\x61\154\50\x29\x3b\xd\xa\11\11\x9\x9\x9\11\11\x9\11\11\11\x9\11\xd\xa\x9\11\11\11\x9\11\11\11\x9\x9\11\11\11\x69\x66\50\x70\x61\x73\x73\x77\157\162\x64\x20\75\x3d\40\47\47\x29\x7b\15\xa\11\x9\x9\x9\11\11\11\11\11\x9\x9\11\x9\x9\x65\166\x65\x6e\x74\56\160\x72\x65\166\x65\x6e\164\x44\x65\x66\x61\x75\154\x74\50\x29\73\15\12\11\x9\x9\x9\x9\11\11\x9\11\x9\x9\11\11\x7d\15\12\11\11\11\x9\11\11\11\11\11\x9\11\11\11\x6a\121\165\x65\x72\171\x28\x27\43\165\163\145\162\137\x70\x61\x73\163\x27\x29\56\162\x65\x6d\x6f\x76\145\x41\x74\164\x72\50\x27\x64\x69\163\x61\142\x6c\145\144\x27\x29\73\15\12\xd\12\11\11\11\x9\x9\x9\11\11\11\11\11\11\175\xd\xa\11\11\x9\x9\x9\11\11\11\11\x7d\xd\xa\11\x9\11\x9\x9\x9\11\11\175\xd\xa\11\x9\x9\x9\11\x9\11\175\15\12\11\x9\11\x9\x9\11\x7d\51\73\15\xa\11\x9\11\x9\x9\175\15\xa\11\11\x9\11\x7d\xd\12\11\x9\x9\x7d\x29\73\xd\xa\11\11\11\xd\12\x9\x9\x3c\x2f\163\143\162\x69\x70\164\76\xd\12\11\15\12\11";
        RM:
        $this->mo_saml_modify_login_form();
    }
    function mo_saml_init_login_form()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto aH;
        }
        return;
        aH:
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\x6d\x6c\x5f\x69\x64\145\x6e\164\x69\x74\171\x5f\160\x72\x6f\166\151\x64\145\162\163", true, $ha);
        $LM = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\154\x5f\x69\144\x70\137\x64\x6f\x6d\141\x69\x6e\137\x6d\141\160\x70\151\156\x67", true, $ha);
        $Kh = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\x6d\154\137\142\x61\x63\x6b\144\157\157\x72\137\x75\x72\x6c", false, $ha) ? EnvironmentHelper::getOptionForSelectedEnvironment("\155\157\137\163\x61\155\x6c\137\142\x61\x63\153\144\157\x6f\162\x5f\165\x72\154", false, $ha) : "\146\x61\x6c\163\x65";
        $kq = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\x5f\x73\x61\155\154\137\x65\156\141\x62\x6c\145\x5f\144\x6f\x6d\141\151\x6e\x5f\155\141\x70\x70\x69\156\147", false, $ha);
        if (!(!empty($Qm) && $kq && Mo_License_Service::is_customer_license_valid(false, false))) {
            goto v5;
        }
        $vy = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\157\x5f\163\x61\155\x6c\x5f\x61\x6c\154\157\x77\x5f\167\x70\137\x73\x69\147\156\x69\156", false, $ha);
        if (!empty($_GET["\147\145\164\x5f\x64\x6f\155\141\151\x6e\x5f\155\141\160\x70\x69\156\147"]) && $_GET["\x67\145\164\137\x64\157\x6d\x61\x69\x6e\137\155\x61\160\160\x69\156\x67"] == "\x74\x72\x75\x65") {
            goto ku;
        }
        if ($vy != "\146\141\x6c\x73\x65" && (!empty($_REQUEST["\x73\141\x6d\154\x5f\163\163\x6f"]) && $_REQUEST["\163\x61\155\154\x5f\x73\x73\157"] == $Kh)) {
            goto nA;
        }
        if (!empty($_REQUEST["\x72\x65\144\151\x72\145\x63\164\137\x74\x6f"])) {
            goto Jy;
        }
        goto Ax;
        nA:
        return;
        goto Ax;
        Jy:
        $B3 = $_REQUEST["\162\145\144\x69\x72\145\143\x74\x5f\x74\157"];
        if (!(strpos($B3, "\167\x70\55\141\x64\x6d\x69\x6e") !== false && strpos($B3, "\163\141\155\154\137\x73\x73\x6f\x3d\x66\141\x6c\x73\x65") !== false)) {
            goto Kg;
        }
        return;
        Kg:
        Ax:
        goto Zg;
        ku:
        echo json_encode($LM);
        exit;
        Zg:
        add_filter("\147\x65\164\164\145\x78\x74", function ($Ze) {
            if (!SAMLSPUtilities::mo_saml_in_array($GLOBALS['pagenow'], array('wp-login.php'))) {
                goto y1;
            }
            if (!("\x55\163\145\162\x6e\141\x6d\x65" == $Ze)) {
                goto e1;
            }
            return "\105\155\141\151\x6c";
            e1:
            y1:
            return $Ze;
        }, 20);
        wp_register_style("\150\151\x64\x65\x2d\154\x6f\147\151\156", plugins_url("\151\156\143\154\x75\x64\145\163\57\143\x73\x73\57\x68\151\144\145\x2d\x6c\157\147\x69\x6e\56\x63\163\x73\77\166\x65\x72\x73\151\157\156\x3d\64\56\x31\x2e\63", __FILE__));
        wp_register_style("\x73\x68\x6f\x77\x2d\x6c\x6f\x67\151\156", plugins_url("\x69\x6e\143\x6c\165\144\x65\x73\57\143\163\x73\57\x73\x68\157\x77\55\x6c\x6f\x67\x69\156\x2e\143\163\163\77\166\x65\162\x73\x69\x6f\x6e\75\x34\56\61\56\x33", __FILE__));
        wp_enqueue_style("\163\150\157\x77\x2d\x6c\x6f\147\151\x6e");
        wp_enqueue_style("\x68\x69\144\145\x2d\x6c\x6f\147\x69\x6e");
        v5:
    }
    function mo_get_saml_login_shortcode($Ox = array())
    {
        $KI = get_site_option("\163\x61\155\x6c\137\x69\144\145\156\x74\151\x74\x79\137\160\x72\x6f\166\x69\x64\x65\162\x73");
        $KI = maybe_unserialize($KI);
        if (!empty($KI)) {
            goto rk;
        }
        return "\116\x6f\40\x49\104\120\x20\103\157\x6e\146\151\147\165\162\x65\144";
        rk:
        $RQ = false;
        $Ox = map_deep(wp_unslash($Ox), "\x73\141\156\x69\x74\x69\x7a\145\137\164\145\170\x74\137\146\151\145\x6c\144");
        if (empty($KI)) {
            goto xD;
        }
        foreach ($KI as $bh) {
            $fx = $bh["\x69\x64\160\x5f\156\x61\155\x65"];
            if (!($fx == $Ox["\x69\144\x70"])) {
                goto H4;
            }
            $RQ = true;
            goto vM;
            H4:
            N6:
        }
        vM:
        xD:
        if ($RQ) {
            goto ra;
        }
        return "\124\x68\x69\x73\x20\111\104\120\x20\156\157\x74\40\x66\x6f\165\x6e\x64\40\x69\156\40\164\x68\x65\40\x6c\x69\163\164";
        goto Y6;
        ra:
        $s8 = get_site_option("\x6d\157\137\x73\141\155\x6c\x5f\x73\x68\x6f\x72\x74\143\157\x64\145\x5f\155\x65\x73\x73\x61\147\145");
        $t2 = "\x3c\x73\x74\171\x6c\x65\76\x2e\151\x73\141\137\145\162\x72\157\x72\x20\x7b\15\12\40\x20\x20\x20\x20\x20\40\40\40\40\x20\40\x20\40\40\40\40\x20\x20\40\40\x20\x20\x20\x63\157\154\x6f\162\72\x20\x23\x44\70\60\x30\60\x43\x3b\xd\12\40\x20\40\40\x20\x20\40\x20\40\x20\40\40\40\x20\x20\x20\40\40\40\40\x20\x20\40\x20\142\x61\143\x6b\147\162\157\x75\x6e\x64\55\143\x6f\154\x6f\x72\72\x20\x23\106\106\x44\62\x44\x32\x3b\15\12\x20\x20\x20\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\40\x20\40\40\40\x7d\15\12\40\40\x20\40\x20\40\40\x20\40\40\40\40\x20\x20\x20\40\40\x20\x20\x20\x2e\x69\x73\x61\x5f\145\162\x72\x6f\162\40\x69\40\173\xd\xa\40\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\40\40\40\x20\x20\40\40\40\40\x20\40\40\x20\155\141\162\147\151\x6e\72\x31\60\160\170\x20\x32\x32\x70\170\73\15\12\40\40\x20\x20\x20\x20\x20\x20\40\x20\40\40\x20\40\40\40\x20\40\40\40\x20\x20\x20\x20\x20\40\x20\x20\x66\157\156\164\55\163\x69\172\x65\72\62\145\x6d\73\15\xa\40\40\40\40\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\x20\40\x20\40\x20\x20\x20\40\40\x20\40\x20\166\145\162\x74\x69\143\141\x6c\55\x61\154\151\x67\x6e\72\155\151\x64\144\154\145\x3b\15\xa\40\x20\40\40\40\40\40\40\40\40\40\40\40\x20\40\40\x20\x20\40\40\40\40\40\x20\175\15\12\40\40\40\x20\40\40\40\40\x20\40\x20\x20\x20\40\40\40\40\40\40\40\40\x20\40\40\56\x69\163\x61\x5f\x65\x72\x72\x6f\x72\x20\x7b\xd\12\40\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\40\40\x20\x6d\141\162\147\151\x6e\72\40\x31\60\x70\x78\40\60\160\170\73\xd\12\x20\40\40\x20\x20\x20\x20\x20\40\x20\40\40\40\40\40\40\40\x20\x20\40\x20\40\x20\40\x70\x61\144\144\151\156\147\x3a\x31\62\160\x78\73\15\xa\40\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\40\40\40\x20\x20\40\40\40\x20\x20\40\40\xd\xa\40\40\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\40\x20\40\40\40\x20\x20\x20\40\x20\x20\x7d\xd\12\x20\x20\x20\x20\40\40\40\40\x20\x20\40\x20\40\x20\40\40\x20\x20\x20\40\74\x2f\x73\x74\171\154\x65\x3e\15\12\40\40\x20\40\x20\x20\40\40\40\x20\40\x20\x3c\x66\157\x72\x6d\x20\x61\x63\x74\x69\157\x6e\75\42\42\40\x6e\x61\155\x65\x3d\x22\163\x61\x6d\154\x5f\x72\145\x71\x75\145\x73\x74\x5f\x77\151\164\x68\137\145\x6d\x61\x69\154\42\40\x6d\145\x74\150\157\x64\75\x22\160\x6f\x73\x74\42\x3e\xd\xa\40\40\x20\x20\xd\12\x20\40\x20\x20\40\40\40\x20\40\x20\x20\x20\74\x64\151\x76\40\x63\x6c\x61\163\163\75\x22\x63\157\156\164\141\151\156\145\x72\x22\x3e";
        if (!$s8) {
            goto lp;
        }
        $t2 .= "\x3c\x64\x69\166\x20\143\x6c\x61\163\x73\75\42\x69\163\141\x5f\145\162\162\157\162\x22\x3e" . $s8 . "\74\x2f\144\x69\x76\x3e";
        lp:
        $t2 .= "\x3c\154\141\142\145\x6c\40\146\x6f\162\x3d\42\165\x6e\x61\155\145\42\x3e\74\x62\x3e\x55\x73\145\162\x6e\x61\155\145\x3c\57\x62\x3e\x3c\x2f\154\141\142\145\154\76\15\12\x20\x20\40\40\40\40\x20\x20\x20\40\x20\x20\x3c\151\x6e\160\165\x74\40\x74\171\160\145\x3d\x22\164\x65\170\164\42\x20\x70\154\141\x63\x65\x68\157\154\144\145\x72\x3d\x22\x45\156\164\145\162\40\x55\163\x65\162\156\x61\155\x65\42\40\156\x61\155\x65\75\42\165\x6e\141\155\x65\x5f\x65\155\x61\151\154\x22\x20\162\x65\161\165\151\x72\145\144\x3e\xd\12\x20\x20\x20\x20\40\40\40\40\x20\40\x20\40\x3c\x69\156\160\165\164\40\164\171\x70\x65\75\x22\x68\151\x64\144\145\x6e\42\40\156\x61\x6d\x65\75\42\x6f\160\164\151\157\x6e\x22\40\x76\141\x6c\x75\x65\75\x22\163\141\x6d\154\x5f\165\x73\x65\162\137\x6c\x6f\147\151\x6e\x22\x2f\x3e\15\xa\x20\x20\x20\40\x20\40\40\40\40\x20\40\40\74\x69\156\x70\x75\x74\40\x74\x79\160\x65\75\x22\x68\x69\x64\144\x65\156\42\x20\156\x61\x6d\145\75\42\157\x70\x74\151\x6f\156\x6e\x22\x20\x76\141\154\165\145\75\x22\155\x6f\x5f\x73\141\155\154\137\162\x65\x71\x75\145\163\164\x5f\x77\151\164\x68\x5f\145\x6d\141\151\x6c\42\57\x3e\xd\12\x20\40\40\x20\40\x20\x20\x20\40\x20\x20\40\74\151\x6e\160\x75\164\40\x74\171\160\x65\x3d\42\150\x69\x64\x64\145\x6e\x22\x20\x6e\141\x6d\145\75\42\x69\x64\160\42\40\x76\x61\154\x75\145\x3d\x22" . esc_html($Ox["\x69\x64\160"]) . "\42\x3e\15\12\40\40\x20\40\x20\x20\x20\40\40\x20\40\40\74\142\x75\x74\164\157\156\40\164\x79\160\x65\x3d\x22\163\x75\x62\x6d\151\164\42\40\x63\x6c\141\163\163\75\x22\142\165\164\x74\157\156\40\x62\165\164\164\157\x6e\55\160\162\151\x6d\141\x72\171\40\142\x75\x74\x74\x6f\156\55\x6c\x61\162\147\x65\42\x20\76\x4c\157\147\151\156\x3c\x2f\142\x75\x74\164\x6f\x6e\x3e\xd\12\x20\40\40\40\x20\x20\40\x20\x20\40\x20\40\x3c\57\x64\151\166\x3e\xd\xa\40\40\x20\40\x20\x20\40\40\40\40\x20\40\x20\74\x2f\146\x6f\162\155\x3e";
        delete_site_option("\x6d\x6f\x5f\163\x61\x6d\x6c\x5f\x73\150\157\x72\164\x63\157\x64\145\x5f\x6d\x65\163\163\141\147\145");
        return $t2;
        Y6:
    }
    function mo_get_saml_idp_list_shortcode()
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto Gf;
        }
        return;
        Gf:
        if (SAMLSPUtilities::mo_saml_is_user_logged_in()) {
            goto FY;
        }
        $t2 = '';
        if (mo_saml_is_sp_configured()) {
            goto l6;
        }
        $t2 = "\120\154\x65\141\x73\x65\40\143\157\x6e\146\151\x67\x75\x72\x65\40\164\x68\x65\40\155\151\x6e\x69\117\162\x61\156\x67\x65\x20\x53\x41\x4d\x4c\x20\x50\x6c\165\x67\151\x6e\40\x66\151\162\163\164\x2e";
        goto KF;
        l6:
        $B3 = urlencode(saml_get_current_page_url());
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\x6d\x6c\x5f\x69\144\145\x6e\x74\151\164\x79\x5f\160\x72\157\166\151\144\x65\x72\x73", true, $ha);
        $za = EnvironmentHelper::getOptionForSelectedEnvironment("\155\x6f\137\163\141\x6d\x6c\x5f\x73\x68\x6f\162\164\143\x6f\144\x65\x5f\x6c\x6f\x67\151\x6e\137\x74\x65\170\x74", false, $ha);
        if ($za) {
            goto Zq;
        }
        $za = "\x4c\x6f\x67\x69\x6e\40\167\x69\164\x68\40\x20";
        Zq:
        $t2 = $za . "\x20\40";
        $t2 = $t2 . "\x3c\x73\145\x6c\x65\x63\x74\40\157\x6e\x63\150\x61\156\x67\x65\75\42\x72\145\144\151\162\145\x63\164\124\157\x49\x44\120\50\x74\150\151\163\x2e\x76\x61\x6c\165\145\51\x22\76\15\12\x9\x9\x9\11\x9\x3c\x6f\x70\x74\x69\x6f\x6e\40\x64\151\x73\x61\142\154\x65\144\40\163\x65\154\145\x63\x74\145\144\x3e\55\x2d\123\x65\x6c\x65\143\164\40\171\157\x75\x72\40\111\x64\x50\55\x2d\x3c\57\157\160\164\x69\x6f\156\76";
        $ik = '';
        foreach ($Qm as $ni => $SE) {
            if (!empty($SE["\x65\x6e\x61\142\154\x65\137\x69\x64\160"])) {
                goto Ul;
            }
            goto mf;
            Ul:
            $We = !empty($SE["\143\x75\x73\164\x6f\x6d\x5f\154\x6f\x67\x69\156\137\x74\x65\x78\164"]) ? $SE["\x63\165\x73\x74\x6f\x6d\x5f\154\157\147\151\x6e\x5f\164\145\x78\x74"] : $ni;
            $ik = $ik . "\74\157\160\x74\x69\157\x6e\40\166\141\154\165\x65\75\42" . home_url() . "\57\x3f\x6f\x70\164\x69\157\x6e\x3d\x73\141\155\154\137\x75\x73\145\162\x5f\154\x6f\x67\x69\x6e\46\x69\144\160\75" . $ni . "\46\162\145\x64\151\x72\x65\143\x74\137\164\x6f\x3d" . $B3 . "\x22\x3e" . $We . "\x3c\x2f\x6f\x70\x74\151\x6f\x6e\76";
            mf:
        }
        MO:
        $t2 = $t2 . $ik . "\x3c\x2f\x73\x65\x6c\x65\x63\x74\76\xd\xa\x9\11\x9\x9\11\74\x73\143\162\x69\160\164\x3e\15\12\11\x9\x9\x9\11\146\165\x6e\143\x74\151\157\x6e\40\162\x65\144\151\162\145\x63\164\124\157\x49\x44\120\50\x75\162\154\x29\173\xd\xa\x9\x9\11\x9\11\x9\x6c\x6f\x63\x61\x74\x69\157\x6e\x20\75\x20\165\162\x6c\73\15\xa\11\11\11\x9\11\175\15\12\11\x9\x9\x9\11\74\x2f\x73\x63\x72\151\160\164\x3e\xd\12\x9\11\x9\11\11";
        KF:
        return $t2;
        FY:
        return self::mo_saml_get_shortcode_for_logged_in_users();
    }
    function mo_saml_get_idp_shortcode($Ox = array())
    {
        if (Mo_License_Service::is_customer_license_verified()) {
            goto Iy;
        }
        return;
        Iy:
        if (!SAMLSPUtilities::mo_saml_is_user_logged_in()) {
            goto fY;
        }
        return self::mo_saml_get_shortcode_for_logged_in_users();
        fY:
        if (mo_saml_is_sp_configured()) {
            goto y7;
        }
        $t2 = "\x50\x6c\145\141\x73\145\x20\x63\x6f\156\x66\x69\x67\x75\162\x65\40\x74\150\145\x20\x6d\151\156\x69\117\162\x61\156\x67\x65\x20\123\101\115\114\40\x50\154\x75\147\x69\156\40\146\x69\162\163\x74\56";
        goto bp;
        y7:
        $Ox = map_deep(wp_unslash($Ox), "\163\141\x6e\151\x74\x69\172\x65\137\x74\145\170\164\x5f\x66\151\145\x6c\144");
        $B3 = urlencode(saml_get_current_page_url());
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $za = EnvironmentHelper::getOptionForSelectedEnvironment("\x6d\x6f\x5f\x73\141\x6d\x6c\x5f\151\144\x70\x5f\x73\150\157\162\164\x63\x6f\144\x65\137\154\157\x67\151\x6e\137\x74\x65\170\x74", false, $ha);
        if ($za) {
            goto WL;
        }
        $za = "\114\x6f\x67\151\156\40\x77\x69\164\150\x20\x23\x23\111\104\x50\x23\43";
        WL:
        $fx = '';
        if (empty($Ox["\x69\144\160"])) {
            goto G0;
        }
        $S5 = EnvironmentHelper::getOptionForSelectedEnvironment("\163\x61\x6d\154\137\x69\144\145\x6e\x74\x69\x74\171\137\160\162\x6f\166\151\144\145\x72\x73", true, $ha);
        $fx = $Ox["\151\144\160"];
        if (!empty($S5[$Ox["\151\x64\160"]])) {
            goto Nx;
        }
        $t2 = "\x50\x6c\x65\x61\163\145\40\x63\x6f\156\x66\x69\147\165\162\x65\40\164\x68\145\40\155\151\156\x69\117\162\141\x6e\x67\145\x20\123\101\x4d\114\x20\120\154\165\x67\x69\156\x20\x77\x69\164\150\40\x3c\163\x74\x72\157\156\147\x3e" . esc_html($fx) . "\74\x2f\x73\x74\162\x6f\x6e\x67\x3e\40\146\x69\162\x73\164\56";
        return $t2;
        Nx:
        goto O9;
        G0:
        $fx = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\155\154\137\144\x65\x66\141\x75\154\x74\137\151\x64\x70", false, $ha);
        O9:
        $za = str_replace("\43\43\111\104\x50\x23\x23", $fx, $za);
        $t2 = $za . "\40\40";
        $t2 = "\74\x61\x20\163\164\x79\x6c\145\40\x3d\40\x22\x74\x65\170\164\x2d\x64\x65\143\157\162\141\x74\151\157\156\x20\x3a\x20\156\x6f\x6e\x65\x3b\x22\150\162\x65\146\75\x22" . home_url() . "\57\x3f\x6f\x70\164\151\157\156\x3d\163\x61\x6d\x6c\137\165\x73\145\162\x5f\x6c\157\x67\x69\156\x26\151\x64\x70\x3d" . esc_html($fx) . "\x26\x72\145\x64\x69\162\x65\143\x74\137\x74\157\75" . $B3 . "\x22\76" . $t2 . "\74\57\141\76";
        bp:
        return $t2;
    }
    function mo_saml_get_shortcode_for_logged_in_users()
    {
        $t2 = '';
        $current_user = wp_get_current_user();
        $ha = EnvironmentHelper::getCurrentEnvironment();
        $Qm = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\155\154\137\151\144\x65\156\164\151\164\x79\137\x70\x72\157\x76\x69\x64\145\x72\x73", true, $ha);
        if (empty(get_user_meta($current_user->ID, "\x6d\157\137\163\x61\x6d\154\x5f\154\157\147\x67\x65\144\x5f\x69\x6e\137\167\151\x74\150\137\x69\x64\160", true))) {
            goto QP;
        }
        $fT = get_user_meta($current_user->ID, "\155\x6f\137\x73\x61\155\154\137\154\157\x67\x67\x65\x64\137\151\x6e\137\167\x69\x74\x68\137\x69\x64\x70", true);
        $Eo = $Qm[$fT];
        QP:
        $yM = "\110\x65\x6c\x6c\x6f\54";
        if (empty($Eo["\x63\165\x73\164\157\x6d\x5f\x67\162\x65\x65\164\151\x6e\147\x5f\164\145\x78\x74"])) {
            goto Dl;
        }
        $yM = $Eo["\x63\165\x73\x74\157\155\x5f\x67\x72\145\145\x74\x69\x6e\147\x5f\x74\x65\170\164"];
        Dl:
        $AY = '';
        if (empty($Eo["\147\x72\x65\145\164\151\156\147\x5f\156\141\155\145"])) {
            goto SJ;
        }
        switch ($Eo["\147\x72\x65\145\164\x69\156\x67\137\156\x61\x6d\x65"]) {
            case "\x55\123\x45\x52\x4e\x41\x4d\105":
                $AY = $current_user->user_login;
                goto pS;
            case "\105\x4d\101\111\114":
                $AY = $current_user->user_email;
                goto pS;
            case "\106\x4e\x41\115\105":
                $AY = $current_user->user_firstname;
                goto pS;
            case "\114\x4e\101\x4d\x45":
                $AY = $current_user->user_lastname;
                goto pS;
            case "\106\116\x41\x4d\x45\137\114\x4e\101\x4d\x45":
                $AY = $current_user->user_firstname . "\40" . $current_user->user_lastname;
                goto pS;
            case "\x4c\x4e\101\x4d\105\137\x46\x4e\101\x4d\x45":
                $AY = $current_user->user_lastname . "\x20" . $current_user->user_firstname;
                goto pS;
            default:
                $AY = $current_user->user_login;
        }
        Pc:
        pS:
        SJ:
        if (!empty(trim($AY))) {
            goto lS;
        }
        $AY = $current_user->user_login;
        lS:
        $V1 = $yM . "\x20" . $AY;
        $Ro = "\x4c\x6f\x67\157\x75\164";
        if (empty($Eo["\143\165\163\x74\x6f\x6d\137\154\x6f\x67\157\x75\164\137\164\x65\x78\164"])) {
            goto qG;
        }
        $Ro = $Eo["\x63\165\x73\x74\x6f\155\137\x6c\157\x67\157\165\164\137\164\145\x78\164"];
        qG:
        $t2 = $V1 . "\40\174\40\74\x61\x20\x68\x72\x65\x66\75\x22" . wp_logout_url(saml_get_current_page_url()) . "\x22\x20\164\151\x74\154\x65\x3d\42\154\157\x67\157\165\x74\x22\40\x3e" . $Ro . "\74\x2f\x61\x3e\x3c\x2f\x6c\x69\76";
        $ow = saml_get_current_page_url();
        $vN = new EnvironmentDao($ha);
        $vN->mo_save_environment_settings("\154\x6f\x67\157\165\x74\137\162\145\144\x69\x72\145\x63\x74\137\x75\x72\x6c", $ow);
        return $t2;
    }
    function _handle_upload_metadata()
    {
        if (!(!empty($_FILES["\x6d\x65\x74\x61\144\x61\x74\x61\x5f\x66\151\x6c\x65"]) || !empty($_POST["\x6d\145\x74\x61\144\x61\164\x61\x5f\x75\x72\x6c"]))) {
            goto U0;
        }
        if (!empty($_FILES["\155\145\x74\x61\x64\141\x74\141\137\x66\151\154\145"]["\164\155\160\137\x6e\141\x6d\145"])) {
            goto pz;
        }
        if (mo_saml_is_extension_installed("\x63\165\x72\x6c")) {
            goto Cy;
        }
        update_option("\155\157\x5f\x73\x61\155\154\137\x6d\145\x73\163\141\147\x65", "\x50\110\x50\40\143\125\122\x4c\40\145\x78\164\x65\156\163\x69\157\156\40\151\x73\40\156\157\x74\40\151\x6e\163\164\x61\x6c\x6c\145\x64\40\157\162\x20\x64\x69\163\x61\142\154\145\x64\56\40\x43\141\156\156\x6f\x74\x20\x66\x65\164\143\x68\40\155\x65\x74\141\x64\x61\164\141\x20\146\x72\x6f\155\x20\x55\122\x4c\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Cy:
        $ow = filter_var(htmlspecialchars($_POST["\x6d\145\x74\141\x64\141\164\141\x5f\x75\x72\154"]), FILTER_SANITIZE_URL);
        $qZ = SAMLSPUtilities::mo_saml_wp_remote_call($ow, array("\x73\x73\x6c\166\x65\162\x69\x66\171" => false), true);
        if ($qZ) {
            goto QD;
        }
        update_option("\155\157\x5f\163\141\155\x6c\x5f\155\x65\x73\x73\141\x67\x65", "\120\154\145\x61\163\145\x20\x70\x72\x6f\x76\151\144\x65\40\141\40\166\x61\x6c\x69\144\x20\x6d\x65\x74\141\x64\x61\164\141\x20\125\x52\114\x2e");
        return;
        QD:
        if (!is_null($qZ)) {
            goto Tf;
        }
        $od = null;
        goto x9;
        Tf:
        $od = $qZ;
        x9:
        goto ea;
        pz:
        $od = @file_get_contents($_FILES["\x6d\145\164\141\144\141\x74\x61\137\x66\151\x6c\x65"]["\164\x6d\x70\x5f\156\x61\155\x65"]);
        ea:
        $vN = new EnvironmentDao();
        $Zo = EnvironmentHelper::getOptionForSelectedEnvironment("\163\141\x6d\154\x5f\x6d\145\x74\x61\144\141\x74\141\x5f\165\x72\154\137\146\157\x72\137\163\171\x6e\x63", true, EnvironmentHelper::getCurrentEnvironment());
        if (empty($_POST["\163\x61\x6d\x6c\x5f\x69\144\x65\156\164\151\164\171\x5f\155\145\x74\x61\144\141\164\x61\137\160\x72\x6f\x76\x69\144\x65\162"])) {
            goto ON;
        }
        $fx = $_POST["\x73\x61\155\x6c\137\x69\144\x65\156\x74\x69\x74\x79\137\155\145\x74\x61\x64\x61\164\x61\137\160\162\157\x76\151\x64\145\162"];
        if (!empty($_POST["\163\171\156\x63\137\x6d\145\x74\141\x64\x61\164\x61"])) {
            goto lb;
        }
        if (!isset($Zo[$fx])) {
            goto Ci;
        }
        unset($Zo[$fx]);
        Ci:
        $vN->mo_save_environment_settings("\x73\141\x6d\x6c\137\155\x65\164\141\x64\141\164\141\x5f\x75\162\x6c\x5f\146\157\x72\x5f\163\x79\156\x63", $Zo);
        $vN->mo_save_environment_settings("\x73\x61\x6d\x6c\137\x6d\x65\x74\x61\144\141\164\141\x5f\x75\x72\x6c\137\x66\x6f\162\137\x73\x79\x6e\143\137\x6d\x75\x6c\164\x69\160\154\x65\x5f\x69\x64\160", '');
        $vN->mo_save_environment_settings("\163\141\155\x6c\137\x6d\145\x74\x61\x64\x61\164\x61\137\163\x79\x6e\x63\137\151\x6e\164\x65\162\x76\141\x6c", '');
        wp_unschedule_event(wp_next_scheduled("\x6d\x65\x74\141\x64\141\164\141\137\163\171\156\143\137\x63\162\x6f\156\x5f\141\x63\x74\x69\x6f\x6e", array($fx)), "\x6d\145\x74\141\x64\141\164\x61\137\x73\171\156\x63\137\x63\162\x6f\x6e\137\x61\143\164\x69\157\x6e", array($fx));
        goto oC;
        lb:
        $SE = array();
        $SE["\155\x65\x74\x61\x64\141\x74\141\137\165\x72\154"] = $_POST["\x6d\x65\164\x61\x64\141\164\x61\x5f\165\162\x6c"];
        $SE["\163\171\x6e\x63\137\x69\x6e\164\145\x72\x76\x61\154"] = $_POST["\x73\171\x6e\143\137\x69\156\164\x65\x72\x76\x61\154"];
        $SE["\163\x79\156\143\137\143\145\x72\164\151\146\151\143\141\164\145\137\x6d\x65\164\x61\x64\x61\164\x61"] = isset($_POST["\163\171\156\143\x5f\143\145\162\164\x69\x66\x69\x63\141\164\x65\137\155\x65\x74\x61\x64\x61\164\141"]) ? $_POST["\163\x79\156\x63\137\x63\145\x72\164\151\x66\x69\143\x61\164\x65\137\x6d\145\164\141\144\x61\164\x61"] : '';
        $Zo[$fx] = $SE;
        $vN->mo_save_environment_settings("\x73\x61\155\154\137\155\x65\164\141\x64\x61\x74\x61\x5f\165\162\154\x5f\146\x6f\x72\137\163\171\156\143", $Zo);
        if (wp_next_scheduled("\155\x65\164\141\144\141\164\x61\137\163\171\x6e\143\137\143\162\x6f\x6e\137\141\x63\164\151\157\156", array($fx))) {
            goto qI;
        }
        wp_schedule_event(time(), $_POST["\163\x79\x6e\x63\137\151\156\x74\x65\x72\x76\x61\x6c"], "\155\145\164\141\x64\x61\x74\141\x5f\163\171\x6e\x63\137\x63\x72\157\x6e\x5f\x61\143\x74\x69\x6f\156", array($fx));
        qI:
        oC:
        ON:
        $fS = Mo_Saml_Metadata_Import_Handler::mo_saml_get_object();
        $fS->mo_saml_upload_metadata($od);
        U0:
    }
    function upload_metadata($od, $fx = '', $YD = false)
    {
        if (!empty($od)) {
            goto OH;
        }
        update_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\x5f\x6d\x65\x73\163\x61\x67\145", "\x50\154\145\x61\x73\145\x20\160\162\x6f\x76\151\x64\145\40\x61\x20\166\x61\x6c\151\x64\40\x6d\x65\164\x61\x64\x61\164\141\x20\146\x69\x6c\145\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto TN;
        OH:
        $zl = SAMLSPUtilities::mo_saml_safe_load_xml($od, Mo_Saml_Error_Codes::$error_codes["\127\x50\x53\x41\x4d\114\105\x52\122\60\62\x36"], true);
        TN:
        if ($zl) {
            goto XW;
        }
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        XW:
        $db = $zl->firstChild;
        if (!empty($db)) {
            goto fXn;
        }
        if (!empty($_FILES["\x6d\x65\x74\x61\x64\141\x74\141\137\x66\x69\x6c\x65"]["\164\x6d\x70\137\x6e\141\x6d\x65"])) {
            goto ebn;
        }
        if (!empty($_POST["\155\x65\164\x61\144\x61\164\141\x5f\x75\x72\x6c"])) {
            goto ieR;
        }
        if (!empty($GW)) {
            goto Ip;
        }
        update_option("\x6d\157\x5f\163\x61\x6d\154\137\155\145\163\x73\x61\147\145", "\120\x6c\x65\x61\163\x65\40\x70\162\157\x76\x69\x64\145\x20\x61\40\x76\x61\154\x69\x64\x20\x6d\x65\164\x61\144\141\x74\x61\40\x66\x69\154\145\x20\157\x72\40\x61\x20\x76\141\x6c\x69\x64\x20\125\122\x4c\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto iZC;
        Ip:
        update_option("\x6d\x6f\x5f\163\x61\155\154\x5f\x6d\x65\x73\x73\141\x67\x65", "\125\156\141\142\x6c\x65\x20\x74\157\x20\146\x65\164\143\x68\40\115\x65\x74\141\144\x61\x74\x61\x2e\x20\120\x6c\x65\141\163\145\x20\x63\150\145\x63\x6b\40\171\x6f\165\162\40\x49\104\x50\x20\x63\x6f\156\146\151\x67\165\162\141\x74\151\157\156\x20\x61\147\x61\151\156\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        iZC:
        goto iZR;
        ieR:
        update_option("\x6d\x6f\x5f\163\x61\155\x6c\137\155\x65\163\x73\x61\147\x65", "\120\x6c\x65\141\163\145\x20\160\162\157\x76\x69\144\x65\x20\141\40\166\141\x6c\151\144\x20\155\x65\164\141\x64\141\x74\x61\x20\x55\x52\114\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        iZR:
        goto caR;
        ebn:
        update_option("\155\157\137\163\141\x6d\x6c\137\x6d\x65\163\163\141\147\145", "\x50\154\x65\x61\163\145\x20\160\162\x6f\166\x69\x64\x65\40\141\40\x76\x61\154\x69\x64\40\x6d\145\164\141\144\x61\164\141\x20\x66\151\154\x65\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        caR:
        goto sKK;
        fXn:
        $DT = new IDPMetadataReader($zl);
        $Qm = $DT->getIdentityProviders();
        if (empty($Qm)) {
            goto LM;
        }
        $Oc = SAMLSPUtilities::mo_saml_upload_idp_metadata_validations($Qm);
        if (!$Oc) {
            goto s8;
        }
        return;
        s8:
        goto HB;
        LM:
        if (empty($_FILES["\x6d\x65\164\141\144\141\164\141\x5f\146\151\x6c\x65"]) && "\125\x70\x6c\x6f\x61\144" === $hh) {
            goto Us;
        }
        update_option("\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x6d\x65\x73\x73\141\x67\145", "\x50\x6c\x65\x61\x73\x65\40\160\x72\x6f\166\x69\144\145\40\x61\x20\x76\x61\x6c\151\144\40\155\x65\x74\141\144\x61\164\x61\40\x61\156\144\40\x63\150\145\x63\x6b\40\x79\x6f\x75\x72\x20\111\104\120\40\143\x6f\x6e\146\x69\x67\x75\x72\141\164\x69\157\156\x20\141\147\x61\x69\156\56");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        goto Nr;
        Us:
        update_option("\x6d\x6f\x5f\163\x61\x6d\154\137\x6d\145\x73\x73\141\147\145", "\120\x6c\x65\141\x73\145\40\x70\162\157\x76\x69\x64\145\x20\x61\40\x76\141\x6c\x69\144\40\155\x65\164\141\144\x61\164\x61\40\146\151\x6c\145\x2e");
        SAMLSPUtilities::mo_saml_show_error_message();
        return;
        Nr:
        HB:
        $KI = EnvironmentHelper::getOptionForSelectedEnvironment("\x73\141\x6d\x6c\x5f\151\x64\x65\x6e\164\151\x74\171\137\160\x72\157\x76\x69\144\145\x72\163", true);
        foreach ($Qm as $ni => $tX) {
            $Le = $tX->getIdpName();
            if (!empty($Le)) {
                goto kz;
            }
            if (!empty($fx)) {
                goto rC;
            }
            if (!empty($_POST["\163\141\x6d\x6c\x5f\151\x64\145\156\164\151\x74\171\x5f\x6d\145\164\x61\144\x61\x74\141\x5f\160\x72\x6f\x76\x69\x64\x65\x72"])) {
                goto KY;
            }
            return;
            goto HZ;
            KY:
            $Le = $_POST["\x73\x61\155\154\x5f\x69\144\145\x6e\164\x69\x74\171\137\155\x65\164\141\x64\x61\x74\141\x5f\160\162\157\166\151\144\x65\x72"];
            HZ:
            goto iQ;
            rC:
            $Le = $fx;
            iQ:
            kz:
            $Le = str_replace("\x20", "\137", $Le);
            if (!$YD) {
                goto Ar;
            }
            $x_ = $tX->getSigningCertificate();
            if (!is_array($x_)) {
                goto Yl;
            }
            foreach ($x_ as $ni => $SE) {
                $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE);
                Sn:
            }
            kH:
            Yl:
            $Z8 = array("\x78\x35\x30\71\x5f\x63\x65\162\x74\151\x66\151\143\141\164\145" => $x_);
            goto ga;
            Ar:
            $Z8 = $this->fetchMetadata($tX, $Le);
            ga:
            $vN = new EnvironmentDao();
            if (!(0 === count($KI))) {
                goto pV;
            }
            $vN->mo_save_environment_settings("\163\x61\155\x6c\137\x64\x65\146\141\x75\154\x74\x5f\151\x64\x70", $Le);
            pV:
            if (empty($KI[$Le])) {
                goto tz;
            }
            $Z8 = SAMLSPUtilities::mo_saml_array_merge($KI[$Le], $Z8);
            tz:
            $KI[$Le] = $Z8;
            if (empty($KI[''])) {
                goto gY;
            }
            unset($KI['']);
            gY:
            $vN->mo_save_environment_settings("\163\x61\155\x6c\x5f\x69\144\145\x6e\x74\151\x74\171\137\160\x72\x6f\x76\x69\144\145\x72\x73", $KI);
            NQ:
        }
        Gn:
        update_option("\155\157\137\x73\141\155\154\x5f\155\x65\163\163\x61\x67\x65", "\111\144\x65\156\164\151\x74\171\x20\x50\162\x6f\x76\151\144\x65\x72\40\144\x65\x74\141\151\154\x73\40\x72\x65\x74\162\x69\145\166\x65\x64\40\x73\165\143\x63\x65\x73\x73\x66\x75\x6c\x6c\171\56");
        SAMLSPUtilities::mo_saml_show_success_message();
        sKK:
    }
    function fetchMetadata($tX, $Le)
    {
        $Vz = '';
        $yM = '';
        $xU = '';
        $nf = '';
        $qV = '';
        $gs = '';
        $VI = '';
        $Uv = array("\x63\165\x73\x74\x6f\155\137\x6c\157\147\x69\156\137\x74\145\x78\164" => $Vz, "\143\x75\163\164\157\155\137\x67\x72\145\145\164\x69\x6e\x67\137\x74\x65\170\x74" => $yM, "\147\x72\x65\145\164\151\x6e\x67\x5f\x6e\141\155\x65" => $xU, "\143\165\163\164\157\155\137\154\x6f\x67\157\x75\x74\137\x74\145\x78\x74" => $nf);
        $I_ = array("\x73\141\x6d\x6c\x5f\x72\x65\161\x75\145\x73\164" => $qV, "\163\x61\x6d\154\137\x72\145\163\x70\157\156\x73\145" => $gs, "\164\145\163\164\137\163\164\x61\164\165\x73" => $VI);
        $x6 = $tX->getLoginBindingType();
        $qC = $tX->getLoginURL(mo_saml_binding_type($x6));
        $QO = $tX->getLogoutBindingType();
        $pE = '';
        if (!$tX->getLogoutDetails()) {
            goto afO;
        }
        $pE = $tX->getLogoutURL(mo_saml_binding_type($QO));
        afO:
        $EZ = $tX->isRequestSigned() === "\164\162\x75\145" ? "\143\150\145\x63\x6b\x65\x64" : "\x75\x6e\143\x68\x65\x63\x6b\x65\144";
        $gz = $tX->getEntityID();
        $x_ = $tX->getSigningCertificate();
        if (!is_array($x_)) {
            goto pI_;
        }
        foreach ($x_ as $ni => $SE) {
            $x_[$ni] = SAMLSPUtilities::sanitize_certificate($SE);
            YVo:
        }
        hVn:
        pI_:
        $eS = $tX->getNameIdFormats();
        $KR = mo_options_enum_nameid_formats::UNSPECIFIED;
        if (empty($eS)) {
            goto ftm;
        }
        $ID = mo_options_enum_nameid_formats::getConstants();
        foreach ($eS as $ni => $SE) {
            $zZ = $eS[$ni];
            if (!in_array($zZ, $ID, true)) {
                goto McJ;
            }
            $KR = $zZ;
            goto DrY;
            McJ:
            Erg:
        }
        DrY:
        ftm:
        $Z8 = array("\151\x64\160\137\x6e\x61\x6d\145" => $Le, "\163\163\x6f\x5f\x62\151\156\x64\x69\x6e\x67\137\164\x79\x70\x65" => $x6, "\x73\x73\x6f\x5f\165\162\x6c" => $qC, "\x73\x6c\157\137\142\151\x6e\x64\151\x6e\147\x5f\164\171\160\145" => $QO, "\x73\x6c\157\137\165\x72\154" => $pE, "\x69\x64\160\137\145\x6e\x74\x69\x74\171\137\x69\144" => $gz, "\156\141\155\145\151\x64\137\x66\157\162\155\141\164" => $KR, "\x78\65\x30\x39\137\x63\145\x72\164\x69\146\x69\143\x61\164\145" => $x_, "\x72\x65\x73\160\x6f\156\x73\x65\137\x73\x69\x67\156\x65\x64" => "\x63\150\145\143\153\145\x64", "\141\x73\x73\x65\x72\x74\151\157\156\137\163\x69\147\x6e\x65\144" => "\x63\x68\145\x63\153\145\x64", "\x72\145\x71\165\145\163\164\x5f\163\151\147\156\x65\x64" => $EZ, "\155\x6f\x5f\163\141\155\154\137\145\x6e\x63\x6f\144\x69\x6e\x67\x5f\x65\x6e\141\142\154\145\x64" => "\143\150\145\x63\153\145\x64", "\145\156\141\142\x6c\145\x5f\x69\144\x70" => true);
        $Z8 = SAMLSPUtilities::mo_saml_array_merge($Z8, $Uv);
        $Z8 = SAMLSPUtilities::mo_saml_array_merge($Z8, $I_);
        return $Z8;
    }
    function checkPasswordPattern($Y3)
    {
        $yX = "\57\136\133\x28\134\x77\x29\x2a\50\134\41\x5c\100\x5c\43\134\x24\x5c\x25\x5c\x5e\x5c\x26\134\x2a\134\56\x5c\x2d\x5c\x5f\x29\52\x5d\x2b\44\x2f";
        return !preg_match($yX, $Y3);
    }
    function mo_saml_parse_expiry_date($yC)
    {
        $Ah = new DateTime($yC);
        $dd = $Ah->getTimestamp();
        return date("\x46\x20\152\54\40\x59", $dd);
    }
    function is_license_expired($g_)
    {
        $Ah = new DateTime($g_);
        $eo = new DateTime();
        if ($eo > $Ah) {
            goto GkO;
        }
        return false;
        goto FlR;
        GkO:
        return true;
        FlR:
    }
}
function mo_saml_binding_type($Yi)
{
    if ($Yi == "\110\164\164\x70\122\x65\144\151\x72\x65\x63\164") {
        goto kjN;
    }
    return "\110\124\x54\120\55\120\117\123\x54";
    goto Rw7;
    kjN:
    return "\x48\124\124\120\55\122\145\x64\151\x72\145\x63\164";
    Rw7:
}
Mo_SAML_Plugin::mo_saml_get_object();

Function Calls

None

Variables

None

Stats

MD5 265aae77276a070d246032d252a5d34c
Eval Count 0
Decode Time 174 ms