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 /* Plugin Name: miniOrange SSO using SAML 2.0 Plugin URI: http://miniorange.com/ ..
Decoded Output download
<?php
/*
Plugin Name: miniOrange SSO using SAML 2.0
Plugin URI: http://miniorange.com/
Description: miniOrange SAML 2.0 SSO enables user to perform Single Sign On with any SAML 2.0 enabled Identity Provider.
Version: 11.2.0
Author: miniOrange
Author URI: http://miniorange.com/
*/
include_once dirname(__FILE__) . "/mo_login_saml_sso_widget.php";
require "mo-saml-class-customer.php";
require "mo_saml_settings_page.php";
require "MetadataReader.php";
require "certificate_utility.php";
class saml_mo_login
{
function __construct()
{
add_action("admin_menu", array($this, "miniorange_sso_menu"));
add_action("admin_init", array($this, "miniorange_login_widget_saml_save_settings"));
add_action("admin_enqueue_scripts", array($this, "plugin_settings_style"));
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_action("wp_authenticate", array($this, "mo_saml_authenticate"));
add_action("wp", array($this, "mo_saml_auto_redirect"));
$hP = new mo_login_wid();
add_action("wp_logout", array($hP, "mo_saml_logout"));
add_action("login_form", array($this, "mo_saml_modify_login_form"));
add_shortcode("MO_SAML_FORM", array($this, "mo_get_saml_shortcode"));
add_filter("cron_schedules", array($this, "myprefix_add_cron_schedule"));
add_action("metadata_sync_cron_action", array($this, "metadata_sync_cron_action"));
}
function myprefix_add_cron_schedule($m0)
{
$m0["weekly"] = array("interval" => 604800, "display" => __("Once Weekly"));
$m0["monthly"] = array("interval" => 2635200, "display" => __("Once Monthly"));
return $m0;
}
function metadata_sync_cron_action()
{
error_log("miniorange : RAN SYNC - " . time());
$this->upload_metadata(@file_get_contents(get_option("saml_metadata_url_for_sync")));
}
function mo_login_widget_saml_options()
{
global $wpdb;
update_option("mo_saml_host_name", "https://auth.miniorange.com");
$tB = get_option("mo_saml_host_name");
$cZ = get_option("mo_saml_enable_cloud_broker");
$hI = get_option("saml_x509_certificate");
if (empty($cZ) && !empty($hI)) {
goto e9;
}
if (!empty($cZ)) {
goto ES;
}
update_option("mo_saml_enable_cloud_broker", "false");
ES:
goto ec;
e9:
update_option("mo_saml_enable_cloud_broker", "true");
ec:
mo_register_saml_sso();
}
function mo_saml_success_message()
{
$S0 = "error";
$Rj = get_option("mo_saml_message");
echo "<div class='" . $S0 . "'> <p>" . $Rj . "</p></div>";
}
function mo_saml_error_message()
{
$S0 = "updated";
$Rj = get_option("mo_saml_message");
echo "<div class='" . $S0 . "'> <p>" . $Rj . "</p></div>";
}
public function mo_sso_saml_deactivate()
{
if (!is_multisite()) {
goto Gh;
}
global $wpdb;
$aU = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
$CX = get_current_blog_id();
do_action("flush_cache");
foreach ($aU as $blog_id) {
switch_to_blog($blog_id);
delete_option("mo_saml_host_name");
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("vl_check_t");
delete_option("vl_check_s");
nz:
}
qN:
switch_to_blog($CX);
goto OO;
Gh:
do_action("flush_cache");
delete_option("mo_saml_host_name");
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("mo_saml_enable_cloud_broker");
delete_option("vl_check_t");
delete_option("vl_check_s");
OO:
}
private function mo_saml_show_success_message()
{
remove_action("admin_notices", array($this, "mo_saml_success_message"));
add_action("admin_notices", array($this, "mo_saml_error_message"));
}
function mo_saml_show_error_message()
{
remove_action("admin_notices", array($this, "mo_saml_error_message"));
add_action("admin_notices", array($this, "mo_saml_success_message"));
}
function plugin_settings_style($ar)
{
if (!("toplevel_page_mo_saml_settings" != $ar)) {
goto ub;
}
return;
ub:
wp_enqueue_style("mo_saml_admin_settings_style", plugins_url("includes/css/style_settings.min.css?ver=11.2.0", __FILE__));
wp_enqueue_style("mo_saml_admin_settings_phone_style", plugins_url("includes/css/phone.min.css", __FILE__));
wp_enqueue_style("mo_saml_wpb-fa", plugins_url("includes/css/font-awesome.min.css", __FILE__));
}
function plugin_settings_script($ar)
{
if (!("toplevel_page_mo_saml_settings" != $ar)) {
goto FG;
}
return;
FG:
wp_enqueue_script("jquery");
wp_enqueue_script("mo_saml_admin_settings_script", plugins_url("includes/js/settings.min.js", __FILE__));
wp_enqueue_script("mo_saml_admin_settings_phone_script", plugins_url("includes/js/phone.min.js", __FILE__));
}
function miniorange_login_widget_saml_save_settings()
{
if (!current_user_can("manage_options")) {
goto uz;
}
if (!(isset($_POST["option"]) and $_POST["option"] == "login_widget_saml_save_settings")) {
goto BX;
}
if (mo_saml_is_curl_installed()) {
goto r3;
}
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.");
$this->mo_saml_show_error_message();
return;
r3:
$K1 = '';
$Dc = '';
$A7 = '';
$fu = '';
$h_ = '';
$Bt = '';
$gf = '';
$kl = '';
if ($this->mo_saml_check_empty_or_null($_POST["saml_identity_name"]) || $this->mo_saml_check_empty_or_null($_POST["saml_login_url"]) || $this->mo_saml_check_empty_or_null($_POST["saml_issuer"])) {
goto zf;
}
if (!preg_match("/^\w*$/", $_POST["saml_identity_name"])) {
goto ju;
}
$K1 = trim($_POST["saml_identity_name"]);
$A7 = trim($_POST["saml_login_url"]);
if (!array_key_exists("saml_login_binding_type", $_POST)) {
goto yd;
}
$Dc = $_POST["saml_login_binding_type"];
yd:
if (!array_key_exists("saml_logout_binding_type", $_POST)) {
goto n3;
}
$fu = $_POST["saml_logout_binding_type"];
n3:
if (!array_key_exists("saml_logout_url", $_POST)) {
goto V0;
}
$h_ = trim($_POST["saml_logout_url"]);
V0:
$Bt = trim($_POST["saml_issuer"]);
$gf = $_POST["saml_x509_certificate"];
goto xr;
ju:
update_option("mo_saml_message", "Please match the requested format for Identity Provider Name. Only alphabets, numbers and underscore is allowed.");
$this->mo_saml_show_error_message();
return;
xr:
goto kV;
zf:
update_option("mo_saml_message", "All the fields are required. Please enter valid entries.");
$this->mo_saml_show_error_message();
return;
kV:
update_option("saml_identity_name", $K1);
update_option("saml_login_binding_type", $Dc);
update_option("saml_login_url", $A7);
update_option("saml_logout_binding_type", $fu);
update_option("saml_logout_url", $h_);
update_option("saml_issuer", $Bt);
if (isset($_POST["saml_request_signed"])) {
goto dr;
}
update_option("saml_request_signed", "unchecked");
goto tj;
dr:
update_option("saml_request_signed", "checked");
tj:
foreach ($gf as $h7 => $pU) {
if (empty($pU)) {
goto vO;
}
$gf[$h7] = SAMLSPUtilities::sanitize_certificate($pU);
if (@openssl_x509_read($gf[$h7])) {
goto vC;
}
update_option("mo_saml_message", "Invalid certificate: Please provide a valid certificate.");
$this->mo_saml_show_error_message();
delete_option("saml_x509_certificate");
return;
vC:
goto zv;
vO:
unset($gf[$h7]);
zv:
zt:
}
Ny:
if (!empty($gf)) {
goto xm;
}
update_option("mo_saml_message", "Invalid Certificate:Please provide a certificate");
$this->mo_saml_show_error_message();
return;
xm:
update_option("saml_x509_certificate", maybe_serialize($gf));
if (isset($_POST["saml_response_signed"])) {
goto b0;
}
update_option("saml_response_signed", "Yes");
goto bx;
b0:
update_option("saml_response_signed", "checked");
bx:
if (isset($_POST["saml_assertion_signed"])) {
goto Y8;
}
update_option("saml_assertion_signed", "Yes");
goto Vk;
Y8:
update_option("saml_assertion_signed", "checked");
Vk:
if (get_option("mo_saml_enable_cloud_broker") == "true") {
goto Tm;
}
update_option("mo_saml_message", "Identity Provider details saved successfully.");
$this->mo_saml_show_success_message();
goto BM;
Tm:
$FH = new Customersaml();
$QQ = json_decode($FH->save_external_idp_config(), true);
if (@openssl_x509_read($QQ["samlX509Certificate"])) {
goto Cn;
}
update_option("mo_saml_message", "Invalid Certificate format. Please enter a valid certificate.");
$this->mo_saml_show_error_message();
delete_option("saml_x509_certificate");
return;
Cn:
if (isset($QQ["customerId"])) {
goto Fr;
}
update_option("mo_saml_message", "Identity Provider details could not be saved. Please try again.");
$this->mo_saml_show_error_message();
goto l9;
Fr:
update_option("saml_x509_certificate", maybe_serialize(array($QQ["samlX509Certificate"])));
update_option("mo_saml_message", "Identity Provider details saved successfully.");
$this->mo_saml_show_success_message();
l9:
BM:
BX:
if (!(isset($_POST["option"]) and $_POST["option"] == "login_widget_saml_attribute_mapping")) {
goto Cw;
}
if (mo_saml_is_curl_installed()) {
goto xu;
}
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.");
$this->mo_saml_show_error_message();
return;
xu:
update_option("saml_am_username", stripslashes($_POST["saml_am_username"]));
update_option("saml_am_email", stripslashes($_POST["saml_am_email"]));
update_option("saml_am_first_name", stripslashes($_POST["saml_am_first_name"]));
update_option("saml_am_last_name", stripslashes($_POST["saml_am_last_name"]));
update_option("saml_am_group_name", stripslashes($_POST["saml_am_group_name"]));
update_option("saml_am_account_matcher", stripslashes($_POST["saml_am_account_matcher"]));
update_option("saml_am_display_name", stripslashes($_POST["saml_am_display_name"]));
$WN = array();
$ff = 0;
foreach ($_POST as $h7 => $pU) {
if (!(strpos($h7, "mo_saml_custom_attribute_key") !== false && !empty($_POST[$h7]))) {
goto kd;
}
$ff++;
$xE = "mo_saml_custom_attribute_value_" . $ff;
$WN[$pU] = $_POST[$xE];
kd:
Y7:
}
GA:
if (empty($WN)) {
goto za;
}
update_option("mo_saml_custom_attrs_mapping", $WN);
za:
update_option("mo_saml_message", "Attribute Mapping details saved successfully");
$this->mo_saml_show_success_message();
Cw:
if (!(isset($_POST["option"]) and $_POST["option"] == "login_widget_saml_role_mapping")) {
goto AG;
}
if (mo_saml_is_curl_installed()) {
goto mD;
}
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.");
$this->mo_saml_show_error_message();
return;
mD:
if (!isset($_POST["saml_am_default_user_role"])) {
goto rh;
}
$mc = $_POST["saml_am_default_user_role"];
update_option("saml_am_default_user_role", $mc);
rh:
if (isset($_POST["saml_am_dont_allow_unlisted_user_role"])) {
goto eR;
}
update_option("saml_am_dont_allow_unlisted_user_role", "unchecked");
goto EM;
eR:
update_option("saml_am_default_user_role", false);
update_option("saml_am_dont_allow_unlisted_user_role", "checked");
EM:
if (isset($_POST["mo_saml_dont_create_user_if_role_not_mapped"])) {
goto ip;
}
update_option("mo_saml_dont_create_user_if_role_not_mapped", "unchecked");
goto yc;
ip:
update_option("mo_saml_dont_create_user_if_role_not_mapped", "checked");
update_option("saml_am_default_user_role", false);
update_option("saml_am_dont_allow_unlisted_user_role", "unchecked");
yc:
if (isset($_POST["mo_saml_dont_update_existing_user_role"])) {
goto Xx;
}
update_option("saml_am_dont_update_existing_user_role", "unchecked");
goto T5;
Xx:
update_option("saml_am_dont_update_existing_user_role", "checked");
T5:
$UO = new WP_Roles();
$ao = $UO->get_names();
$ur;
foreach ($ao as $ty => $Fk) {
$Og = "saml_am_group_attr_values_" . $ty;
$ur[$ty] = stripslashes($_POST[$Og]);
Qq:
}
UC:
update_option("saml_am_role_mapping", $ur);
update_option("mo_saml_message", "Role Mapping details saved successfully.");
$this->mo_saml_show_success_message();
AG:
if (!(isset($_POST["option"]) and $_POST["option"] == "mo_saml_update_idp_settings_option")) {
goto Ca;
}
if (!(isset($_POST["mo_saml_sp_base_url"]) && isset($_POST["mo_saml_sp_entity_id"]))) {
goto eT;
}
$xR = sanitize_text_field($_POST["mo_saml_sp_base_url"]);
$Fx = sanitize_text_field($_POST["mo_saml_sp_entity_id"]);
if (!(substr($xR, -1) == "/")) {
goto Rj;
}
$xR = substr($xR, 0, -1);
Rj:
update_option("mo_saml_sp_base_url", $xR);
update_option("mo_saml_sp_entity_id", $Fx);
eT:
update_option("mo_saml_message", "Settings updated successfully.");
$this->mo_saml_show_success_message();
Ca:
if (!(isset($_POST["option"]) and $_POST["option"] == "saml_upload_metadata")) {
goto YZ;
}
if (function_exists("wp_handle_upload")) {
goto no;
}
require_once ABSPATH . "wp-admin/includes/file.php";
no:
$this->_handle_upload_metadata();
YZ:
if (!(isset($_POST["option"]) and $_POST["option"] == "mo_saml_relay_state_option")) {
goto zb;
}
$AZ = sanitize_text_field($_POST["mo_saml_relay_state"]);
update_option("mo_saml_relay_state", $AZ);
update_option("mo_saml_message", "Relay State updated successfully.");
$this->mo_saml_show_success_message();
zb:
if (!(isset($_POST["option"]) and $_POST["option"] == "saml_generate_certificate")) {
goto bV;
}
$ys = array("countryName" => $_POST["country"], "stateOrProvinceName" => $_POST["state"], "localityName" => $_POST["locality"], "organizationName" => $_POST["org"], "organizationalUnitName" => $_POST["org_unit"], "commonName" => $_POST["cn"], "emailAddress" => $_POST["email"]);
$Kb = array("digest_alg" => $_POST["hash_algorithm"], "x509_extensions" => "v3_ca", "private_key_bits" => 2048, "private_key_type" => OPENSSL_KEYTYPE_RSA, "encrypt_key" => false);
$jr = CertificateUtility::generate_certificate($ys, $Kb, (int) $_POST["expiry_days"]);
$MA = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
$El = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$hk = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt.backup";
if (file_exists($hk)) {
goto J2;
}
$Pj = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key.backup";
copy($MA, $hk);
copy($El, $Pj);
J2:
$JC = file_put_contents($MA, $jr["public_key"]);
$JC = $JC && file_put_contents($El, $jr["private_key"]);
if ($JC) {
goto Ym;
}
update_option("mo_saml_message", "Error occured while generating the certificates. See PHP error logs and make sure have set write permission.");
$this->mo_saml_show_error_message();
goto cg;
Ym:
update_option("mo_saml_message", "New certificates generated successfully.");
$this->mo_saml_show_success_message();
cg:
bV:
if (!(isset($_POST["option"]) and $_POST["option"] == "mo_saml_register_customer")) {
goto rm;
}
if (mo_saml_is_curl_installed()) {
goto Rq;
}
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.");
$this->mo_saml_show_error_message();
return;
Rq:
$oK = '';
$fm = '';
$oL = '';
$OL = '';
if ($this->mo_saml_check_empty_or_null($_POST["email"]) || $this->mo_saml_check_empty_or_null($_POST["password"]) || $this->mo_saml_check_empty_or_null($_POST["confirmPassword"])) {
goto H7;
}
if (strlen($_POST["password"]) < 6 || strlen($_POST["confirmPassword"]) < 6) {
goto TF;
}
$oK = sanitize_email($_POST["email"]);
$fm = sanitize_text_field($_POST["phone"]);
$oL = sanitize_text_field($_POST["password"]);
$OL = sanitize_text_field($_POST["confirmPassword"]);
goto IP;
TF:
update_option("mo_saml_message", "Choose a password with minimum length 6.");
$this->mo_saml_show_error_message();
return;
IP:
goto Pf;
H7:
update_option("mo_saml_message", "All the fields are required. Please enter valid entries.");
$this->mo_saml_show_error_message();
return;
Pf:
update_option("mo_saml_admin_email", $oK);
update_option("mo_saml_admin_phone", $fm);
if (strcmp($oL, $OL) == 0) {
goto up;
}
update_option("mo_saml_message", "Passwords do not match.");
delete_option("mo_saml_verify_customer");
$this->mo_saml_show_error_message();
goto cj;
up:
update_option("mo_saml_admin_password", $oL);
$oK = get_option("mo_saml_admin_email");
$di = new CustomerSaml();
$F5 = json_decode($di->check_customer(), true);
if (strcasecmp($F5["status"], "CUSTOMER_NOT_FOUND") == 0) {
goto yl;
}
$this->get_current_customer();
goto kn;
yl:
$F5 = json_decode($di->send_otp_token($oK, ''), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto gW;
}
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");
$this->mo_saml_show_error_message();
goto eo;
gW:
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", $F5["txId"]);
update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_EMAIL");
$this->mo_saml_show_success_message();
eo:
kn:
cj:
rm:
if (!(isset($_POST["option"]) and $_POST["option"] == "mo_saml_validate_otp")) {
goto cd;
}
if (mo_saml_is_curl_installed()) {
goto q0;
}
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.");
$this->mo_saml_show_error_message();
return;
q0:
$r5 = '';
if ($this->mo_saml_check_empty_or_null($_POST["otp_token"])) {
goto xW;
}
$r5 = sanitize_text_field($_POST["otp_token"]);
goto GE;
xW:
update_option("mo_saml_message", "Please enter a value in otp field.");
$this->mo_saml_show_error_message();
return;
GE:
$di = new CustomerSaml();
$F5 = json_decode($di->validate_otp_token(get_option("mo_saml_transactionId"), $r5), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto T4;
}
update_option("mo_saml_message", "Invalid one time passcode. Please enter a valid otp.");
$this->mo_saml_show_error_message();
goto dY;
T4:
$this->create_customer();
dY:
cd:
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_verify_customer") {
goto R8;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_contact_us_query_option") {
goto MC;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_resend_otp_email") {
goto EV;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_resend_otp_phone") {
goto bG;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_go_back") {
goto NJ;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_register_with_phone_option") {
goto GY;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_registered_only_access_option") {
goto Ix;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_force_authentication_option") {
goto fR;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_enable_rss_access_option") {
goto pE;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_enable_login_redirect_option") {
goto ZU;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_enable_cloud_broker") {
goto s6;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_allow_wp_signin_option") {
goto t0;
}
if (isset($_POST["option"]) and $_POST["option"] == "mo_saml_save_proxy_setting") {
goto ED;
}
if (!(isset($_POST["option"]) && $_POST["option"] == "mo_saml_forgot_password_form_option")) {
goto Re;
}
if (mo_saml_is_curl_installed()) {
goto mb;
}
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.");
$this->mo_saml_show_error_message();
return;
mb:
$oK = get_option("mo_saml_admin_email");
$di = new Customersaml();
$F5 = json_decode($di->mo_saml_forgot_password($oK), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto js;
}
update_option("mo_saml_message", "An error occured while processing your request. Please Try again.");
$this->mo_saml_show_error_message();
goto QD;
js:
update_option("mo_saml_message", "Your password has been reset successfully. Please enter the new password sent to " . $oK . ".");
$this->mo_saml_show_success_message();
QD:
Re:
goto nq;
ED:
update_option("mo_proxy_host", $_POST["mo_proxy_host"]);
update_option("mo_proxy_port", $_POST["mo_proxy_port"]);
update_option("mo_proxy_username", $_POST["mo_proxy_username"]);
update_option("mo_proxy_password", $_POST["mo_proxy_password"]);
update_option("mo_saml_message", "Proxy settings saved successfully");
$this->mo_saml_show_success_message();
nq:
goto ZI;
t0:
if (array_key_exists("mo_saml_allow_wp_signin", $_POST)) {
goto ee;
}
$gN = "false";
goto EH;
ee:
$gN = $_POST["mo_saml_allow_wp_signin"];
EH:
if ($gN == "true") {
goto fF;
}
update_option("mo_saml_allow_wp_signin", '');
goto Oz;
fF:
update_option("mo_saml_allow_wp_signin", "true");
Oz:
update_option("mo_saml_message", "Sign In settings updated.");
$this->mo_saml_show_success_message();
ZI:
goto Q9;
s6:
if (array_key_exists("mo_saml_enable_cloud_broker", $_POST)) {
goto KM;
}
$ns = "false";
goto N5;
KM:
$ns = $_POST["mo_saml_enable_cloud_broker"];
N5:
if ($ns == "true") {
goto E6;
}
update_option("mo_saml_enable_cloud_broker", "false");
goto yY;
E6:
update_option("mo_saml_enable_cloud_broker", "true");
yY:
update_option("mo_saml_message", "Sign in options updated.");
$this->mo_saml_show_success_message();
Q9:
goto SR;
ZU:
if (mo_saml_is_sp_configured()) {
goto uH;
}
update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first.");
$this->mo_saml_show_error_message();
goto Lc;
uH:
if (array_key_exists("mo_saml_enable_login_redirect", $_POST)) {
goto ii;
}
$ns = "false";
goto cE;
ii:
$ns = $_POST["mo_saml_enable_login_redirect"];
cE:
if ($ns == "true") {
goto Cf;
}
update_option("mo_saml_enable_login_redirect", '');
update_option("mo_saml_allow_wp_signin", '');
goto Nu;
Cf:
update_option("mo_saml_enable_login_redirect", "true");
update_option("mo_saml_allow_wp_signin", "true");
Nu:
update_option("mo_saml_message", "Sign in options updated.");
$this->mo_saml_show_success_message();
Lc:
SR:
goto yn;
pE:
if (mo_saml_is_sp_configured()) {
goto SG;
}
update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first.");
$this->mo_saml_show_error_message();
goto HE;
SG:
if (array_key_exists("mo_saml_enable_rss_access", $_POST)) {
goto Tb;
}
$GN = false;
goto k3;
Tb:
$GN = $_POST["mo_saml_enable_rss_access"];
k3:
if ($GN == "true") {
goto Jm;
}
update_option("mo_saml_enable_rss_access", '');
goto Mo;
Jm:
update_option("mo_saml_enable_rss_access", "true");
Mo:
update_option("mo_saml_message", "RSS Feed option updated.");
$this->mo_saml_show_success_message();
HE:
yn:
goto s0;
fR:
if (mo_saml_is_sp_configured()) {
goto os;
}
update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first.");
$this->mo_saml_show_error_message();
goto OD;
os:
if (array_key_exists("mo_saml_force_authentication", $_POST)) {
goto Xk;
}
$ns = "false";
goto t5;
Xk:
$ns = $_POST["mo_saml_force_authentication"];
t5:
if ($ns == "true") {
goto sA;
}
update_option("mo_saml_force_authentication", '');
goto LO;
sA:
update_option("mo_saml_force_authentication", "true");
LO:
update_option("mo_saml_message", "Sign in options updated.");
$this->mo_saml_show_success_message();
OD:
s0:
goto hh;
Ix:
if (mo_saml_is_sp_configured()) {
goto Vt;
}
update_option("mo_saml_message", "Please complete <a href="" . add_query_arg(array("tab" => "save"), $_SERVER["REQUEST_URI"]) . "" />Service Provider</a> configuration first.");
$this->mo_saml_show_error_message();
goto st;
Vt:
if (array_key_exists("mo_saml_registered_only_access", $_POST)) {
goto kW;
}
$ns = "false";
goto tA;
kW:
$ns = $_POST["mo_saml_registered_only_access"];
tA:
if ($ns == "true") {
goto xy;
}
update_option("mo_saml_registered_only_access", '');
goto LG;
xy:
update_option("mo_saml_registered_only_access", "true");
LG:
update_option("mo_saml_message", "Sign in options updated.");
$this->mo_saml_show_success_message();
st:
hh:
goto gd;
GY:
if (mo_saml_is_curl_installed()) {
goto iG;
}
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.");
$this->mo_saml_show_error_message();
return;
iG:
$fm = sanitize_text_field($_POST["phone"]);
$fm = str_replace(" ", '', $fm);
$fm = str_replace("-", '', $fm);
update_option("mo_saml_admin_phone", $fm);
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token('', $fm, FALSE, TRUE), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto pn;
}
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");
$this->mo_saml_show_error_message();
goto r7;
pn:
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", $F5["txId"]);
update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_PHONE");
$this->mo_saml_show_success_message();
r7:
gd:
goto co;
NJ:
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");
delete_site_option("sml_lk");
delete_site_option("t_site_status");
delete_site_option("site_ck_l");
co:
goto qQ;
bG:
if (mo_saml_is_curl_installed()) {
goto NX;
}
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.");
$this->mo_saml_show_error_message();
return;
NX:
$fm = get_option("mo_saml_admin_phone");
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token('', $fm, FALSE, TRUE), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto ts;
}
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");
$this->mo_saml_show_error_message();
goto ds;
ts:
update_option("mo_saml_message", " A one time passcode is sent to " . $fm . " again. Please check if you got the otp and enter it here.");
update_option("mo_saml_transactionId", $F5["txId"]);
update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_PHONE");
$this->mo_saml_show_success_message();
ds:
qQ:
goto ZT;
EV:
if (mo_saml_is_curl_installed()) {
goto Hg;
}
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.");
$this->mo_saml_show_error_message();
return;
Hg:
$oK = get_option("mo_saml_admin_email");
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token($oK, ''), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto cn;
}
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");
$this->mo_saml_show_error_message();
goto FH;
cn:
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", $F5["txId"]);
update_option("mo_saml_registration_status", "MO_OTP_DELIVERED_SUCCESS_EMAIL");
$this->mo_saml_show_success_message();
FH:
ZT:
goto vJ;
MC:
if (mo_saml_is_curl_installed()) {
goto uP;
}
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.");
$this->mo_saml_show_error_message();
return;
uP:
$oK = $_POST["mo_saml_contact_us_email"];
$fm = $_POST["mo_saml_contact_us_phone"];
$Mh = $_POST["mo_saml_contact_us_query"];
$di = new CustomerSaml();
if ($this->mo_saml_check_empty_or_null($oK) || $this->mo_saml_check_empty_or_null($Mh)) {
goto KT;
}
$OJ = $di->submit_contact_us($oK, $fm, $Mh);
if ($OJ == false) {
goto u4;
}
update_option("mo_saml_message", "Thanks for getting in touch! We shall get back to you shortly.");
$this->mo_saml_show_success_message();
goto al;
u4:
update_option("mo_saml_message", "Your query could not be submitted. Please try again.");
$this->mo_saml_show_error_message();
al:
goto zc;
KT:
update_option("mo_saml_message", "Please fill up Email and Query fields to submit your query.");
$this->mo_saml_show_error_message();
zc:
vJ:
goto KC;
R8:
if (mo_saml_is_curl_installed()) {
goto mL;
}
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.");
$this->mo_saml_show_error_message();
return;
mL:
$oK = '';
$oL = '';
if ($this->mo_saml_check_empty_or_null($_POST["email"]) || $this->mo_saml_check_empty_or_null($_POST["password"])) {
goto is;
}
$oK = sanitize_email($_POST["email"]);
$oL = sanitize_text_field($_POST["password"]);
goto L2;
is:
update_option("mo_saml_message", "All the fields are required. Please enter valid entries.");
$this->mo_saml_show_error_message();
return;
L2:
update_option("mo_saml_admin_email", $oK);
update_option("mo_saml_admin_password", $oL);
$di = new Customersaml();
$F5 = $di->get_customer_key();
$Y2 = json_decode($F5, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto iH;
}
update_option("mo_saml_message", "Invalid username or password. Please try again.");
$this->mo_saml_show_error_message();
goto m2;
iH:
update_option("mo_saml_admin_customer_key", $Y2["id"]);
update_option("mo_saml_admin_api_key", $Y2["apiKey"]);
update_option("mo_saml_customer_token", $Y2["token"]);
update_option("mo_saml_admin_phone", $Y2["phone"]);
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 aj;
}
$this->mo_saml_show_success_message();
goto qe;
aj:
$h7 = get_option("mo_saml_customer_token");
$NV = AESEncryption::decrypt_data(get_option("sml_lk"), $h7);
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
update_option("vl_check_t", time());
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto lj;
}
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");
$this->mo_saml_show_error_message();
goto zK;
lj:
$this->mo_saml_show_success_message();
zK:
qe:
m2:
update_option("mo_saml_admin_password", '');
KC:
if (!(isset($_POST["option"]) && $_POST["option"] == "mo_saml_verify_license")) {
goto rz;
}
if (!$this->mo_saml_check_empty_or_null($_POST["saml_licence_key"])) {
goto cN;
}
update_option("mo_saml_message", "All the fields are required. Please enter valid license key.");
$this->mo_saml_show_error_message();
return;
cN:
$NV = trim($_POST["saml_licence_key"]);
$di = new Customersaml();
$F5 = json_decode($di->check_customer_ln(), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto Iv;
}
$h7 = get_option("mo_saml_customer_token");
update_option("site_ck_l", AESEncryption::encrypt_data("false", $h7));
$g0 = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]);
update_option("mo_saml_message", "You have not upgraded yet. <a href="" . $g0 . "">Click here</a> to upgrade to premium version.");
$this->mo_saml_show_error_message();
goto g0;
Iv:
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
update_option("vl_check_t", time());
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto KP;
}
if (strcasecmp($F5["status"], "FAILED") == 0) {
goto Fl;
}
update_option("mo_saml_message", "An error occured while processing your request. Please Try again.");
$this->mo_saml_show_error_message();
goto vV;
Fl:
if (strcasecmp($F5["message"], "Code has Expired") == 0) {
goto EA;
}
update_option("mo_saml_message", "You have entered an invalid license key. Please enter a valid license key.");
goto vv;
EA:
$g0 = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]);
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 exausted all your keys then <a href="" . $g0 . "">Click here</a> to buy more.");
vv:
$this->mo_saml_show_error_message();
vV:
goto nQ;
KP:
$h7 = get_option("mo_saml_customer_token");
update_option("sml_lk", AESEncryption::encrypt_data($NV, $h7));
update_option("mo_saml_message", "Your license is verified. You can now setup the plugin.");
$h7 = get_option("mo_saml_customer_token");
update_option("site_ck_l", AESEncryption::encrypt_data("true", $h7));
update_option("t_site_status", AESEncryption::encrypt_data("false", $h7));
$this->mo_saml_show_success_message();
nQ:
g0:
rz:
if (!(isset($_POST["option"]) && $_POST["option"] == "mo_saml_free_trial")) {
goto UI;
}
if (decryptSamlElement()) {
goto pg;
}
$NV = postResponse();
$di = new Customersaml();
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto L6;
}
if (strcasecmp($F5["status"], "FAILED") == 0) {
goto kH;
}
update_option("mo_saml_message", "An error occured while processing your request. Please Try again.");
$this->mo_saml_show_error_message();
goto DI;
kH:
update_option("mo_saml_message", "There was an error activating your TRIAL version. Please contact [email protected] for getting new license for trial version.");
$this->mo_saml_show_error_message();
DI:
goto Am;
L6:
$h7 = get_option("mo_saml_customer_token");
$h7 = get_option("mo_saml_customer_token");
update_option("t_site_status", AESEncryption::encrypt_data("true", $h7));
update_option("mo_saml_message", "Your 5 days TRIAL is activated. You can now setup the plugin.");
$this->mo_saml_show_success_message();
Am:
goto D3;
pg:
update_option("mo_saml_message", "There was an error activating your TRIAL version. Either your trial period is expired or you are using wrong trial version. Please contact [email protected] for getting new license for trial version.");
$this->mo_saml_show_error_message();
D3:
UI:
if (!(isset($_POST["option"]) && $_POST["option"] == "mo_saml_check_license")) {
goto ul;
}
$di = new Customersaml();
$F5 = json_decode($di->check_customer_ln(), true);
if (strcasecmp($F5["status"], "SUCCESS") == 0) {
goto sH;
}
$h7 = get_option("mo_saml_customer_token");
update_option("site_ck_l", AESEncryption::encrypt_data("false", $h7));
$g0 = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]);
update_option("mo_saml_message", "You have not upgraded yet. <a href="" . $g0 . "">Click here</a> to upgrade to premium version.");
$this->mo_saml_show_error_message();
goto ID;
sH:
if (array_key_exists("licensePlan", $F5) && !$this->mo_saml_check_empty_or_null($F5["licensePlan"])) {
goto Qv;
}
$h7 = get_option("mo_saml_customer_token");
update_option("site_ck_l", AESEncryption::encrypt_data("false", $h7));
$g0 = add_query_arg(array("tab" => "licensing"), $_SERVER["REQUEST_URI"]);
update_option("mo_saml_message", "You have not upgraded yet. <a href="" . $g0 . "">Click here</a> to upgrade to premium version.");
$this->mo_saml_show_error_message();
goto v3;
Qv:
update_option("mo_saml_license_name", base64_encode($F5["licensePlan"]));
$h7 = get_option("mo_saml_customer_token");
if (!(array_key_exists("noOfUsers", $F5) && !$this->mo_saml_check_empty_or_null($F5["noOfUsers"]))) {
goto Pa;
}
update_option("mo_saml_usr_lmt", AESEncryption::encrypt_data($F5["noOfUsers"], $h7));
Pa:
update_option("site_ck_l", AESEncryption::encrypt_data("true", $h7));
$g0 = add_query_arg(array("tab" => "login"), $_SERVER["REQUEST_URI"]);
update_option("mo_saml_message", "You have successfully upgraded your license.");
$this->mo_saml_show_success_message();
v3:
ID:
ul:
if (!(isset($_POST["option"]) && $_POST["option"] == "mo_saml_remove_account")) {
goto kC;
}
$this->mo_sso_saml_deactivate();
add_option("mo_saml_registration_status", "removed_account");
$g0 = add_query_arg(array("tab" => "login"), $_SERVER["REQUEST_URI"]);
header("Location: " . $g0);
kC:
uz:
add_action("support_form", "support_form", 10, 3);
do_action("support_form");
if (mo_saml_is_trial_active()) {
goto dR;
}
if (site_check()) {
goto o_;
}
delete_option("mo_saml_enable_login_redirect");
delete_option("mo_saml_allow_wp_signin");
delete_option("mo_saml_registered_only_access");
delete_option("mo_saml_force_authentication");
o_:
goto u_;
dR:
if (!decryptSamlElement()) {
goto q8;
}
$h7 = get_option("mo_saml_customer_token");
update_option("t_site_status", AESEncryption::encrypt_data("false", $h7));
q8:
u_:
}
function create_customer()
{
$di = new CustomerSaml();
$Y2 = json_decode($di->create_customer(), true);
if (strcasecmp($Y2["status"], "CUSTOMER_USERNAME_ALREADY_EXISTS") == 0) {
goto iZ;
}
if (!(strcasecmp($Y2["status"], "SUCCESS") == 0)) {
goto HX;
}
update_option("mo_saml_admin_customer_key", $Y2["id"]);
update_option("mo_saml_admin_api_key", $Y2["apiKey"]);
update_option("mo_saml_customer_token", $Y2["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");
$this->mo_saml_show_success_message();
HX:
goto r6;
iZ:
$this->get_current_customer();
r6:
update_option("mo_saml_admin_password", '');
}
function get_current_customer()
{
$di = new CustomerSaml();
$F5 = $di->get_customer_key();
$Y2 = json_decode($F5, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto w5;
}
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");
$this->mo_saml_show_error_message();
goto pI;
w5:
update_option("mo_saml_admin_customer_key", $Y2["id"]);
update_option("mo_saml_admin_api_key", $Y2["apiKey"]);
update_option("mo_saml_customer_token", $Y2["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");
$this->mo_saml_show_success_message();
pI:
}
public function mo_saml_check_empty_or_null($pU)
{
if (!(!isset($pU) || empty($pU))) {
goto Mr;
}
return true;
Mr:
return false;
}
function miniorange_sso_menu()
{
$ar = 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");
}
function mo_saml_redirect_for_authentication($AZ)
{
if (!mo_saml_is_customer_license_key_verified()) {
goto gP;
}
if (get_option("mo_saml_enable_cloud_broker") == "false") {
goto g3;
}
$OQ = get_option("mo_saml_host_name") . "/moas/rest/saml/request?id=" . get_option("mo_saml_admin_customer_key") . "&returnurl=" . urlencode(home_url() . "/?option=readsamllogin&redirect_to=" . urlencode($AZ));
header("Location: " . $OQ);
die;
goto wN;
g3:
if (!(mo_saml_is_sp_configured() && !is_user_logged_in())) {
goto Jf;
}
$xR = get_option("mo_saml_sp_base_url");
if (!empty($xR)) {
goto CX;
}
$xR = home_url();
CX:
if (!(get_option("mo_saml_relay_state") && get_option("mo_saml_relay_state") != '')) {
goto NC;
}
$AZ = get_option("mo_saml_relay_state");
NC:
$cw = empty($AZ) ? "/" : $AZ;
$rt = get_option("saml_login_url");
$wF = get_option("saml_login_binding_type");
$i8 = get_option("mo_saml_force_authentication");
$Yl = $xR . "/";
$Fx = get_option("mo_saml_sp_entity_id");
if (!empty($Fx)) {
goto dx;
}
$Fx = $xR . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
dx:
$GD = SAMLSPUtilities::createAuthnRequest($Yl, $Fx, $rt, $i8, $wF);
if (empty($wF) || $wF == "HttpRedirect") {
goto Pl;
}
if (!(get_option("saml_request_signed") == "unchecked")) {
goto Or1;
}
$L7 = base64_encode($GD);
SAMLSPUtilities::postSAMLRequest($rt, $L7, $cw);
die;
Or1:
$wA = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$Nz = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
$L7 = SAMLSPUtilities::signXML($GD, $Nz, $wA, "NameIDPolicy");
SAMLSPUtilities::postSAMLRequest($rt, $L7, $cw);
goto ad;
Pl:
$Ru = $rt;
if (strpos($rt, "?") !== false) {
goto im;
}
$Ru .= "?";
goto Q2;
im:
$Ru .= "&";
Q2:
if (!(get_option("saml_request_signed") == "unchecked")) {
goto MW;
}
$Ru .= "SAMLRequest=" . $GD . "&RelayState=" . urlencode($cw);
header("Location: " . $Ru);
die;
MW:
$GD = "SAMLRequest=" . $GD . "&RelayState=" . urlencode($cw) . "&SigAlg=" . urlencode(XMLSecurityKey::RSA_SHA256);
$Dh = array("type" => "private");
$h7 = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $Dh);
$rM = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$h7->loadKey($rM, TRUE);
$cr = new XMLSecurityDSig();
$dS = $h7->signData($GD);
$dS = base64_encode($dS);
$Ru .= $GD . "&Signature=" . urlencode($dS);
header("Location: " . $Ru);
die;
ad:
Jf:
wN:
gP:
}
function mo_saml_authenticate()
{
$yP = '';
if (!isset($_REQUEST["redirect_to"])) {
goto HO;
}
$yP = $_REQUEST["redirect_to"];
HO:
if (!is_user_logged_in()) {
goto HA;
}
if (!empty($yP)) {
goto S0;
}
header("Location: " . home_url());
goto IG;
S0:
header("Location: " . $yP);
IG:
die;
HA:
if (!(get_option("mo_saml_enable_login_redirect") == "true")) {
goto BU;
}
if (isset($_GET["loggedout"]) && $_GET["loggedout"] == "true") {
goto lO;
}
if (get_option("mo_saml_allow_wp_signin") == "true") {
goto QY;
}
goto Gn;
lO:
header("Location: " . home_url());
die;
goto Gn;
QY:
if (isset($_GET["saml_sso"]) && $_GET["saml_sso"] == "false" || isset($_POST["saml_sso"]) && $_POST["saml_sso"] == "false") {
goto gn;
}
if (isset($_REQUEST["redirect_to"])) {
goto Kd;
}
goto Y1;
gn:
return;
goto Y1;
Kd:
$yP = $_REQUEST["redirect_to"];
if (!(strpos($yP, "wp-admin") !== false && strpos($yP, "saml_sso=false") !== false)) {
goto Eg;
}
return;
Eg:
Y1:
Gn:
$this->mo_saml_redirect_for_authentication($yP);
BU:
}
function mo_saml_auto_redirect()
{
if (!current_user_can("read")) {
goto eZ;
}
return;
eZ:
if (!(get_option("mo_saml_registered_only_access") == "true")) {
goto hJ;
}
if (!(get_option("mo_saml_enable_rss_access") == "true" && is_feed())) {
goto pk;
}
return;
pk:
$AZ = saml_get_current_page_url();
$this->mo_saml_redirect_for_authentication($AZ);
hJ:
}
function mo_saml_modify_login_form()
{
echo "<input type="hidden" name="saml_sso" value="false">" . "\xa";
}
function mo_get_saml_shortcode()
{
if (!is_user_logged_in()) {
goto IL;
}
$Xg = "Hello, " . wp_get_current_user()->display_name . " | <a href=" . wp_logout_url(home_url()) . ">Logout</a>";
goto BD;
IL:
$xR = get_option("mo_saml_sp_base_url");
if (!empty($xR)) {
goto Pv;
}
$xR = home_url();
Pv:
if (mo_saml_is_sp_configured() && mo_saml_is_customer_license_key_verified()) {
goto dE;
}
$Xg = "SP is not configured.";
goto y7;
dE:
if (get_option("mo_saml_enable_cloud_broker") == "false") {
goto Fw;
}
$Xg = "<a href=" . get_option("mo_saml_host_name") . "/moas/rest/saml/request?id=" . get_option("mo_saml_admin_customer_key") . "&returnurl=" . urlencode(home_url() . "/?option=readsamllogin") . " />Login with " . get_option("saml_identity_name") . "</a>";
goto DD;
Fw:
$yP = urlencode(saml_get_current_page_url());
$Xg = "<a href='" . $xR . "/?option=saml_user_login&redirect_to={$yP}'>Login with " . get_option("saml_identity_name") . "</a>";
DD:
y7:
BD:
return $Xg;
}
function _handle_upload_metadata()
{
if (!(isset($_FILES["metadata_file"]) || isset($_POST["metadata_url"]))) {
goto uF;
}
if (!empty($_FILES["metadata_file"]["tmp_name"])) {
goto wI;
}
$g0 = $_POST["metadata_url"];
$NI = curl_init();
curl_setopt($NI, CURLOPT_URL, $g0);
curl_setopt($NI, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($NI, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($NI, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($NI, CURLOPT_SSL_VERIFYHOST, false);
$KQ = get_option("mo_proxy_host");
if (empty($KQ)) {
goto L7;
}
curl_setopt($NI, CURLOPT_PROXY, get_option("mo_proxy_host"));
curl_setopt($NI, CURLOPT_PROXYPORT, get_option("mo_proxy_port"));
curl_setopt($NI, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($NI, CURLOPT_PROXYUSERPWD, get_option("mo_proxy_username") . ":" . get_option("mo_proxy_password"));
L7:
$kC = curl_exec($NI);
curl_close($NI);
if (isset($_POST["sync_metadata"])) {
goto zk;
}
delete_option("saml_metadata_url_for_sync");
delete_option("saml_metadata_sync_interval");
wp_unschedule_event(wp_next_scheduled("metadata_sync_cron_action"), "metadata_sync_cron_action");
goto ZB;
zk:
update_option("saml_metadata_url_for_sync", $_POST["metadata_file"]);
update_option("saml_metadata_sync_interval", $_POST["sync_interval"]);
if (wp_next_scheduled("metadata_sync_cron_action")) {
goto h1;
}
wp_schedule_event(time(), $_POST["sync_interval"], "metadata_sync_cron_action");
h1:
ZB:
goto BC;
wI:
$kC = @file_get_contents($_FILES["metadata_file"]["tmp_name"]);
BC:
$this->upload_metadata($kC);
uF:
}
function upload_metadata($kC)
{
$pA = set_error_handler(array($this, "handleXmlError"));
$LQ = new DOMDocument();
$LQ->loadXML($kC);
restore_error_handler();
$FN = $LQ->firstChild;
if (!empty($FN)) {
goto EE;
}
update_option("mo_saml_message", "Please provide a valid metadata file.");
$this->mo_saml_show_error_message();
goto ow;
EE:
$JJ = new IDPMetadataReader($LQ);
$cG = $JJ->getIdentityProviders();
if (!empty($cG)) {
goto eG;
}
update_option("mo_saml_message", "Please provide a valid metadata file.");
$this->mo_saml_show_error_message();
return;
eG:
foreach ($cG as $h7 => $zz) {
$K1 = $_POST["saml_identity_metadata_provider"];
$Dc = "HttpRedirect";
$A7 = $zz->getLoginURL("HTTP-Redirect");
$fu = "HttpRedirect";
$h_ = $zz->getLogoutURL("HTTP-Redirect");
$Bt = $zz->getEntityID();
$gf = $zz->getSigningCertificate();
update_option("saml_identity_name", $K1);
update_option("saml_login_binding_type", $Dc);
update_option("saml_login_url", $A7);
update_option("saml_logout_binding_type", $fu);
update_option("saml_logout_url", $h_);
update_option("saml_issuer", $Bt);
update_option("saml_x509_certificate", maybe_serialize($gf));
goto fn;
pN:
}
fn:
update_option("mo_saml_message", "Identity Provider details saved successfully.");
$this->mo_saml_show_success_message();
ow:
}
function handleXmlError($qQ, $Zv, $Ki, $GP)
{
if ($qQ == E_WARNING && substr_count($Zv, "DOMDocument::loadXML()") > 0) {
goto p4;
}
return false;
goto JW;
p4:
return;
JW:
}
}
new saml_mo_login();
?>
Did this file decode correctly?
Original Code
<?php
/*
Plugin Name: miniOrange SSO using SAML 2.0
Plugin URI: http://miniorange.com/
Description: miniOrange SAML 2.0 SSO enables user to perform Single Sign On with any SAML 2.0 enabled Identity Provider.
Version: 11.2.0
Author: miniOrange
Author URI: http://miniorange.com/
*/
include_once dirname(__FILE__) . "\57\x6d\x6f\137\154\157\x67\151\156\137\x73\x61\155\154\137\x73\x73\157\x5f\167\x69\x64\147\x65\164\56\160\x68\x70";
require "\155\x6f\x2d\163\141\155\x6c\x2d\x63\154\x61\163\x73\55\x63\x75\x73\164\x6f\155\x65\x72\x2e\x70\x68\x70";
require "\x6d\x6f\137\163\141\155\154\x5f\163\145\164\164\x69\x6e\147\x73\x5f\160\x61\147\x65\x2e\x70\150\x70";
require "\115\x65\x74\x61\x64\x61\x74\141\122\145\x61\144\x65\162\56\x70\x68\x70";
require "\143\x65\x72\x74\151\146\151\143\141\x74\145\137\165\164\151\154\151\164\x79\x2e\x70\150\x70";
class saml_mo_login
{
function __construct()
{
add_action("\x61\x64\x6d\x69\156\x5f\155\x65\x6e\x75", array($this, "\155\151\156\151\157\x72\141\x6e\x67\145\137\x73\x73\157\x5f\155\145\156\165"));
add_action("\x61\144\155\x69\156\x5f\x69\x6e\x69\164", array($this, "\155\151\x6e\x69\157\x72\x61\156\x67\145\137\154\x6f\x67\151\156\x5f\x77\151\144\147\145\164\137\x73\x61\155\154\x5f\163\141\x76\145\x5f\163\145\164\164\x69\156\147\163"));
add_action("\141\144\x6d\151\156\137\145\156\x71\165\x65\165\x65\x5f\163\x63\162\x69\160\x74\163", array($this, "\160\154\x75\x67\x69\x6e\137\163\x65\x74\x74\x69\156\147\x73\x5f\x73\x74\171\154\x65"));
register_deactivation_hook(__FILE__, array($this, "\x6d\x6f\137\163\x73\x6f\137\x73\x61\x6d\154\137\144\x65\x61\x63\164\151\x76\141\x74\x65"));
add_action("\141\x64\x6d\x69\x6e\x5f\x65\x6e\161\x75\x65\x75\x65\137\163\x63\162\151\160\x74\163", array($this, "\160\x6c\165\147\x69\156\137\163\x65\x74\x74\151\156\147\x73\x5f\163\143\x72\151\x70\x74"));
remove_action("\141\x64\x6d\151\x6e\x5f\156\157\x74\151\143\x65\x73", array($this, "\155\x6f\137\x73\141\155\x6c\x5f\x73\165\x63\143\145\x73\163\x5f\155\145\x73\x73\x61\147\x65"));
remove_action("\x61\144\155\x69\156\137\x6e\x6f\x74\x69\x63\145\163", array($this, "\x6d\x6f\137\163\141\155\x6c\x5f\x65\162\x72\157\x72\x5f\155\x65\x73\163\141\x67\x65"));
add_action("\167\x70\137\141\x75\164\x68\145\x6e\x74\x69\143\x61\164\x65", array($this, "\x6d\x6f\x5f\163\x61\x6d\154\x5f\141\x75\x74\x68\145\x6e\x74\x69\143\x61\164\x65"));
add_action("\167\160", array($this, "\155\x6f\137\x73\141\x6d\154\137\x61\165\164\157\x5f\x72\x65\x64\151\162\x65\x63\x74"));
$hP = new mo_login_wid();
add_action("\x77\160\137\x6c\x6f\x67\x6f\165\164", array($hP, "\155\157\137\163\141\155\154\137\154\157\147\157\x75\x74"));
add_action("\154\x6f\x67\151\x6e\x5f\146\x6f\x72\155", array($this, "\x6d\x6f\137\x73\x61\155\x6c\x5f\155\x6f\144\151\x66\171\137\x6c\157\x67\151\x6e\x5f\x66\x6f\162\x6d"));
add_shortcode("\115\117\x5f\x53\x41\115\x4c\137\x46\117\x52\115", array($this, "\x6d\157\x5f\147\x65\164\137\163\141\x6d\154\x5f\x73\x68\x6f\x72\164\x63\157\x64\x65"));
add_filter("\143\x72\x6f\156\x5f\x73\143\150\145\x64\165\x6c\145\x73", array($this, "\155\171\x70\x72\145\x66\x69\x78\x5f\x61\144\144\137\143\162\x6f\x6e\x5f\x73\x63\150\x65\x64\x75\154\145"));
add_action("\x6d\145\x74\x61\x64\x61\x74\x61\137\163\171\156\x63\137\x63\x72\157\156\137\x61\x63\164\x69\x6f\x6e", array($this, "\x6d\x65\x74\x61\144\141\x74\x61\x5f\163\x79\156\143\x5f\143\162\x6f\x6e\137\141\143\164\x69\157\x6e"));
}
function myprefix_add_cron_schedule($m0)
{
$m0["\167\145\x65\x6b\154\171"] = array("\151\156\164\x65\162\x76\x61\154" => 604800, "\x64\151\163\x70\x6c\141\x79" => __("\117\x6e\x63\145\40\127\145\x65\x6b\x6c\171"));
$m0["\x6d\157\x6e\x74\x68\x6c\171"] = array("\x69\x6e\x74\145\x72\x76\x61\154" => 2635200, "\x64\x69\163\x70\x6c\x61\171" => __("\117\x6e\x63\145\40\x4d\157\x6e\x74\x68\x6c\x79"));
return $m0;
}
function metadata_sync_cron_action()
{
error_log("\x6d\x69\156\151\x6f\162\141\x6e\x67\145\x20\x3a\x20\122\101\116\x20\123\131\116\x43\40\55\40" . time());
$this->upload_metadata(@file_get_contents(get_option("\x73\141\x6d\154\x5f\155\145\x74\x61\x64\141\x74\141\137\x75\x72\x6c\137\x66\157\162\137\163\171\x6e\x63")));
}
function mo_login_widget_saml_options()
{
global $wpdb;
update_option("\x6d\x6f\x5f\163\x61\x6d\154\x5f\x68\157\x73\164\x5f\x6e\x61\155\x65", "\x68\x74\164\160\x73\x3a\57\57\141\x75\x74\x68\56\155\151\x6e\151\x6f\162\141\156\x67\x65\56\x63\x6f\155");
$tB = get_option("\155\157\x5f\163\x61\x6d\x6c\x5f\150\157\x73\x74\137\156\141\x6d\x65");
$cZ = get_option("\155\157\x5f\x73\141\x6d\154\137\145\x6e\141\x62\x6c\x65\x5f\x63\154\x6f\x75\144\137\x62\162\157\x6b\x65\162");
$hI = get_option("\163\141\x6d\154\x5f\170\65\60\71\137\x63\145\x72\x74\x69\146\151\143\141\164\145");
if (empty($cZ) && !empty($hI)) {
goto e9;
}
if (!empty($cZ)) {
goto ES;
}
update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\145\x6e\x61\x62\154\145\x5f\143\154\x6f\x75\144\137\142\162\x6f\153\145\x72", "\x66\141\x6c\163\x65");
ES:
goto ec;
e9:
update_option("\x6d\157\x5f\163\x61\x6d\154\137\x65\x6e\141\142\154\x65\137\x63\x6c\157\165\x64\x5f\142\x72\x6f\153\x65\162", "\x74\162\x75\x65");
ec:
mo_register_saml_sso();
}
function mo_saml_success_message()
{
$S0 = "\x65\x72\x72\157\x72";
$Rj = get_option("\x6d\157\137\163\x61\155\x6c\x5f\x6d\145\163\163\141\147\x65");
echo "\74\144\151\166\x20\x63\x6c\x61\163\163\75\47" . $S0 . "\x27\x3e\x20\74\x70\76" . $Rj . "\x3c\x2f\x70\76\74\x2f\144\151\166\76";
}
function mo_saml_error_message()
{
$S0 = "\165\160\x64\141\x74\x65\x64";
$Rj = get_option("\155\157\137\x73\x61\155\154\137\x6d\145\163\x73\141\x67\145");
echo "\x3c\x64\x69\166\40\x63\154\141\x73\x73\x3d\47" . $S0 . "\x27\76\x20\x3c\x70\x3e" . $Rj . "\74\57\160\x3e\74\x2f\x64\x69\166\x3e";
}
public function mo_sso_saml_deactivate()
{
if (!is_multisite()) {
goto Gh;
}
global $wpdb;
$aU = $wpdb->get_col("\x53\105\x4c\x45\103\124\x20\142\x6c\157\147\x5f\x69\144\x20\x46\x52\117\x4d\x20{$wpdb->blogs}");
$CX = get_current_blog_id();
do_action("\x66\154\x75\x73\x68\x5f\x63\x61\x63\x68\145");
foreach ($aU as $blog_id) {
switch_to_blog($blog_id);
delete_option("\x6d\157\x5f\163\141\155\154\x5f\x68\157\163\164\x5f\156\x61\155\145");
delete_option("\155\157\137\163\x61\x6d\x6c\137\x6e\x65\x77\x5f\162\x65\147\x69\163\x74\x72\141\x74\x69\157\x6e");
delete_option("\x6d\157\x5f\x73\141\155\154\x5f\x61\144\x6d\x69\156\137\160\x68\x6f\x6e\145");
delete_option("\155\157\137\163\141\x6d\x6c\137\141\144\x6d\151\156\137\160\141\x73\x73\x77\157\162\144");
delete_option("\x6d\157\x5f\163\141\x6d\x6c\137\x76\145\162\151\146\x79\137\143\x75\x73\x74\x6f\155\x65\162");
delete_option("\155\x6f\137\163\141\x6d\154\137\141\x64\x6d\x69\156\x5f\143\x75\163\x74\157\155\145\x72\137\153\x65\171");
delete_option("\x6d\157\x5f\163\x61\x6d\154\137\141\144\x6d\x69\x6e\137\141\160\151\137\x6b\145\x79");
delete_option("\155\x6f\x5f\x73\x61\155\154\x5f\x63\x75\163\164\x6f\155\x65\x72\137\x74\157\x6b\145\156");
delete_option("\x6d\157\137\163\141\x6d\154\x5f\155\x65\163\163\x61\x67\x65");
delete_option("\x6d\157\137\x73\x61\x6d\154\x5f\x72\x65\x67\x69\x73\164\x72\141\x74\x69\157\156\x5f\163\x74\x61\x74\x75\x73");
delete_option("\155\157\137\x73\141\x6d\x6c\x5f\x69\x64\x70\x5f\143\157\x6e\146\x69\x67\137\143\157\x6d\160\x6c\145\164\x65");
delete_option("\155\157\137\163\141\155\154\137\164\162\141\156\x73\x61\x63\x74\x69\157\156\x49\x64");
delete_option("\x76\154\137\x63\x68\x65\143\x6b\x5f\x74");
delete_option("\x76\x6c\x5f\x63\150\145\143\153\137\x73");
nz:
}
qN:
switch_to_blog($CX);
goto OO;
Gh:
do_action("\146\154\165\163\150\x5f\143\x61\143\150\145");
delete_option("\x6d\x6f\137\x73\x61\x6d\154\x5f\150\157\163\164\137\x6e\x61\155\x65");
delete_option("\155\157\137\x73\141\155\154\x5f\156\x65\167\x5f\162\145\147\151\163\x74\x72\141\164\x69\157\156");
delete_option("\x6d\157\137\163\141\155\154\x5f\141\x64\x6d\151\x6e\137\160\x68\157\156\x65");
delete_option("\x6d\157\137\x73\141\155\x6c\x5f\x61\x64\155\x69\156\137\x70\141\x73\x73\x77\157\x72\144");
delete_option("\x6d\157\137\x73\x61\x6d\154\x5f\x76\145\x72\151\x66\x79\x5f\x63\x75\x73\x74\157\155\145\162");
delete_option("\155\157\x5f\163\x61\155\154\x5f\141\x64\x6d\151\x6e\137\x63\165\163\164\x6f\155\145\162\x5f\153\145\x79");
delete_option("\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x61\144\155\151\156\137\141\160\x69\x5f\x6b\145\x79");
delete_option("\155\157\137\x73\141\x6d\x6c\137\143\165\x73\164\157\x6d\x65\162\x5f\x74\x6f\x6b\145\x6e");
delete_option("\155\157\x5f\x73\x61\x6d\154\137\x6d\x65\163\163\x61\147\145");
delete_option("\155\157\x5f\163\141\155\x6c\137\x72\145\x67\x69\163\164\x72\x61\164\x69\157\156\137\163\x74\141\164\165\x73");
delete_option("\x6d\x6f\x5f\x73\141\155\x6c\x5f\151\x64\x70\x5f\x63\x6f\x6e\146\x69\x67\137\x63\x6f\155\x70\154\x65\x74\145");
delete_option("\155\157\x5f\163\x61\x6d\154\x5f\x74\162\x61\x6e\x73\141\x63\164\151\157\x6e\111\144");
delete_option("\x6d\x6f\137\163\141\x6d\154\x5f\145\156\x61\x62\x6c\145\x5f\143\x6c\157\x75\144\x5f\x62\162\157\153\145\162");
delete_option("\x76\x6c\x5f\x63\150\145\x63\x6b\137\164");
delete_option("\x76\154\x5f\x63\x68\x65\x63\x6b\137\163");
OO:
}
private function mo_saml_show_success_message()
{
remove_action("\x61\144\x6d\151\x6e\137\156\157\x74\x69\143\145\x73", array($this, "\x6d\157\137\163\x61\x6d\154\137\x73\x75\143\143\145\163\x73\x5f\x6d\x65\163\x73\x61\x67\145"));
add_action("\x61\144\155\151\156\137\156\157\164\151\143\145\x73", array($this, "\155\x6f\137\x73\x61\x6d\x6c\x5f\x65\162\162\157\x72\137\155\145\163\x73\141\147\x65"));
}
function mo_saml_show_error_message()
{
remove_action("\141\144\155\151\x6e\137\x6e\157\x74\x69\143\145\163", array($this, "\x6d\x6f\137\x73\141\155\154\137\145\162\x72\x6f\x72\x5f\155\x65\163\163\x61\x67\145"));
add_action("\141\x64\155\151\156\137\x6e\x6f\164\x69\x63\145\x73", array($this, "\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x73\x75\143\143\x65\163\163\x5f\x6d\x65\x73\x73\x61\x67\145"));
}
function plugin_settings_style($ar)
{
if (!("\x74\x6f\x70\x6c\x65\166\145\x6c\137\x70\x61\x67\x65\137\155\157\137\x73\141\155\154\137\x73\145\164\164\x69\x6e\147\x73" != $ar)) {
goto ub;
}
return;
ub:
wp_enqueue_style("\155\x6f\137\163\141\x6d\x6c\x5f\x61\144\x6d\151\156\x5f\x73\145\164\x74\151\x6e\x67\x73\137\x73\164\171\x6c\145", plugins_url("\x69\156\x63\x6c\165\144\145\x73\x2f\x63\163\163\57\163\164\171\x6c\145\x5f\x73\145\x74\164\151\156\147\x73\x2e\155\x69\156\56\x63\163\163\77\x76\x65\x72\x3d\61\x31\x2e\x32\x2e\60", __FILE__));
wp_enqueue_style("\x6d\157\137\x73\141\x6d\154\x5f\x61\144\x6d\x69\x6e\x5f\x73\145\x74\164\x69\x6e\x67\x73\x5f\x70\x68\157\156\145\137\x73\164\171\x6c\x65", plugins_url("\x69\156\143\154\165\x64\x65\x73\x2f\x63\163\163\57\160\150\157\156\x65\56\x6d\151\156\x2e\143\x73\x73", __FILE__));
wp_enqueue_style("\x6d\x6f\137\x73\141\155\154\x5f\x77\160\x62\55\146\141", plugins_url("\x69\x6e\x63\154\165\x64\145\x73\x2f\x63\x73\x73\57\146\157\156\x74\55\141\167\x65\163\157\155\x65\56\155\151\x6e\56\x63\163\163", __FILE__));
}
function plugin_settings_script($ar)
{
if (!("\164\157\160\x6c\145\x76\x65\x6c\x5f\x70\141\147\145\x5f\155\x6f\137\x73\x61\x6d\x6c\137\163\x65\x74\164\x69\156\x67\163" != $ar)) {
goto FG;
}
return;
FG:
wp_enqueue_script("\x6a\161\165\145\162\x79");
wp_enqueue_script("\x6d\x6f\x5f\163\141\x6d\x6c\137\141\144\x6d\151\156\137\163\145\x74\164\x69\156\x67\x73\x5f\x73\x63\x72\x69\x70\x74", plugins_url("\x69\x6e\143\x6c\x75\x64\x65\x73\57\152\x73\57\163\x65\x74\164\x69\156\x67\163\56\155\x69\156\56\x6a\163", __FILE__));
wp_enqueue_script("\155\x6f\x5f\x73\141\155\154\137\x61\x64\155\151\x6e\x5f\163\x65\164\164\151\x6e\x67\x73\x5f\x70\x68\x6f\x6e\145\x5f\163\x63\x72\x69\x70\164", plugins_url("\151\x6e\143\x6c\165\x64\145\x73\57\152\163\57\x70\150\x6f\x6e\x65\x2e\155\x69\x6e\x2e\152\x73", __FILE__));
}
function miniorange_login_widget_saml_save_settings()
{
if (!current_user_can("\155\x61\x6e\x61\x67\145\x5f\157\x70\164\151\x6f\156\x73")) {
goto uz;
}
if (!(isset($_POST["\157\x70\164\x69\x6f\156"]) and $_POST["\x6f\160\164\151\157\x6e"] == "\x6c\157\x67\x69\156\137\x77\151\144\147\x65\164\137\163\141\x6d\154\137\x73\141\x76\x65\137\x73\x65\164\x74\x69\x6e\147\163")) {
goto BX;
}
if (mo_saml_is_curl_installed()) {
goto r3;
}
update_option("\x6d\157\137\x73\x61\x6d\154\137\155\145\x73\x73\141\147\x65", "\105\122\x52\x4f\122\x3a\x20\x3c\141\40\x68\162\145\146\75\x22\x68\164\164\160\x3a\57\x2f\x70\150\x70\56\x6e\x65\x74\x2f\x6d\x61\156\165\141\154\57\145\x6e\57\x63\165\162\154\56\151\156\x73\164\141\x6c\x6c\x61\x74\x69\x6f\x6e\x2e\160\x68\x70\x22\x20\164\x61\x72\x67\145\x74\x3d\42\137\142\154\x61\x6e\x6b\42\76\120\110\120\40\143\x55\122\114\40\145\x78\x74\145\156\163\151\157\x6e\x3c\x2f\141\x3e\40\x69\x73\x20\156\x6f\x74\40\151\x6e\x73\x74\x61\154\154\x65\x64\x20\x6f\162\x20\144\x69\163\141\142\x6c\145\x64\x2e\40\123\x61\x76\x65\40\111\x64\x65\x6e\x74\151\x74\171\40\120\x72\157\166\151\x64\145\162\x20\103\157\x6e\x66\x69\147\165\x72\x61\x74\x69\157\156\40\146\141\151\x6c\x65\144\56");
$this->mo_saml_show_error_message();
return;
r3:
$K1 = '';
$Dc = '';
$A7 = '';
$fu = '';
$h_ = '';
$Bt = '';
$gf = '';
$kl = '';
if ($this->mo_saml_check_empty_or_null($_POST["\x73\x61\155\x6c\x5f\151\x64\145\x6e\x74\x69\164\171\137\x6e\x61\155\145"]) || $this->mo_saml_check_empty_or_null($_POST["\x73\141\155\154\x5f\x6c\157\147\151\x6e\137\165\x72\x6c"]) || $this->mo_saml_check_empty_or_null($_POST["\163\141\155\154\137\x69\163\163\x75\145\x72"])) {
goto zf;
}
if (!preg_match("\57\136\x5c\167\x2a\44\57", $_POST["\163\x61\155\154\137\x69\144\145\156\x74\151\x74\x79\137\156\141\155\145"])) {
goto ju;
}
$K1 = trim($_POST["\163\x61\x6d\154\x5f\x69\144\145\156\164\x69\x74\x79\137\156\141\x6d\145"]);
$A7 = trim($_POST["\163\x61\155\154\x5f\x6c\x6f\x67\151\156\x5f\165\162\x6c"]);
if (!array_key_exists("\x73\x61\155\x6c\x5f\154\x6f\x67\x69\x6e\x5f\x62\151\x6e\144\151\x6e\147\x5f\x74\x79\x70\145", $_POST)) {
goto yd;
}
$Dc = $_POST["\x73\141\x6d\154\137\154\x6f\147\151\156\x5f\142\151\x6e\x64\x69\x6e\147\137\164\171\x70\145"];
yd:
if (!array_key_exists("\163\141\155\154\x5f\154\x6f\147\x6f\x75\164\137\x62\151\x6e\x64\151\156\147\137\164\x79\x70\145", $_POST)) {
goto n3;
}
$fu = $_POST["\x73\141\155\154\x5f\154\157\147\157\x75\x74\137\142\x69\x6e\144\151\x6e\x67\137\164\x79\x70\x65"];
n3:
if (!array_key_exists("\x73\141\x6d\x6c\137\154\x6f\x67\x6f\165\164\x5f\x75\162\154", $_POST)) {
goto V0;
}
$h_ = trim($_POST["\x73\x61\155\x6c\137\x6c\x6f\147\157\165\x74\x5f\x75\x72\154"]);
V0:
$Bt = trim($_POST["\163\x61\155\x6c\137\151\x73\x73\165\x65\162"]);
$gf = $_POST["\x73\x61\155\154\137\170\65\60\71\x5f\x63\x65\162\x74\x69\146\x69\143\141\x74\145"];
goto xr;
ju:
update_option("\x6d\x6f\137\163\141\155\154\137\x6d\x65\163\x73\141\x67\x65", "\120\x6c\145\x61\163\145\x20\x6d\141\164\x63\150\x20\164\x68\145\x20\162\x65\161\165\145\x73\164\x65\x64\x20\146\x6f\162\155\141\164\x20\x66\157\x72\40\111\x64\145\x6e\x74\x69\164\171\40\120\162\x6f\166\x69\144\145\162\40\x4e\x61\155\x65\56\40\117\156\154\171\40\141\x6c\160\150\141\142\145\x74\x73\x2c\x20\156\x75\155\x62\145\162\x73\x20\141\156\x64\40\165\156\144\x65\162\x73\x63\x6f\162\145\40\151\x73\x20\141\154\154\x6f\x77\145\144\x2e");
$this->mo_saml_show_error_message();
return;
xr:
goto kV;
zf:
update_option("\x6d\x6f\137\x73\141\x6d\x6c\137\155\145\163\x73\141\147\x65", "\101\x6c\154\x20\164\150\x65\x20\x66\151\145\154\x64\x73\x20\141\162\x65\x20\x72\145\x71\165\x69\162\x65\144\x2e\x20\x50\x6c\145\x61\x73\x65\40\x65\x6e\x74\x65\162\x20\x76\141\154\151\x64\x20\145\x6e\164\x72\151\x65\163\56");
$this->mo_saml_show_error_message();
return;
kV:
update_option("\163\141\x6d\x6c\137\x69\144\x65\156\164\151\x74\171\x5f\156\141\155\x65", $K1);
update_option("\163\141\x6d\x6c\137\x6c\157\x67\x69\x6e\137\142\x69\x6e\x64\x69\x6e\x67\137\164\x79\160\x65", $Dc);
update_option("\x73\141\x6d\x6c\x5f\x6c\157\x67\151\156\137\x75\x72\154", $A7);
update_option("\x73\141\x6d\x6c\137\x6c\x6f\147\157\x75\x74\137\x62\x69\156\144\151\x6e\147\137\164\x79\x70\x65", $fu);
update_option("\x73\141\155\154\137\x6c\x6f\x67\x6f\x75\x74\x5f\165\162\154", $h_);
update_option("\x73\x61\x6d\x6c\x5f\x69\163\163\165\x65\x72", $Bt);
if (isset($_POST["\x73\141\x6d\154\137\x72\145\x71\x75\x65\163\164\137\163\x69\147\x6e\x65\144"])) {
goto dr;
}
update_option("\163\x61\155\x6c\137\162\145\161\x75\x65\163\164\137\163\151\x67\156\145\x64", "\165\x6e\143\150\x65\143\153\145\144");
goto tj;
dr:
update_option("\163\141\x6d\x6c\x5f\x72\145\161\x75\145\163\x74\137\x73\151\x67\x6e\x65\144", "\143\x68\145\143\x6b\x65\144");
tj:
foreach ($gf as $h7 => $pU) {
if (empty($pU)) {
goto vO;
}
$gf[$h7] = SAMLSPUtilities::sanitize_certificate($pU);
if (@openssl_x509_read($gf[$h7])) {
goto vC;
}
update_option("\155\157\137\x73\141\155\154\137\x6d\x65\163\x73\x61\x67\145", "\111\156\166\141\x6c\151\144\40\x63\x65\x72\x74\x69\x66\151\143\x61\164\145\72\40\120\154\x65\x61\x73\145\x20\160\x72\157\x76\151\x64\x65\40\x61\x20\x76\141\154\x69\144\x20\x63\145\162\164\x69\146\x69\x63\141\x74\145\56");
$this->mo_saml_show_error_message();
delete_option("\163\141\x6d\x6c\137\170\65\60\x39\x5f\143\145\162\164\x69\x66\151\143\141\164\145");
return;
vC:
goto zv;
vO:
unset($gf[$h7]);
zv:
zt:
}
Ny:
if (!empty($gf)) {
goto xm;
}
update_option("\x6d\157\137\x73\141\155\x6c\137\155\x65\163\163\141\x67\145", "\x49\156\166\141\154\x69\144\x20\103\x65\162\x74\x69\x66\x69\143\141\x74\145\72\120\x6c\145\141\163\145\40\160\162\157\166\x69\144\x65\x20\141\40\x63\x65\x72\x74\151\x66\151\x63\x61\x74\145");
$this->mo_saml_show_error_message();
return;
xm:
update_option("\x73\141\x6d\154\x5f\170\65\60\71\137\143\x65\162\164\151\146\151\143\141\164\x65", maybe_serialize($gf));
if (isset($_POST["\163\x61\x6d\x6c\x5f\x72\x65\163\160\157\156\163\145\x5f\163\x69\x67\156\x65\144"])) {
goto b0;
}
update_option("\x73\141\x6d\154\x5f\162\145\163\160\157\x6e\163\x65\137\163\151\x67\x6e\x65\x64", "\x59\145\163");
goto bx;
b0:
update_option("\x73\x61\x6d\154\137\x72\x65\x73\160\x6f\x6e\x73\x65\137\x73\x69\x67\156\145\x64", "\143\150\145\143\x6b\x65\144");
bx:
if (isset($_POST["\x73\x61\x6d\x6c\x5f\x61\163\x73\x65\162\164\x69\157\x6e\x5f\x73\x69\x67\156\x65\x64"])) {
goto Y8;
}
update_option("\x73\x61\x6d\154\137\141\x73\x73\145\x72\164\x69\157\156\x5f\163\151\147\x6e\145\x64", "\131\145\163");
goto Vk;
Y8:
update_option("\x73\141\x6d\x6c\137\x61\163\163\x65\x72\164\x69\157\x6e\137\x73\x69\x67\156\x65\144", "\x63\150\x65\143\x6b\x65\x64");
Vk:
if (get_option("\155\157\x5f\x73\141\x6d\154\137\x65\x6e\141\142\154\x65\137\x63\154\x6f\165\144\x5f\x62\162\157\x6b\x65\x72") == "\x74\x72\x75\x65") {
goto Tm;
}
update_option("\x6d\157\137\x73\x61\155\x6c\137\x6d\x65\163\163\x61\x67\x65", "\x49\144\145\x6e\164\151\164\171\x20\120\x72\157\x76\151\x64\145\162\x20\144\145\164\141\x69\154\163\40\163\x61\x76\145\x64\40\x73\x75\143\x63\x65\x73\x73\146\x75\x6c\x6c\x79\x2e");
$this->mo_saml_show_success_message();
goto BM;
Tm:
$FH = new Customersaml();
$QQ = json_decode($FH->save_external_idp_config(), true);
if (@openssl_x509_read($QQ["\163\x61\x6d\154\x58\65\60\x39\x43\x65\x72\164\151\146\151\x63\x61\x74\145"])) {
goto Cn;
}
update_option("\x6d\157\x5f\163\141\x6d\154\137\x6d\145\163\x73\x61\147\145", "\111\x6e\x76\x61\154\151\x64\x20\103\x65\x72\x74\x69\x66\x69\x63\141\164\145\x20\x66\x6f\162\x6d\x61\164\56\x20\120\154\145\141\163\x65\40\x65\x6e\164\145\x72\40\x61\x20\166\x61\x6c\x69\144\x20\x63\x65\162\x74\151\146\151\x63\x61\164\x65\x2e");
$this->mo_saml_show_error_message();
delete_option("\x73\x61\x6d\x6c\x5f\x78\x35\x30\x39\137\143\145\162\x74\x69\146\151\143\141\164\x65");
return;
Cn:
if (isset($QQ["\143\165\x73\x74\x6f\155\145\162\x49\144"])) {
goto Fr;
}
update_option("\155\157\x5f\163\x61\x6d\x6c\137\x6d\145\163\163\x61\x67\x65", "\111\144\x65\156\x74\151\x74\x79\40\120\x72\157\x76\151\x64\x65\162\x20\144\x65\x74\141\x69\x6c\163\40\x63\x6f\165\154\144\40\x6e\x6f\x74\40\142\145\40\163\x61\x76\x65\144\56\40\120\154\145\141\x73\x65\x20\x74\x72\171\x20\x61\x67\x61\151\x6e\x2e");
$this->mo_saml_show_error_message();
goto l9;
Fr:
update_option("\163\141\x6d\x6c\137\x78\x35\x30\x39\x5f\x63\x65\x72\164\151\x66\x69\x63\x61\164\x65", maybe_serialize(array($QQ["\163\x61\155\x6c\x58\65\60\71\x43\x65\x72\164\151\146\151\x63\x61\164\145"])));
update_option("\x6d\x6f\137\163\141\155\x6c\x5f\x6d\x65\x73\163\x61\147\x65", "\x49\144\145\x6e\164\x69\164\x79\x20\x50\162\157\x76\151\144\145\162\x20\x64\x65\164\x61\x69\x6c\163\x20\x73\141\x76\145\144\40\163\x75\143\143\x65\x73\163\146\165\154\154\171\56");
$this->mo_saml_show_success_message();
l9:
BM:
BX:
if (!(isset($_POST["\x6f\160\164\x69\x6f\x6e"]) and $_POST["\x6f\160\164\x69\x6f\156"] == "\154\x6f\147\151\156\x5f\x77\x69\x64\x67\145\x74\137\163\x61\155\x6c\137\x61\164\164\162\151\x62\x75\164\145\x5f\155\x61\x70\x70\x69\156\147")) {
goto Cw;
}
if (mo_saml_is_curl_installed()) {
goto xu;
}
update_option("\155\157\x5f\163\x61\155\x6c\x5f\155\x65\x73\x73\x61\x67\x65", "\x45\x52\x52\x4f\x52\72\40\74\x61\x20\150\x72\x65\146\x3d\42\150\x74\x74\x70\x3a\x2f\x2f\x70\x68\x70\x2e\156\145\164\57\x6d\x61\156\165\141\154\x2f\145\x6e\57\143\x75\x72\x6c\56\x69\156\163\x74\141\154\154\x61\x74\151\x6f\156\56\160\150\160\42\40\164\x61\162\147\x65\x74\x3d\42\137\x62\x6c\x61\156\x6b\x22\x3e\120\110\x50\40\x63\x55\122\114\x20\145\x78\x74\145\x6e\163\x69\157\156\74\x2f\141\x3e\x20\151\x73\x20\x6e\x6f\164\x20\151\x6e\x73\x74\x61\154\154\145\x64\x20\157\x72\x20\x64\x69\x73\x61\142\154\x65\x64\x2e\x20\123\x61\166\145\x20\101\x74\x74\x72\x69\x62\x75\x74\145\x20\115\x61\x70\x70\151\156\x67\x20\146\x61\x69\x6c\x65\x64\56");
$this->mo_saml_show_error_message();
return;
xu:
update_option("\x73\141\155\154\137\141\x6d\137\x75\163\145\162\156\x61\155\145", stripslashes($_POST["\x73\x61\x6d\x6c\x5f\141\155\x5f\x75\x73\145\162\x6e\141\x6d\x65"]));
update_option("\163\141\155\x6c\x5f\141\x6d\x5f\145\x6d\x61\151\154", stripslashes($_POST["\163\141\x6d\x6c\137\141\x6d\x5f\145\155\x61\151\154"]));
update_option("\x73\x61\155\x6c\137\141\155\137\146\151\x72\x73\164\x5f\156\141\x6d\145", stripslashes($_POST["\163\141\155\154\x5f\141\x6d\x5f\146\x69\x72\x73\x74\x5f\x6e\x61\x6d\x65"]));
update_option("\163\x61\x6d\x6c\x5f\141\155\x5f\154\x61\x73\x74\137\x6e\x61\155\x65", stripslashes($_POST["\x73\141\x6d\x6c\137\x61\155\137\x6c\x61\163\x74\x5f\156\141\155\145"]));
update_option("\163\141\155\x6c\x5f\x61\x6d\137\x67\162\x6f\165\x70\137\156\141\155\145", stripslashes($_POST["\x73\141\155\154\137\141\155\x5f\x67\162\157\165\x70\137\156\x61\155\145"]));
update_option("\x73\x61\x6d\x6c\x5f\141\155\137\x61\x63\143\157\165\156\164\137\155\x61\x74\143\x68\x65\x72", stripslashes($_POST["\163\141\x6d\x6c\x5f\x61\x6d\x5f\x61\143\x63\157\165\x6e\164\x5f\x6d\141\x74\x63\150\145\162"]));
update_option("\x73\x61\155\154\x5f\x61\x6d\x5f\144\151\163\160\154\x61\x79\137\156\x61\155\145", stripslashes($_POST["\163\141\155\154\x5f\x61\155\137\x64\151\x73\x70\154\x61\171\x5f\156\141\155\145"]));
$WN = array();
$ff = 0;
foreach ($_POST as $h7 => $pU) {
if (!(strpos($h7, "\155\157\x5f\x73\x61\155\154\137\143\165\163\164\x6f\x6d\x5f\141\164\x74\x72\x69\142\165\164\x65\137\153\x65\171") !== false && !empty($_POST[$h7]))) {
goto kd;
}
$ff++;
$xE = "\155\x6f\137\163\x61\155\x6c\137\143\x75\x73\164\x6f\155\137\141\x74\x74\x72\151\142\165\x74\x65\x5f\x76\141\x6c\x75\145\x5f" . $ff;
$WN[$pU] = $_POST[$xE];
kd:
Y7:
}
GA:
if (empty($WN)) {
goto za;
}
update_option("\x6d\x6f\x5f\x73\x61\155\154\x5f\x63\165\x73\x74\157\x6d\x5f\141\164\164\162\163\x5f\x6d\141\x70\x70\x69\x6e\x67", $WN);
za:
update_option("\x6d\157\x5f\x73\141\x6d\154\137\155\145\163\163\x61\x67\145", "\x41\x74\164\162\151\142\165\164\145\40\115\141\x70\x70\151\x6e\x67\x20\x64\x65\164\141\151\x6c\x73\x20\163\x61\x76\x65\x64\x20\x73\x75\143\x63\145\163\163\x66\165\x6c\154\x79");
$this->mo_saml_show_success_message();
Cw:
if (!(isset($_POST["\157\160\x74\x69\x6f\156"]) and $_POST["\157\x70\164\151\x6f\156"] == "\x6c\x6f\147\x69\x6e\x5f\167\x69\144\147\145\164\x5f\163\141\155\154\x5f\162\157\154\145\x5f\155\141\160\160\x69\x6e\147")) {
goto AG;
}
if (mo_saml_is_curl_installed()) {
goto mD;
}
update_option("\x6d\157\137\x73\141\x6d\154\x5f\155\145\163\163\x61\x67\145", "\x45\x52\122\x4f\x52\x3a\40\74\141\x20\150\162\x65\146\75\42\150\164\164\x70\72\x2f\57\x70\x68\160\x2e\156\x65\164\x2f\155\x61\156\165\x61\x6c\x2f\x65\x6e\57\x63\165\x72\x6c\x2e\x69\x6e\163\x74\x61\154\x6c\x61\164\x69\157\x6e\56\160\150\x70\42\40\x74\x61\x72\x67\145\x74\x3d\42\x5f\x62\154\141\x6e\x6b\x22\x3e\120\110\x50\x20\x63\125\x52\x4c\40\145\x78\x74\x65\x6e\163\x69\157\x6e\x3c\57\141\x3e\40\x69\x73\40\x6e\157\x74\x20\151\156\x73\x74\141\154\154\x65\x64\x20\x6f\x72\40\144\x69\163\x61\x62\154\145\x64\56\x20\x53\141\x76\145\40\122\157\154\145\x20\x4d\x61\x70\x70\x69\x6e\x67\x20\146\141\151\154\x65\144\x2e");
$this->mo_saml_show_error_message();
return;
mD:
if (!isset($_POST["\x73\x61\155\x6c\x5f\x61\x6d\x5f\144\145\146\141\x75\x6c\x74\137\x75\163\x65\x72\137\x72\x6f\x6c\x65"])) {
goto rh;
}
$mc = $_POST["\x73\x61\x6d\154\137\141\155\x5f\144\145\x66\x61\165\154\164\x5f\x75\x73\145\x72\137\162\157\x6c\145"];
update_option("\x73\x61\x6d\154\x5f\141\155\x5f\x64\145\146\141\x75\154\x74\137\x75\x73\145\162\x5f\162\x6f\x6c\x65", $mc);
rh:
if (isset($_POST["\163\x61\155\x6c\137\141\x6d\x5f\144\x6f\x6e\164\x5f\x61\154\x6c\157\167\x5f\x75\156\x6c\151\x73\x74\x65\144\137\x75\x73\145\x72\x5f\162\157\x6c\145"])) {
goto eR;
}
update_option("\x73\141\155\x6c\x5f\141\155\x5f\x64\x6f\x6e\164\137\x61\x6c\154\x6f\x77\137\x75\x6e\154\x69\163\x74\145\144\x5f\165\x73\x65\162\137\x72\x6f\154\145", "\x75\156\x63\x68\145\143\x6b\145\x64");
goto EM;
eR:
update_option("\163\x61\155\154\137\141\x6d\x5f\x64\145\146\x61\x75\154\164\x5f\165\163\145\x72\137\162\x6f\154\x65", false);
update_option("\163\x61\x6d\x6c\x5f\141\x6d\x5f\x64\x6f\156\x74\x5f\x61\154\x6c\157\x77\x5f\165\156\x6c\x69\x73\x74\145\x64\x5f\x75\163\145\162\137\x72\157\x6c\145", "\x63\150\x65\x63\153\145\x64");
EM:
if (isset($_POST["\x6d\157\x5f\x73\x61\x6d\154\x5f\144\157\x6e\x74\x5f\x63\162\x65\141\x74\x65\137\x75\163\145\x72\137\151\146\x5f\162\x6f\154\145\137\x6e\x6f\164\137\155\x61\x70\x70\x65\144"])) {
goto ip;
}
update_option("\155\x6f\x5f\x73\x61\x6d\154\137\144\157\x6e\164\137\x63\162\x65\141\164\x65\x5f\165\x73\145\x72\137\x69\x66\x5f\162\157\x6c\x65\137\156\x6f\164\137\x6d\x61\160\x70\145\x64", "\165\156\x63\150\x65\143\153\x65\144");
goto yc;
ip:
update_option("\x6d\x6f\x5f\x73\x61\155\154\137\144\157\x6e\x74\x5f\143\162\145\x61\x74\x65\137\x75\x73\145\x72\137\151\x66\x5f\162\157\x6c\x65\137\x6e\x6f\164\x5f\155\x61\160\160\x65\x64", "\x63\x68\145\x63\x6b\145\144");
update_option("\163\141\155\154\x5f\141\x6d\137\x64\145\x66\141\165\x6c\164\137\165\x73\145\x72\137\x72\x6f\154\x65", false);
update_option("\163\141\x6d\154\137\141\x6d\x5f\144\157\x6e\x74\137\141\154\x6c\157\x77\137\x75\156\154\151\x73\164\145\x64\x5f\165\163\x65\x72\x5f\x72\x6f\x6c\x65", "\165\156\x63\150\145\x63\153\145\144");
yc:
if (isset($_POST["\x6d\x6f\137\163\141\x6d\154\x5f\x64\157\156\x74\137\x75\x70\x64\141\164\x65\137\145\x78\151\x73\164\151\156\x67\x5f\165\163\145\x72\x5f\162\157\x6c\x65"])) {
goto Xx;
}
update_option("\x73\x61\x6d\x6c\x5f\141\x6d\x5f\x64\x6f\156\x74\137\165\x70\144\x61\x74\145\137\x65\170\x69\x73\164\x69\156\x67\137\165\163\x65\x72\137\x72\157\x6c\x65", "\x75\x6e\x63\150\x65\143\x6b\145\x64");
goto T5;
Xx:
update_option("\163\141\155\x6c\137\141\155\x5f\144\157\x6e\164\137\165\x70\x64\x61\164\x65\137\145\170\x69\163\x74\x69\156\x67\x5f\165\163\145\x72\137\162\x6f\154\x65", "\143\x68\x65\143\153\x65\144");
T5:
$UO = new WP_Roles();
$ao = $UO->get_names();
$ur;
foreach ($ao as $ty => $Fk) {
$Og = "\x73\141\x6d\x6c\x5f\141\155\x5f\147\162\157\165\x70\137\x61\164\x74\162\x5f\166\x61\x6c\165\145\x73\x5f" . $ty;
$ur[$ty] = stripslashes($_POST[$Og]);
Qq:
}
UC:
update_option("\163\x61\155\154\137\x61\x6d\137\162\x6f\x6c\x65\137\155\141\160\160\x69\x6e\147", $ur);
update_option("\x6d\x6f\137\163\x61\x6d\154\x5f\155\145\163\x73\141\x67\145", "\x52\157\154\x65\x20\x4d\141\160\160\151\x6e\147\x20\144\x65\x74\x61\x69\x6c\163\x20\x73\141\x76\145\x64\x20\163\x75\x63\x63\145\x73\x73\146\165\x6c\x6c\171\x2e");
$this->mo_saml_show_success_message();
AG:
if (!(isset($_POST["\x6f\160\x74\151\157\x6e"]) and $_POST["\x6f\x70\x74\x69\157\x6e"] == "\x6d\157\137\163\x61\155\154\137\165\160\144\x61\x74\x65\137\x69\x64\160\137\x73\145\x74\164\151\x6e\147\163\137\157\160\x74\151\157\156")) {
goto Ca;
}
if (!(isset($_POST["\155\157\x5f\163\141\155\x6c\x5f\163\x70\x5f\142\141\x73\145\x5f\x75\x72\x6c"]) && isset($_POST["\155\x6f\137\x73\x61\155\x6c\137\x73\160\137\145\156\x74\x69\x74\171\x5f\151\x64"]))) {
goto eT;
}
$xR = sanitize_text_field($_POST["\155\157\x5f\163\141\x6d\154\x5f\x73\160\x5f\142\141\163\x65\x5f\x75\162\154"]);
$Fx = sanitize_text_field($_POST["\155\x6f\137\163\141\155\154\x5f\163\160\x5f\145\156\164\x69\164\171\x5f\151\x64"]);
if (!(substr($xR, -1) == "\57")) {
goto Rj;
}
$xR = substr($xR, 0, -1);
Rj:
update_option("\x6d\157\x5f\163\x61\x6d\x6c\x5f\163\x70\x5f\x62\x61\x73\145\137\x75\x72\x6c", $xR);
update_option("\155\157\x5f\163\141\155\x6c\x5f\163\160\137\x65\156\164\151\164\171\137\151\144", $Fx);
eT:
update_option("\155\157\x5f\163\x61\x6d\154\137\155\x65\x73\163\x61\147\145", "\x53\x65\164\164\x69\156\147\x73\40\165\160\x64\x61\x74\145\144\40\163\165\x63\x63\x65\163\163\146\x75\154\x6c\171\56");
$this->mo_saml_show_success_message();
Ca:
if (!(isset($_POST["\157\160\164\x69\x6f\156"]) and $_POST["\157\x70\164\x69\x6f\156"] == "\x73\x61\155\154\x5f\165\160\x6c\x6f\141\144\137\155\145\164\x61\x64\141\164\x61")) {
goto YZ;
}
if (function_exists("\167\160\x5f\150\x61\x6e\x64\154\145\137\165\x70\x6c\157\141\x64")) {
goto no;
}
require_once ABSPATH . "\x77\160\x2d\141\x64\x6d\x69\x6e\57\151\156\x63\x6c\x75\144\145\x73\x2f\146\x69\x6c\x65\56\160\150\160";
no:
$this->_handle_upload_metadata();
YZ:
if (!(isset($_POST["\157\x70\x74\151\x6f\156"]) and $_POST["\x6f\160\x74\x69\157\x6e"] == "\155\157\137\x73\x61\155\154\137\162\x65\154\x61\171\x5f\x73\164\141\x74\145\137\157\160\x74\151\x6f\156")) {
goto zb;
}
$AZ = sanitize_text_field($_POST["\155\x6f\137\x73\x61\x6d\154\137\162\x65\154\141\171\137\163\x74\x61\x74\145"]);
update_option("\155\157\x5f\163\141\x6d\154\137\x72\145\x6c\x61\171\137\x73\x74\x61\x74\145", $AZ);
update_option("\x6d\x6f\137\x73\141\155\154\137\155\x65\x73\x73\x61\147\x65", "\122\145\154\x61\x79\40\123\x74\141\x74\145\x20\x75\160\144\x61\164\x65\144\40\163\165\143\x63\x65\163\x73\x66\x75\x6c\154\171\56");
$this->mo_saml_show_success_message();
zb:
if (!(isset($_POST["\157\x70\x74\x69\157\156"]) and $_POST["\157\160\x74\x69\157\156"] == "\x73\x61\155\x6c\x5f\147\x65\156\145\162\x61\x74\145\x5f\x63\x65\162\x74\151\146\151\143\141\x74\x65")) {
goto bV;
}
$ys = array("\143\157\x75\156\164\x72\x79\116\141\x6d\145" => $_POST["\x63\157\x75\156\164\x72\x79"], "\x73\x74\x61\x74\x65\x4f\x72\120\x72\157\166\151\x6e\x63\x65\x4e\x61\x6d\145" => $_POST["\x73\x74\x61\164\145"], "\x6c\157\143\x61\x6c\x69\x74\171\116\141\x6d\145" => $_POST["\x6c\157\x63\x61\x6c\x69\x74\x79"], "\157\x72\x67\x61\156\151\x7a\141\164\x69\157\156\116\141\x6d\145" => $_POST["\157\x72\x67"], "\157\162\x67\141\156\151\172\141\164\151\x6f\156\141\x6c\x55\156\151\x74\116\141\155\x65" => $_POST["\x6f\x72\147\137\x75\x6e\x69\164"], "\x63\x6f\x6d\155\157\x6e\x4e\141\x6d\145" => $_POST["\x63\156"], "\145\x6d\141\x69\x6c\x41\144\x64\x72\145\163\163" => $_POST["\145\155\x61\x69\x6c"]);
$Kb = array("\144\x69\147\145\x73\164\137\x61\x6c\147" => $_POST["\150\141\x73\150\x5f\x61\154\147\157\x72\x69\x74\150\x6d"], "\x78\65\x30\x39\137\145\x78\x74\145\156\x73\x69\157\156\163" => "\x76\x33\x5f\143\141", "\x70\x72\151\x76\141\164\x65\x5f\x6b\x65\x79\137\142\151\164\163" => 2048, "\x70\x72\x69\166\141\x74\x65\x5f\153\x65\171\137\164\171\160\x65" => OPENSSL_KEYTYPE_RSA, "\x65\156\x63\162\x79\160\164\x5f\153\x65\x79" => false);
$jr = CertificateUtility::generate_certificate($ys, $Kb, (int) $_POST["\145\170\160\x69\162\171\x5f\144\141\x79\x73"]);
$MA = plugin_dir_path(__FILE__) . "\x72\145\163\x6f\165\162\x63\x65\163" . DIRECTORY_SEPARATOR . "\163\160\55\x63\x65\162\164\x69\x66\151\x63\141\x74\145\x2e\143\x72\x74";
$El = plugin_dir_path(__FILE__) . "\x72\x65\x73\157\165\x72\x63\x65\163" . DIRECTORY_SEPARATOR . "\x73\160\x2d\x6b\x65\171\56\x6b\145\x79";
$hk = plugin_dir_path(__FILE__) . "\x72\145\x73\157\x75\x72\x63\x65\x73" . DIRECTORY_SEPARATOR . "\163\160\x2d\143\145\162\x74\x69\146\x69\143\x61\x74\145\56\143\x72\164\56\x62\141\x63\x6b\165\x70";
if (file_exists($hk)) {
goto J2;
}
$Pj = plugin_dir_path(__FILE__) . "\x72\145\163\157\x75\x72\143\145\163" . DIRECTORY_SEPARATOR . "\x73\x70\x2d\153\145\171\56\x6b\145\x79\56\142\141\143\153\165\x70";
copy($MA, $hk);
copy($El, $Pj);
J2:
$JC = file_put_contents($MA, $jr["\160\x75\x62\x6c\151\x63\137\x6b\x65\171"]);
$JC = $JC && file_put_contents($El, $jr["\x70\162\x69\x76\x61\164\x65\x5f\x6b\145\x79"]);
if ($JC) {
goto Ym;
}
update_option("\155\157\137\x73\x61\155\x6c\137\155\x65\163\163\x61\147\145", "\105\x72\162\x6f\x72\40\x6f\x63\x63\165\162\145\x64\40\167\x68\x69\x6c\x65\40\147\x65\x6e\x65\162\x61\164\x69\x6e\147\x20\x74\150\145\40\143\145\x72\x74\x69\146\x69\143\141\x74\145\x73\x2e\x20\x53\x65\145\x20\120\x48\x50\x20\145\x72\x72\157\162\x20\154\157\147\x73\40\x61\x6e\x64\40\x6d\141\x6b\145\x20\x73\165\x72\x65\x20\150\x61\166\x65\40\163\x65\x74\40\x77\162\x69\x74\145\x20\x70\145\162\x6d\x69\x73\x73\151\x6f\156\56");
$this->mo_saml_show_error_message();
goto cg;
Ym:
update_option("\155\157\137\163\x61\x6d\154\137\x6d\x65\x73\x73\141\147\145", "\x4e\145\x77\x20\143\145\162\164\151\x66\x69\143\x61\164\145\163\40\147\x65\x6e\145\x72\141\164\145\x64\40\x73\x75\143\x63\x65\x73\x73\x66\165\154\x6c\171\x2e");
$this->mo_saml_show_success_message();
cg:
bV:
if (!(isset($_POST["\x6f\160\x74\151\157\156"]) and $_POST["\x6f\160\164\x69\157\x6e"] == "\x6d\157\137\163\x61\155\x6c\137\162\x65\147\151\163\164\145\162\x5f\143\x75\x73\164\x6f\x6d\145\x72")) {
goto rm;
}
if (mo_saml_is_curl_installed()) {
goto Rq;
}
update_option("\x6d\x6f\137\x73\x61\155\x6c\x5f\155\x65\x73\x73\141\147\145", "\x45\x52\122\117\122\72\x20\74\141\40\x68\x72\x65\x66\x3d\x22\150\164\x74\x70\x3a\x2f\x2f\x70\x68\160\x2e\156\x65\164\57\x6d\x61\156\165\x61\x6c\x2f\145\x6e\x2f\143\x75\x72\x6c\56\151\x6e\x73\x74\141\x6c\x6c\141\164\x69\157\x6e\x2e\160\x68\160\42\x20\164\141\x72\147\x65\164\75\x22\x5f\142\154\141\156\153\42\76\120\110\120\40\143\x55\122\x4c\x20\x65\170\x74\145\x6e\163\x69\x6f\x6e\74\x2f\141\x3e\40\151\163\40\x6e\157\164\x20\x69\x6e\x73\164\141\x6c\154\145\x64\x20\157\162\40\144\x69\x73\141\142\x6c\x65\144\x2e\40\122\x65\x67\151\x73\x74\162\141\x74\x69\157\156\x20\x66\141\151\x6c\x65\144\56");
$this->mo_saml_show_error_message();
return;
Rq:
$oK = '';
$fm = '';
$oL = '';
$OL = '';
if ($this->mo_saml_check_empty_or_null($_POST["\145\x6d\141\x69\154"]) || $this->mo_saml_check_empty_or_null($_POST["\x70\x61\163\163\x77\157\x72\144"]) || $this->mo_saml_check_empty_or_null($_POST["\x63\x6f\156\x66\x69\162\x6d\x50\x61\x73\x73\167\x6f\x72\144"])) {
goto H7;
}
if (strlen($_POST["\x70\x61\163\163\x77\157\x72\144"]) < 6 || strlen($_POST["\x63\x6f\x6e\146\x69\162\x6d\120\x61\x73\163\167\x6f\x72\144"]) < 6) {
goto TF;
}
$oK = sanitize_email($_POST["\145\155\x61\151\154"]);
$fm = sanitize_text_field($_POST["\160\150\157\156\145"]);
$oL = sanitize_text_field($_POST["\160\x61\163\x73\167\x6f\x72\x64"]);
$OL = sanitize_text_field($_POST["\x63\x6f\156\146\x69\162\155\x50\141\163\163\x77\157\162\144"]);
goto IP;
TF:
update_option("\x6d\157\137\x73\x61\x6d\x6c\x5f\155\145\163\163\x61\147\x65", "\103\150\x6f\157\x73\x65\x20\x61\40\x70\141\163\163\x77\157\162\144\40\167\151\164\150\x20\155\151\156\x69\x6d\x75\155\x20\x6c\x65\156\147\164\150\40\66\x2e");
$this->mo_saml_show_error_message();
return;
IP:
goto Pf;
H7:
update_option("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\x6d\x65\163\163\x61\x67\x65", "\x41\x6c\154\x20\x74\x68\x65\40\146\x69\145\154\x64\163\40\x61\x72\145\x20\162\145\x71\165\151\x72\x65\x64\56\x20\x50\154\x65\x61\x73\145\40\145\156\164\x65\162\x20\x76\x61\x6c\151\x64\40\x65\x6e\164\x72\x69\x65\163\56");
$this->mo_saml_show_error_message();
return;
Pf:
update_option("\155\157\137\163\x61\x6d\x6c\137\x61\x64\155\151\156\x5f\145\x6d\141\x69\154", $oK);
update_option("\155\x6f\x5f\163\x61\155\154\137\x61\144\x6d\151\x6e\x5f\x70\x68\157\156\x65", $fm);
if (strcmp($oL, $OL) == 0) {
goto up;
}
update_option("\x6d\x6f\137\163\141\155\154\137\x6d\x65\x73\x73\x61\x67\x65", "\120\x61\163\x73\x77\157\162\x64\x73\40\144\157\40\x6e\157\164\x20\155\141\x74\143\x68\56");
delete_option("\155\x6f\137\x73\141\155\x6c\137\166\145\162\x69\146\x79\x5f\143\165\x73\x74\x6f\155\x65\162");
$this->mo_saml_show_error_message();
goto cj;
up:
update_option("\x6d\157\137\163\x61\x6d\x6c\137\x61\x64\x6d\x69\x6e\x5f\x70\x61\163\x73\x77\157\162\x64", $oL);
$oK = get_option("\x6d\157\137\x73\x61\x6d\154\x5f\x61\144\155\151\156\137\145\x6d\x61\151\x6c");
$di = new CustomerSaml();
$F5 = json_decode($di->check_customer(), true);
if (strcasecmp($F5["\x73\164\141\164\x75\x73"], "\x43\125\123\x54\117\115\105\x52\137\x4e\x4f\124\137\106\x4f\125\116\104") == 0) {
goto yl;
}
$this->get_current_customer();
goto kn;
yl:
$F5 = json_decode($di->send_otp_token($oK, ''), true);
if (strcasecmp($F5["\163\x74\x61\x74\165\163"], "\x53\125\x43\103\x45\x53\123") == 0) {
goto gW;
}
update_option("\155\157\x5f\x73\x61\155\x6c\x5f\x6d\145\x73\x73\x61\147\145", "\124\x68\x65\162\145\40\167\x61\163\x20\x61\156\x20\145\x72\162\157\x72\40\151\x6e\x20\163\x65\x6e\x64\151\156\x67\x20\145\x6d\x61\x69\x6c\x2e\x20\120\x6c\145\x61\x73\x65\40\x76\x65\x72\x69\146\x79\x20\x79\157\165\162\40\145\155\x61\151\x6c\40\141\156\x64\40\164\x72\x79\40\x61\147\141\151\156\x2e");
update_option("\155\x6f\137\163\x61\x6d\154\137\x72\x65\x67\x69\x73\x74\x72\x61\164\x69\157\156\x5f\x73\x74\x61\164\165\x73", "\x4d\x4f\137\117\x54\x50\137\104\x45\114\x49\x56\x45\x52\105\x44\x5f\x46\x41\111\x4c\x55\x52\x45\x5f\105\115\x41\111\114");
$this->mo_saml_show_error_message();
goto eo;
gW:
update_option("\x6d\157\137\163\x61\x6d\x6c\x5f\x6d\x65\x73\163\141\x67\x65", "\40\101\40\157\156\145\x20\x74\x69\x6d\x65\40\x70\141\163\x73\x63\157\144\145\40\x69\x73\x20\x73\145\156\x74\40\x74\157\x20" . get_option("\155\x6f\x5f\163\x61\x6d\x6c\137\x61\144\155\151\x6e\x5f\x65\x6d\x61\x69\x6c") . "\x2e\x20\x50\154\x65\x61\163\x65\x20\145\x6e\x74\145\162\x20\x74\x68\x65\x20\157\x74\x70\x20\150\x65\162\145\x20\164\157\x20\166\x65\162\x69\146\171\40\171\157\165\162\x20\145\x6d\141\151\154\56");
update_option("\x6d\157\x5f\x73\141\155\154\137\x74\x72\141\x6e\163\141\143\164\151\157\156\x49\144", $F5["\x74\x78\111\144"]);
update_option("\x6d\157\x5f\x73\x61\x6d\154\137\x72\x65\x67\x69\x73\x74\162\x61\x74\x69\157\156\137\163\164\141\x74\165\163", "\x4d\117\137\x4f\124\120\137\x44\105\x4c\111\x56\105\122\x45\x44\137\x53\x55\103\103\x45\123\123\x5f\105\x4d\101\111\x4c");
$this->mo_saml_show_success_message();
eo:
kn:
cj:
rm:
if (!(isset($_POST["\x6f\x70\164\x69\157\156"]) and $_POST["\x6f\x70\164\151\x6f\156"] == "\x6d\x6f\x5f\163\x61\155\154\x5f\166\x61\x6c\x69\144\141\164\x65\137\x6f\164\160")) {
goto cd;
}
if (mo_saml_is_curl_installed()) {
goto q0;
}
update_option("\155\x6f\137\163\x61\x6d\154\137\155\x65\163\x73\141\x67\x65", "\105\x52\x52\x4f\x52\x3a\x20\x3c\141\x20\150\162\x65\146\x3d\42\150\x74\x74\160\x3a\x2f\57\160\x68\x70\56\x6e\x65\x74\57\155\141\156\x75\141\154\x2f\145\x6e\57\x63\x75\x72\x6c\56\151\x6e\163\x74\x61\x6c\x6c\x61\x74\151\157\x6e\x2e\x70\x68\160\x22\40\x74\x61\x72\147\x65\164\75\42\x5f\x62\x6c\x61\x6e\x6b\x22\76\120\x48\120\40\143\x55\x52\x4c\40\x65\x78\164\x65\x6e\163\151\157\x6e\74\x2f\141\x3e\x20\151\163\40\x6e\157\x74\40\x69\x6e\163\164\x61\x6c\154\145\x64\x20\x6f\162\x20\x64\151\163\141\142\154\x65\144\x2e\x20\x56\x61\x6c\x69\x64\x61\164\145\x20\117\124\120\40\x66\141\x69\154\145\144\56");
$this->mo_saml_show_error_message();
return;
q0:
$r5 = '';
if ($this->mo_saml_check_empty_or_null($_POST["\x6f\x74\160\137\x74\x6f\x6b\x65\156"])) {
goto xW;
}
$r5 = sanitize_text_field($_POST["\157\164\x70\x5f\x74\157\x6b\x65\156"]);
goto GE;
xW:
update_option("\x6d\157\137\163\x61\155\154\x5f\x6d\145\163\163\x61\x67\145", "\120\154\x65\141\x73\x65\40\x65\156\164\145\162\40\x61\40\166\x61\x6c\x75\145\x20\151\156\x20\157\164\160\x20\x66\x69\x65\154\x64\x2e");
$this->mo_saml_show_error_message();
return;
GE:
$di = new CustomerSaml();
$F5 = json_decode($di->validate_otp_token(get_option("\155\157\x5f\x73\141\155\x6c\137\164\162\141\156\163\141\x63\x74\x69\157\156\111\x64"), $r5), true);
if (strcasecmp($F5["\163\164\x61\x74\165\x73"], "\123\125\103\103\x45\x53\x53") == 0) {
goto T4;
}
update_option("\155\157\137\x73\x61\155\154\137\155\x65\163\x73\141\147\145", "\x49\x6e\x76\x61\x6c\151\x64\40\157\x6e\145\x20\x74\151\x6d\x65\40\x70\141\x73\163\143\x6f\x64\145\56\40\x50\x6c\145\141\163\x65\40\145\x6e\x74\145\162\x20\x61\x20\166\141\154\x69\144\40\157\x74\160\56");
$this->mo_saml_show_error_message();
goto dY;
T4:
$this->create_customer();
dY:
cd:
if (isset($_POST["\x6f\x70\164\x69\x6f\x6e"]) and $_POST["\x6f\160\x74\151\157\x6e"] == "\x6d\157\137\x73\141\x6d\x6c\x5f\x76\145\x72\151\x66\171\137\143\165\x73\x74\x6f\x6d\145\162") {
goto R8;
}
if (isset($_POST["\x6f\160\164\151\157\156"]) and $_POST["\157\x70\164\x69\x6f\156"] == "\x6d\157\137\x73\141\155\154\x5f\x63\x6f\156\164\141\x63\x74\137\x75\x73\137\x71\x75\145\162\x79\137\157\x70\x74\x69\157\x6e") {
goto MC;
}
if (isset($_POST["\x6f\x70\x74\151\157\x6e"]) and $_POST["\157\160\x74\x69\x6f\156"] == "\x6d\157\x5f\x73\141\x6d\154\x5f\162\x65\163\x65\156\x64\137\157\164\160\x5f\145\x6d\141\151\x6c") {
goto EV;
}
if (isset($_POST["\157\x70\x74\151\157\156"]) and $_POST["\157\160\164\x69\x6f\156"] == "\155\x6f\x5f\163\141\x6d\154\x5f\x72\x65\x73\x65\156\x64\137\157\x74\160\x5f\160\150\157\x6e\x65") {
goto bG;
}
if (isset($_POST["\157\x70\x74\x69\157\x6e"]) and $_POST["\157\x70\164\x69\x6f\156"] == "\x6d\157\x5f\x73\x61\x6d\154\137\x67\x6f\x5f\142\141\143\x6b") {
goto NJ;
}
if (isset($_POST["\157\160\x74\x69\x6f\156"]) and $_POST["\157\160\164\x69\x6f\156"] == "\x6d\157\x5f\x73\x61\155\x6c\x5f\x72\145\x67\x69\163\164\x65\x72\x5f\x77\151\x74\150\137\x70\150\x6f\x6e\145\137\157\160\164\x69\x6f\x6e") {
goto GY;
}
if (isset($_POST["\157\160\164\151\157\156"]) and $_POST["\157\160\x74\x69\x6f\156"] == "\155\x6f\x5f\163\141\x6d\x6c\137\x72\145\147\x69\x73\x74\145\162\145\x64\137\x6f\x6e\x6c\171\137\x61\x63\143\145\x73\x73\137\157\x70\164\x69\157\x6e") {
goto Ix;
}
if (isset($_POST["\157\160\x74\x69\x6f\x6e"]) and $_POST["\157\x70\x74\151\x6f\x6e"] == "\155\x6f\137\x73\141\155\154\x5f\146\157\x72\x63\145\x5f\x61\x75\x74\x68\x65\x6e\164\151\x63\141\164\151\157\156\x5f\157\x70\x74\x69\157\156") {
goto fR;
}
if (isset($_POST["\157\160\x74\151\x6f\x6e"]) and $_POST["\157\x70\164\151\157\x6e"] == "\155\x6f\137\163\x61\155\x6c\137\145\156\x61\142\154\x65\x5f\162\x73\x73\x5f\141\143\143\145\163\163\x5f\x6f\x70\164\151\157\156") {
goto pE;
}
if (isset($_POST["\x6f\160\x74\151\x6f\x6e"]) and $_POST["\x6f\160\164\x69\157\x6e"] == "\x6d\x6f\x5f\163\141\x6d\154\x5f\x65\x6e\x61\x62\154\145\137\x6c\x6f\147\x69\156\x5f\x72\145\144\x69\x72\x65\x63\164\x5f\x6f\x70\x74\151\x6f\x6e") {
goto ZU;
}
if (isset($_POST["\157\160\x74\151\157\x6e"]) and $_POST["\157\160\x74\x69\157\156"] == "\x6d\157\137\x73\x61\x6d\154\x5f\145\x6e\141\142\x6c\145\x5f\143\154\x6f\x75\x64\137\142\x72\157\x6b\145\x72") {
goto s6;
}
if (isset($_POST["\x6f\x70\164\151\x6f\156"]) and $_POST["\157\x70\164\151\x6f\156"] == "\x6d\x6f\137\x73\141\x6d\x6c\137\141\x6c\x6c\157\x77\x5f\167\x70\x5f\163\x69\x67\x6e\151\156\137\x6f\160\164\x69\x6f\x6e") {
goto t0;
}
if (isset($_POST["\x6f\160\164\x69\157\x6e"]) and $_POST["\157\160\x74\151\x6f\x6e"] == "\x6d\x6f\137\x73\x61\155\154\137\163\141\166\x65\137\x70\162\x6f\170\171\137\163\145\x74\164\151\156\x67") {
goto ED;
}
if (!(isset($_POST["\157\160\x74\151\x6f\156"]) && $_POST["\x6f\160\x74\151\x6f\156"] == "\x6d\x6f\x5f\163\141\155\154\x5f\x66\x6f\162\147\x6f\164\x5f\x70\x61\x73\x73\x77\157\x72\x64\x5f\x66\157\x72\x6d\x5f\157\x70\x74\151\x6f\156")) {
goto Re;
}
if (mo_saml_is_curl_installed()) {
goto mb;
}
update_option("\155\x6f\137\x73\x61\x6d\x6c\137\x6d\145\163\x73\141\x67\145", "\x45\122\x52\x4f\x52\72\40\x3c\x61\x20\x68\162\x65\146\75\x22\150\x74\x74\160\72\57\x2f\x70\150\x70\x2e\156\145\x74\57\x6d\141\156\x75\x61\x6c\57\x65\x6e\57\x63\165\x72\154\x2e\151\156\x73\x74\141\x6c\x6c\141\x74\x69\157\x6e\x2e\x70\150\160\x22\x20\164\141\x72\x67\x65\164\75\42\x5f\142\x6c\x61\x6e\153\42\76\120\x48\120\40\143\125\x52\x4c\x20\x65\170\164\145\156\163\151\x6f\156\x3c\57\141\x3e\40\151\163\x20\156\157\x74\40\x69\156\x73\x74\141\154\x6c\x65\x64\x20\157\x72\40\144\151\163\x61\x62\x6c\145\x64\56\x20\122\x65\x73\145\x6e\x64\40\117\124\120\x20\146\x61\x69\x6c\145\144\x2e");
$this->mo_saml_show_error_message();
return;
mb:
$oK = get_option("\x6d\x6f\137\x73\141\155\154\x5f\141\144\155\151\156\x5f\x65\x6d\141\x69\x6c");
$di = new Customersaml();
$F5 = json_decode($di->mo_saml_forgot_password($oK), true);
if (strcasecmp($F5["\163\x74\x61\164\165\x73"], "\123\x55\x43\x43\105\x53\123") == 0) {
goto js;
}
update_option("\155\157\x5f\x73\141\155\154\137\x6d\x65\x73\163\x61\147\145", "\x41\156\40\x65\x72\162\157\x72\40\157\x63\143\165\162\x65\x64\x20\x77\x68\151\154\145\x20\x70\162\x6f\143\145\163\x73\151\x6e\x67\x20\x79\x6f\165\162\x20\x72\x65\x71\x75\x65\163\x74\x2e\x20\120\x6c\x65\141\163\145\40\x54\162\x79\40\x61\147\x61\151\x6e\x2e");
$this->mo_saml_show_error_message();
goto QD;
js:
update_option("\x6d\x6f\x5f\x73\x61\155\x6c\137\x6d\145\163\x73\x61\147\145", "\131\x6f\165\x72\x20\160\x61\163\163\x77\157\x72\144\x20\x68\141\163\x20\142\145\145\156\x20\162\x65\163\145\164\x20\163\165\x63\143\x65\163\163\x66\165\x6c\x6c\171\56\40\120\x6c\145\141\x73\145\x20\145\x6e\164\145\x72\40\164\x68\x65\40\x6e\x65\167\40\x70\141\163\x73\x77\157\162\144\x20\163\145\156\x74\x20\164\157\40" . $oK . "\56");
$this->mo_saml_show_success_message();
QD:
Re:
goto nq;
ED:
update_option("\x6d\157\x5f\x70\x72\157\170\x79\x5f\x68\x6f\163\164", $_POST["\155\x6f\137\160\162\157\170\x79\x5f\x68\157\163\x74"]);
update_option("\155\157\x5f\x70\162\157\x78\x79\137\x70\157\162\164", $_POST["\155\157\x5f\x70\x72\x6f\170\171\137\160\157\x72\x74"]);
update_option("\155\157\137\160\x72\157\x78\x79\x5f\165\x73\x65\162\156\141\x6d\145", $_POST["\x6d\157\137\x70\162\157\170\x79\x5f\165\163\x65\162\156\x61\155\x65"]);
update_option("\x6d\157\137\160\162\157\170\171\x5f\160\x61\x73\x73\x77\x6f\162\x64", $_POST["\x6d\x6f\137\x70\162\x6f\170\x79\137\160\141\x73\x73\x77\157\x72\144"]);
update_option("\155\x6f\x5f\163\141\155\154\137\155\x65\163\163\141\x67\145", "\120\162\x6f\x78\171\x20\x73\x65\x74\164\151\156\147\x73\40\x73\x61\166\145\x64\40\x73\x75\143\143\145\x73\x73\146\x75\154\154\171");
$this->mo_saml_show_success_message();
nq:
goto ZI;
t0:
if (array_key_exists("\x6d\157\137\x73\x61\155\x6c\x5f\x61\154\x6c\157\167\137\167\160\x5f\x73\151\147\156\x69\x6e", $_POST)) {
goto ee;
}
$gN = "\146\x61\x6c\x73\x65";
goto EH;
ee:
$gN = $_POST["\155\x6f\x5f\x73\x61\155\x6c\137\141\154\x6c\x6f\167\x5f\167\160\x5f\x73\x69\x67\156\x69\x6e"];
EH:
if ($gN == "\164\162\x75\x65") {
goto fF;
}
update_option("\155\157\137\163\141\155\x6c\137\141\154\x6c\x6f\167\x5f\x77\x70\137\163\x69\147\156\151\x6e", '');
goto Oz;
fF:
update_option("\x6d\x6f\x5f\x73\141\155\154\137\141\154\154\x6f\x77\x5f\167\x70\x5f\163\x69\x67\x6e\x69\x6e", "\164\x72\165\145");
Oz:
update_option("\x6d\157\137\x73\x61\x6d\x6c\137\x6d\x65\x73\x73\x61\x67\145", "\123\151\147\x6e\40\111\156\40\x73\145\x74\x74\x69\156\x67\163\40\x75\x70\144\141\164\145\x64\x2e");
$this->mo_saml_show_success_message();
ZI:
goto Q9;
s6:
if (array_key_exists("\x6d\157\137\x73\x61\155\154\x5f\145\x6e\141\x62\154\145\137\x63\x6c\x6f\x75\x64\x5f\142\162\157\153\145\x72", $_POST)) {
goto KM;
}
$ns = "\x66\x61\154\x73\x65";
goto N5;
KM:
$ns = $_POST["\155\x6f\137\x73\x61\155\x6c\137\145\156\141\142\154\145\x5f\x63\154\157\x75\x64\x5f\x62\x72\x6f\153\145\x72"];
N5:
if ($ns == "\164\x72\x75\145") {
goto E6;
}
update_option("\155\x6f\x5f\163\141\x6d\x6c\137\x65\x6e\x61\142\154\x65\x5f\x63\154\157\x75\144\x5f\142\162\x6f\153\145\x72", "\x66\x61\154\163\x65");
goto yY;
E6:
update_option("\155\x6f\x5f\163\141\155\x6c\x5f\145\156\x61\142\154\x65\x5f\x63\154\157\165\144\137\x62\x72\x6f\x6b\x65\162", "\x74\162\x75\x65");
yY:
update_option("\155\157\137\163\x61\155\154\137\155\145\163\x73\x61\147\145", "\x53\151\x67\156\40\x69\x6e\x20\157\x70\164\x69\157\156\x73\x20\165\x70\144\x61\x74\x65\x64\x2e");
$this->mo_saml_show_success_message();
Q9:
goto SR;
ZU:
if (mo_saml_is_sp_configured()) {
goto uH;
}
update_option("\x6d\x6f\x5f\163\141\155\154\x5f\155\145\x73\x73\141\x67\x65", "\x50\154\145\141\x73\x65\40\x63\x6f\155\160\x6c\145\164\x65\x20\74\x61\40\150\162\x65\x66\x3d\x22" . add_query_arg(array("\x74\141\142" => "\163\141\x76\145"), $_SERVER["\x52\x45\121\125\105\x53\124\137\x55\x52\111"]) . "\42\40\x2f\x3e\123\145\x72\166\151\x63\145\x20\x50\162\x6f\166\151\144\145\x72\x3c\x2f\141\x3e\x20\x63\157\x6e\x66\151\x67\x75\x72\x61\x74\x69\157\156\40\x66\x69\x72\x73\x74\x2e");
$this->mo_saml_show_error_message();
goto Lc;
uH:
if (array_key_exists("\155\157\137\x73\x61\155\x6c\x5f\145\x6e\141\x62\x6c\x65\x5f\154\157\147\151\x6e\137\x72\145\x64\151\x72\145\143\x74", $_POST)) {
goto ii;
}
$ns = "\146\x61\154\163\x65";
goto cE;
ii:
$ns = $_POST["\x6d\157\137\163\141\155\154\x5f\x65\x6e\141\142\154\x65\x5f\154\x6f\147\x69\156\x5f\162\x65\144\151\x72\x65\x63\164"];
cE:
if ($ns == "\164\x72\165\145") {
goto Cf;
}
update_option("\x6d\x6f\137\x73\141\x6d\x6c\x5f\145\x6e\141\142\x6c\145\137\154\157\147\151\156\x5f\x72\x65\x64\151\x72\145\x63\x74", '');
update_option("\155\157\x5f\163\x61\x6d\x6c\137\141\x6c\154\x6f\x77\x5f\167\160\137\x73\x69\147\x6e\x69\x6e", '');
goto Nu;
Cf:
update_option("\x6d\157\137\163\x61\155\154\137\x65\156\141\x62\x6c\145\x5f\154\x6f\147\x69\156\x5f\162\145\144\x69\162\x65\x63\x74", "\164\162\165\x65");
update_option("\x6d\157\x5f\x73\141\x6d\154\x5f\141\x6c\154\x6f\x77\x5f\x77\x70\x5f\x73\151\x67\156\151\x6e", "\164\162\165\x65");
Nu:
update_option("\155\x6f\x5f\x73\141\x6d\x6c\x5f\x6d\x65\163\x73\141\x67\x65", "\x53\151\x67\156\40\x69\x6e\x20\157\x70\x74\151\x6f\x6e\x73\x20\165\x70\x64\x61\x74\x65\x64\56");
$this->mo_saml_show_success_message();
Lc:
SR:
goto yn;
pE:
if (mo_saml_is_sp_configured()) {
goto SG;
}
update_option("\x6d\157\x5f\x73\141\x6d\x6c\137\155\x65\163\163\141\147\x65", "\x50\154\145\141\163\x65\40\x63\x6f\x6d\x70\x6c\145\x74\145\x20\74\141\x20\150\162\145\x66\x3d\42" . add_query_arg(array("\164\x61\142" => "\163\141\166\x65"), $_SERVER["\x52\105\121\x55\x45\123\x54\137\x55\x52\111"]) . "\x22\x20\57\x3e\x53\x65\x72\166\151\x63\145\40\x50\162\157\x76\x69\x64\x65\x72\74\x2f\141\76\40\143\157\156\146\x69\147\x75\162\x61\164\x69\x6f\x6e\40\146\151\x72\x73\x74\56");
$this->mo_saml_show_error_message();
goto HE;
SG:
if (array_key_exists("\155\157\137\x73\x61\x6d\x6c\x5f\x65\156\x61\142\x6c\145\137\162\x73\163\137\141\143\143\x65\163\163", $_POST)) {
goto Tb;
}
$GN = false;
goto k3;
Tb:
$GN = $_POST["\155\x6f\x5f\x73\x61\155\x6c\x5f\145\x6e\141\x62\x6c\145\x5f\x72\163\x73\x5f\x61\x63\x63\145\163\163"];
k3:
if ($GN == "\x74\162\x75\145") {
goto Jm;
}
update_option("\x6d\157\x5f\163\141\155\x6c\x5f\145\156\x61\142\154\x65\x5f\x72\163\163\x5f\x61\x63\x63\145\163\163", '');
goto Mo;
Jm:
update_option("\x6d\x6f\x5f\x73\141\155\154\137\x65\156\141\x62\x6c\145\137\162\x73\163\x5f\141\x63\143\145\x73\163", "\x74\162\x75\x65");
Mo:
update_option("\155\x6f\137\163\x61\x6d\154\x5f\155\145\163\x73\x61\x67\x65", "\x52\x53\x53\x20\x46\145\145\x64\x20\157\x70\164\151\157\156\x20\165\160\x64\x61\x74\145\144\x2e");
$this->mo_saml_show_success_message();
HE:
yn:
goto s0;
fR:
if (mo_saml_is_sp_configured()) {
goto os;
}
update_option("\155\157\x5f\x73\x61\x6d\154\137\155\x65\x73\x73\x61\x67\x65", "\120\x6c\x65\x61\x73\145\40\143\157\x6d\160\154\145\164\145\40\74\141\x20\x68\x72\145\146\75\42" . add_query_arg(array("\164\141\x62" => "\x73\x61\166\x65"), $_SERVER["\x52\x45\x51\x55\x45\123\124\137\125\x52\x49"]) . "\42\40\x2f\76\123\x65\162\166\151\x63\145\40\x50\162\x6f\166\x69\144\x65\162\x3c\57\141\x3e\40\x63\157\x6e\146\x69\147\165\x72\141\x74\x69\157\x6e\x20\146\x69\x72\x73\x74\x2e");
$this->mo_saml_show_error_message();
goto OD;
os:
if (array_key_exists("\155\x6f\137\x73\x61\x6d\x6c\137\146\x6f\162\143\x65\137\141\x75\164\150\x65\x6e\164\x69\x63\141\164\151\157\x6e", $_POST)) {
goto Xk;
}
$ns = "\x66\x61\154\163\145";
goto t5;
Xk:
$ns = $_POST["\x6d\157\137\x73\x61\155\154\x5f\x66\x6f\162\143\x65\137\141\165\x74\x68\x65\x6e\x74\151\x63\x61\x74\151\157\x6e"];
t5:
if ($ns == "\x74\162\x75\x65") {
goto sA;
}
update_option("\x6d\157\137\163\x61\x6d\154\137\x66\157\162\143\145\137\141\x75\164\x68\145\x6e\x74\151\x63\x61\x74\151\x6f\x6e", '');
goto LO;
sA:
update_option("\155\157\137\x73\x61\x6d\154\137\x66\157\x72\x63\145\137\141\x75\x74\150\145\x6e\164\151\143\x61\x74\x69\157\x6e", "\x74\x72\165\145");
LO:
update_option("\x6d\x6f\137\163\141\x6d\x6c\137\155\145\163\x73\x61\147\x65", "\123\x69\147\x6e\40\151\156\x20\157\160\x74\151\157\156\x73\40\x75\160\144\x61\164\145\144\x2e");
$this->mo_saml_show_success_message();
OD:
s0:
goto hh;
Ix:
if (mo_saml_is_sp_configured()) {
goto Vt;
}
update_option("\155\157\137\163\141\155\154\x5f\155\145\163\163\141\147\145", "\120\x6c\x65\x61\163\145\40\x63\x6f\x6d\160\x6c\x65\164\x65\x20\x3c\x61\x20\150\162\x65\x66\75\x22" . add_query_arg(array("\164\x61\142" => "\x73\x61\166\x65"), $_SERVER["\122\x45\121\125\x45\x53\124\x5f\x55\122\x49"]) . "\x22\x20\x2f\76\x53\145\x72\166\151\x63\145\x20\120\162\x6f\166\x69\x64\x65\162\x3c\x2f\141\x3e\x20\x63\157\156\146\x69\x67\165\x72\141\x74\151\157\156\40\x66\x69\162\163\x74\56");
$this->mo_saml_show_error_message();
goto st;
Vt:
if (array_key_exists("\x6d\157\x5f\163\x61\x6d\154\137\x72\145\147\151\x73\x74\145\x72\145\144\x5f\157\156\154\171\x5f\x61\143\x63\145\163\163", $_POST)) {
goto kW;
}
$ns = "\146\141\154\x73\145";
goto tA;
kW:
$ns = $_POST["\x6d\157\137\x73\141\155\x6c\137\x72\x65\x67\151\x73\x74\145\162\x65\144\x5f\x6f\x6e\x6c\171\x5f\x61\x63\143\145\x73\x73"];
tA:
if ($ns == "\164\162\x75\x65") {
goto xy;
}
update_option("\155\157\137\x73\x61\x6d\154\137\162\x65\147\x69\x73\164\145\162\145\144\x5f\x6f\x6e\x6c\171\x5f\x61\x63\x63\x65\163\x73", '');
goto LG;
xy:
update_option("\x6d\157\x5f\x73\x61\155\x6c\x5f\162\x65\x67\x69\x73\x74\x65\162\145\144\137\157\156\154\x79\x5f\141\x63\143\x65\x73\x73", "\x74\x72\165\x65");
LG:
update_option("\x6d\157\x5f\x73\x61\155\x6c\137\155\x65\163\163\141\147\145", "\123\x69\x67\x6e\40\x69\x6e\x20\157\x70\x74\x69\157\x6e\163\x20\x75\x70\144\141\164\145\144\56");
$this->mo_saml_show_success_message();
st:
hh:
goto gd;
GY:
if (mo_saml_is_curl_installed()) {
goto iG;
}
update_option("\155\x6f\x5f\x73\x61\155\x6c\x5f\155\x65\163\163\141\147\145", "\105\x52\122\x4f\122\x3a\x20\x3c\141\40\150\x72\145\146\x3d\42\150\x74\164\160\x3a\x2f\x2f\x70\x68\160\x2e\156\145\164\57\155\141\156\165\x61\x6c\x2f\x65\156\x2f\143\165\x72\154\56\x69\x6e\x73\164\x61\154\x6c\141\x74\151\157\x6e\56\160\150\x70\x22\40\164\x61\162\x67\x65\x74\x3d\42\x5f\142\154\x61\156\x6b\x22\x3e\x50\110\x50\40\x63\x55\122\114\40\x65\170\164\x65\x6e\163\x69\x6f\156\x3c\57\x61\x3e\x20\x69\x73\x20\156\157\164\x20\x69\156\x73\x74\141\154\154\x65\144\40\157\x72\40\x64\x69\163\x61\142\154\145\144\56\40\x52\145\x73\145\156\x64\40\x4f\x54\120\x20\x66\141\x69\x6c\145\144\x2e");
$this->mo_saml_show_error_message();
return;
iG:
$fm = sanitize_text_field($_POST["\160\150\x6f\x6e\145"]);
$fm = str_replace("\x20", '', $fm);
$fm = str_replace("\55", '', $fm);
update_option("\x6d\x6f\137\163\141\155\x6c\137\x61\144\x6d\151\156\137\160\150\157\156\x65", $fm);
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token('', $fm, FALSE, TRUE), true);
if (strcasecmp($F5["\163\164\x61\x74\x75\x73"], "\x53\125\x43\x43\x45\x53\123") == 0) {
goto pn;
}
update_option("\x6d\x6f\137\x73\141\x6d\154\137\155\x65\163\x73\141\147\x65", "\x54\x68\145\162\x65\x20\x77\x61\163\x20\x61\x6e\40\145\x72\x72\157\162\40\x69\156\40\163\145\156\x64\x69\x6e\147\40\x53\115\123\x2e\x20\120\154\x65\141\163\x65\40\x63\x6c\x69\x63\x6b\x20\157\x6e\x20\x52\145\163\145\x6e\x64\x20\x4f\124\x50\x20\164\x6f\40\x74\x72\171\x20\141\x67\x61\151\156\x2e");
update_option("\155\x6f\x5f\163\141\x6d\x6c\137\x72\145\x67\x69\x73\x74\162\141\x74\x69\157\156\137\x73\164\x61\x74\x75\163", "\x4d\x4f\137\117\124\x50\137\104\x45\114\111\126\x45\x52\105\x44\x5f\x46\x41\111\114\125\122\105\137\120\110\x4f\x4e\105");
$this->mo_saml_show_error_message();
goto r7;
pn:
update_option("\155\157\x5f\163\x61\155\154\x5f\155\x65\163\163\141\147\x65", "\40\101\x20\157\x6e\145\40\164\151\x6d\x65\40\x70\x61\x73\163\143\157\x64\x65\40\x69\x73\x20\x73\145\x6e\164\40\164\x6f\x20" . get_option("\x6d\x6f\137\163\141\x6d\x6c\x5f\141\144\155\x69\156\x5f\x70\150\157\156\x65") . "\x2e\x20\x50\x6c\x65\141\163\x65\x20\x65\156\x74\145\x72\x20\x74\150\x65\40\157\x74\160\40\x68\x65\162\x65\x20\x74\157\40\x76\x65\162\151\x66\x79\40\x79\157\x75\162\40\145\155\141\x69\154\56");
update_option("\155\157\137\163\141\x6d\x6c\x5f\x74\162\141\156\x73\141\x63\164\151\x6f\156\111\144", $F5["\164\170\111\x64"]);
update_option("\155\157\137\163\141\x6d\154\137\162\x65\147\151\x73\164\x72\x61\x74\151\x6f\x6e\137\163\164\141\164\x75\163", "\115\x4f\137\x4f\x54\120\x5f\x44\x45\114\x49\126\x45\122\105\104\x5f\123\x55\x43\103\105\123\x53\137\x50\110\x4f\x4e\x45");
$this->mo_saml_show_success_message();
r7:
gd:
goto co;
NJ:
update_option("\x6d\x6f\x5f\163\141\155\154\x5f\162\145\147\151\x73\164\162\141\x74\151\157\156\137\x73\x74\x61\164\165\163", '');
update_option("\x6d\x6f\x5f\163\x61\155\x6c\x5f\166\x65\162\151\146\171\137\143\x75\163\164\x6f\x6d\145\162", '');
delete_option("\155\x6f\137\163\141\155\154\137\x6e\x65\x77\137\x72\145\147\151\163\x74\x72\x61\x74\x69\157\156");
delete_option("\x6d\157\x5f\x73\141\x6d\x6c\137\x61\144\155\x69\156\x5f\145\x6d\141\x69\154");
delete_option("\155\x6f\x5f\x73\x61\x6d\154\137\x61\x64\155\x69\156\137\160\150\x6f\x6e\145");
delete_site_option("\163\x6d\154\x5f\x6c\153");
delete_site_option("\164\x5f\x73\x69\164\145\137\x73\164\141\x74\x75\x73");
delete_site_option("\x73\x69\x74\145\x5f\x63\x6b\x5f\154");
co:
goto qQ;
bG:
if (mo_saml_is_curl_installed()) {
goto NX;
}
update_option("\x6d\157\137\163\141\x6d\x6c\137\155\145\163\163\141\147\x65", "\105\122\122\x4f\122\72\40\x3c\x61\x20\150\162\145\x66\x3d\42\x68\164\164\160\72\x2f\57\x70\150\x70\56\x6e\145\x74\57\x6d\141\156\x75\x61\154\x2f\x65\156\57\x63\165\162\x6c\x2e\151\156\x73\164\x61\x6c\x6c\x61\x74\151\x6f\156\x2e\160\x68\x70\42\40\164\141\162\147\145\x74\75\42\137\142\x6c\x61\156\153\x22\x3e\120\110\x50\x20\x63\x55\122\x4c\x20\145\170\164\x65\x6e\x73\151\x6f\x6e\74\x2f\141\76\x20\151\x73\x20\x6e\x6f\x74\x20\151\x6e\163\x74\x61\154\x6c\145\x64\x20\157\x72\40\x64\x69\163\x61\142\154\x65\x64\56\40\x52\145\163\x65\x6e\144\x20\x4f\x54\120\40\x66\141\151\x6c\145\x64\56");
$this->mo_saml_show_error_message();
return;
NX:
$fm = get_option("\x6d\x6f\x5f\163\141\x6d\154\137\x61\x64\x6d\151\156\137\160\x68\157\156\x65");
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token('', $fm, FALSE, TRUE), true);
if (strcasecmp($F5["\163\164\x61\164\165\163"], "\123\x55\x43\103\x45\x53\x53") == 0) {
goto ts;
}
update_option("\x6d\x6f\137\x73\x61\155\x6c\x5f\x6d\x65\x73\163\141\x67\x65", "\x54\150\x65\x72\x65\x20\x77\x61\163\40\x61\x6e\x20\x65\162\162\x6f\x72\40\x69\156\x20\163\145\x6e\x64\x69\x6e\x67\40\x65\x6d\x61\151\x6c\56\x20\120\x6c\145\x61\163\145\40\x63\x6c\151\x63\x6b\x20\x6f\x6e\x20\x52\145\x73\x65\x6e\144\40\x4f\x54\x50\40\164\157\40\164\162\x79\x20\x61\147\141\x69\156\56");
update_option("\155\157\x5f\x73\x61\155\154\137\x72\145\147\x69\x73\x74\162\141\x74\x69\157\156\x5f\x73\164\141\164\165\163", "\x4d\117\137\x4f\124\x50\137\x44\x45\x4c\111\126\x45\x52\105\104\x5f\106\x41\111\x4c\x55\122\105\x5f\120\x48\x4f\x4e\105");
$this->mo_saml_show_error_message();
goto ds;
ts:
update_option("\155\x6f\137\x73\x61\155\x6c\137\155\x65\x73\163\141\x67\x65", "\40\x41\x20\157\x6e\x65\40\x74\151\155\145\x20\160\141\x73\x73\x63\157\144\x65\x20\151\x73\x20\163\x65\x6e\x74\40\164\157\x20" . $fm . "\40\141\x67\x61\151\156\56\x20\120\154\x65\141\x73\145\x20\143\x68\x65\x63\153\40\151\x66\40\x79\157\165\40\x67\x6f\164\40\x74\x68\145\x20\x6f\x74\160\x20\x61\x6e\144\40\145\156\164\145\162\x20\x69\164\x20\x68\x65\x72\145\x2e");
update_option("\155\157\x5f\163\x61\x6d\x6c\137\164\162\x61\x6e\x73\141\143\x74\151\157\x6e\x49\x64", $F5["\x74\x78\x49\x64"]);
update_option("\155\157\x5f\x73\x61\155\154\x5f\162\x65\147\151\x73\x74\162\141\x74\x69\x6f\x6e\137\x73\164\141\164\x75\163", "\x4d\117\137\117\x54\120\x5f\x44\x45\114\x49\126\105\122\105\104\x5f\x53\x55\103\x43\x45\123\x53\137\120\110\x4f\116\x45");
$this->mo_saml_show_success_message();
ds:
qQ:
goto ZT;
EV:
if (mo_saml_is_curl_installed()) {
goto Hg;
}
update_option("\155\157\137\163\x61\x6d\x6c\137\155\x65\x73\x73\x61\147\145", "\x45\122\x52\x4f\122\72\40\x3c\x61\40\150\x72\145\146\x3d\42\150\x74\x74\x70\72\x2f\x2f\x70\150\160\56\156\x65\x74\x2f\x6d\141\x6e\x75\141\154\x2f\x65\156\x2f\143\165\162\x6c\x2e\151\x6e\x73\x74\141\154\x6c\x61\164\x69\x6f\156\x2e\x70\150\160\42\40\164\x61\x72\147\x65\x74\x3d\x22\137\x62\154\x61\x6e\153\42\76\x50\x48\120\x20\143\125\122\114\x20\x65\170\x74\145\x6e\163\151\157\x6e\x3c\57\x61\76\40\151\163\x20\x6e\x6f\164\x20\151\x6e\163\164\x61\154\x6c\145\144\x20\157\x72\40\x64\151\163\141\x62\154\145\144\x2e\40\x52\x65\x73\x65\156\x64\x20\x4f\124\x50\x20\x66\141\x69\x6c\145\x64\56");
$this->mo_saml_show_error_message();
return;
Hg:
$oK = get_option("\x6d\x6f\137\x73\141\x6d\154\137\x61\x64\x6d\x69\x6e\x5f\x65\x6d\141\x69\154");
$di = new CustomerSaml();
$F5 = json_decode($di->send_otp_token($oK, ''), true);
if (strcasecmp($F5["\163\164\x61\164\x75\163"], "\123\x55\x43\103\105\123\123") == 0) {
goto cn;
}
update_option("\x6d\x6f\137\x73\x61\155\x6c\x5f\x6d\x65\x73\x73\141\147\145", "\x54\x68\x65\162\x65\40\167\x61\163\40\x61\156\40\145\x72\x72\157\162\40\x69\x6e\40\163\145\x6e\x64\151\156\147\x20\145\x6d\141\x69\x6c\x2e\40\x50\154\145\141\x73\145\x20\143\x6c\151\143\153\x20\157\156\40\x52\x65\163\x65\156\144\40\x4f\x54\x50\x20\164\157\x20\164\162\171\x20\141\147\141\x69\156\56");
update_option("\155\157\x5f\x73\x61\155\154\137\162\x65\x67\151\163\x74\162\x61\164\x69\x6f\156\137\163\x74\x61\164\x75\x73", "\115\x4f\137\117\124\x50\x5f\x44\x45\114\111\126\x45\x52\105\x44\137\106\101\x49\114\125\122\105\137\105\115\101\x49\114");
$this->mo_saml_show_error_message();
goto FH;
cn:
update_option("\x6d\157\137\163\x61\155\x6c\x5f\155\x65\163\163\x61\x67\145", "\40\101\x20\x6f\x6e\x65\x20\x74\x69\155\x65\40\160\141\x73\x73\x63\157\144\145\x20\x69\163\x20\x73\145\156\x74\40\164\157\x20" . get_option("\155\157\137\163\141\x6d\154\137\141\144\x6d\x69\x6e\137\145\x6d\x61\x69\154") . "\x20\141\147\141\151\x6e\56\40\120\154\x65\141\163\145\40\x63\150\145\143\x6b\40\151\146\40\x79\157\165\40\x67\157\164\x20\x74\150\x65\x20\157\x74\160\40\x61\156\144\40\x65\156\164\x65\x72\40\x69\164\x20\150\x65\x72\145\56");
update_option("\155\x6f\137\x73\141\155\154\137\164\x72\x61\x6e\163\141\x63\164\151\157\x6e\111\x64", $F5["\164\170\x49\x64"]);
update_option("\x6d\x6f\x5f\x73\141\155\154\137\x72\145\x67\x69\163\164\162\141\164\x69\157\156\x5f\x73\x74\x61\164\165\x73", "\115\117\137\117\x54\x50\x5f\104\105\114\x49\126\x45\x52\105\x44\137\123\x55\x43\103\x45\x53\123\137\x45\x4d\x41\x49\x4c");
$this->mo_saml_show_success_message();
FH:
ZT:
goto vJ;
MC:
if (mo_saml_is_curl_installed()) {
goto uP;
}
update_option("\x6d\x6f\137\163\141\x6d\154\x5f\x6d\x65\163\163\141\x67\x65", "\x45\x52\x52\117\122\x3a\40\x3c\x61\40\150\x72\145\146\75\x22\x68\x74\x74\x70\72\57\57\160\150\x70\56\x6e\145\x74\57\155\141\156\165\141\154\57\145\x6e\57\143\x75\x72\x6c\56\151\156\x73\164\x61\x6c\154\x61\164\x69\x6f\156\x2e\160\x68\x70\x22\x20\x74\x61\162\147\145\164\x3d\42\137\142\154\141\156\153\x22\76\120\110\120\x20\143\x55\122\x4c\40\x65\170\164\x65\156\x73\x69\157\x6e\x3c\57\141\x3e\x20\151\163\40\x6e\x6f\164\40\x69\156\x73\x74\141\x6c\154\x65\144\40\x6f\162\40\144\x69\x73\x61\x62\x6c\145\144\56\40\121\165\145\x72\x79\x20\x73\165\142\155\x69\164\x20\x66\141\151\x6c\145\144\x2e");
$this->mo_saml_show_error_message();
return;
uP:
$oK = $_POST["\155\x6f\137\163\141\x6d\x6c\x5f\143\157\x6e\164\x61\143\164\137\165\x73\137\145\155\x61\x69\x6c"];
$fm = $_POST["\155\x6f\137\163\141\x6d\154\137\x63\157\x6e\164\x61\x63\164\x5f\x75\x73\137\160\150\157\x6e\145"];
$Mh = $_POST["\155\157\137\x73\x61\155\154\137\143\x6f\x6e\164\141\143\x74\x5f\x75\x73\137\x71\165\x65\162\x79"];
$di = new CustomerSaml();
if ($this->mo_saml_check_empty_or_null($oK) || $this->mo_saml_check_empty_or_null($Mh)) {
goto KT;
}
$OJ = $di->submit_contact_us($oK, $fm, $Mh);
if ($OJ == false) {
goto u4;
}
update_option("\x6d\x6f\137\x73\141\x6d\154\x5f\x6d\x65\x73\163\141\x67\x65", "\x54\x68\141\x6e\153\x73\40\x66\157\x72\x20\147\145\x74\164\x69\x6e\x67\x20\151\x6e\x20\164\x6f\165\x63\150\x21\x20\127\x65\x20\x73\x68\141\154\154\x20\147\145\x74\x20\142\141\143\x6b\x20\x74\x6f\x20\171\157\x75\x20\163\x68\157\x72\x74\154\171\56");
$this->mo_saml_show_success_message();
goto al;
u4:
update_option("\x6d\157\x5f\163\x61\155\x6c\137\x6d\145\x73\163\x61\147\145", "\x59\157\x75\162\40\x71\x75\x65\162\171\x20\x63\157\x75\154\x64\40\156\x6f\x74\x20\142\145\40\163\165\142\x6d\x69\x74\164\x65\x64\56\x20\120\154\x65\x61\x73\x65\x20\x74\162\171\40\141\147\141\x69\x6e\x2e");
$this->mo_saml_show_error_message();
al:
goto zc;
KT:
update_option("\x6d\x6f\137\163\141\155\x6c\137\x6d\x65\163\163\x61\147\x65", "\x50\x6c\145\141\x73\x65\40\146\151\154\x6c\x20\x75\x70\40\105\x6d\x61\151\x6c\40\141\156\x64\x20\x51\x75\145\162\171\40\146\151\145\x6c\x64\x73\x20\164\x6f\40\x73\x75\x62\155\x69\x74\40\x79\157\x75\162\x20\x71\165\145\x72\x79\x2e");
$this->mo_saml_show_error_message();
zc:
vJ:
goto KC;
R8:
if (mo_saml_is_curl_installed()) {
goto mL;
}
update_option("\155\x6f\137\x73\x61\155\154\137\x6d\x65\x73\163\x61\x67\145", "\x45\122\x52\x4f\x52\x3a\x20\x3c\141\x20\x68\162\x65\146\x3d\42\150\164\164\x70\72\57\x2f\160\x68\x70\56\x6e\145\164\57\155\141\156\165\x61\x6c\x2f\x65\156\57\143\x75\162\x6c\x2e\151\156\x73\x74\x61\x6c\154\141\x74\x69\x6f\x6e\x2e\160\x68\x70\42\40\x74\141\x72\x67\x65\164\x3d\x22\137\142\x6c\x61\156\x6b\x22\x3e\120\x48\120\40\143\x55\122\x4c\x20\x65\x78\x74\x65\156\163\151\x6f\x6e\x3c\57\141\76\x20\x69\163\40\x6e\x6f\164\40\151\156\163\164\x61\154\x6c\x65\x64\40\157\162\40\x64\x69\163\141\142\154\145\144\x2e\40\114\x6f\147\x69\x6e\40\146\x61\x69\154\x65\x64\56");
$this->mo_saml_show_error_message();
return;
mL:
$oK = '';
$oL = '';
if ($this->mo_saml_check_empty_or_null($_POST["\145\x6d\x61\151\154"]) || $this->mo_saml_check_empty_or_null($_POST["\x70\x61\x73\163\167\157\x72\144"])) {
goto is;
}
$oK = sanitize_email($_POST["\145\155\141\151\154"]);
$oL = sanitize_text_field($_POST["\x70\141\x73\163\167\x6f\162\x64"]);
goto L2;
is:
update_option("\155\x6f\x5f\163\141\x6d\x6c\137\x6d\x65\x73\x73\141\147\x65", "\101\x6c\154\x20\164\150\x65\x20\146\151\x65\x6c\x64\163\x20\x61\x72\145\40\x72\145\x71\x75\x69\162\145\144\x2e\40\x50\154\145\x61\x73\x65\40\x65\156\x74\x65\162\40\166\x61\154\x69\x64\40\145\156\x74\x72\151\x65\163\56");
$this->mo_saml_show_error_message();
return;
L2:
update_option("\155\157\137\163\x61\155\154\x5f\141\144\155\x69\x6e\137\145\x6d\141\x69\154", $oK);
update_option("\155\x6f\137\163\x61\x6d\154\x5f\x61\144\155\x69\x6e\137\160\x61\163\x73\167\157\162\144", $oL);
$di = new Customersaml();
$F5 = $di->get_customer_key();
$Y2 = json_decode($F5, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto iH;
}
update_option("\155\x6f\x5f\163\x61\x6d\154\x5f\155\145\x73\163\x61\x67\x65", "\111\156\x76\141\154\151\x64\40\x75\163\x65\162\156\141\155\x65\x20\157\x72\40\160\x61\x73\x73\x77\157\x72\144\x2e\x20\x50\x6c\145\141\163\145\x20\x74\x72\x79\40\x61\147\x61\x69\x6e\56");
$this->mo_saml_show_error_message();
goto m2;
iH:
update_option("\x6d\157\x5f\x73\x61\155\x6c\x5f\x61\144\x6d\x69\x6e\137\143\165\x73\164\157\x6d\x65\x72\137\153\145\171", $Y2["\151\x64"]);
update_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\x5f\x61\144\155\151\156\x5f\141\x70\151\x5f\x6b\x65\x79", $Y2["\x61\x70\151\x4b\x65\171"]);
update_option("\155\x6f\x5f\163\x61\x6d\154\x5f\x63\165\163\x74\x6f\155\x65\x72\137\164\x6f\x6b\145\x6e", $Y2["\164\x6f\x6b\145\156"]);
update_option("\x6d\x6f\137\163\x61\155\154\x5f\x61\x64\x6d\x69\156\x5f\160\x68\x6f\x6e\145", $Y2["\160\150\157\156\145"]);
update_option("\x6d\x6f\137\x73\141\x6d\154\x5f\141\144\x6d\x69\x6e\x5f\x70\x61\163\x73\167\157\x72\x64", '');
update_option("\155\x6f\137\x73\141\155\154\x5f\155\145\x73\163\141\147\x65", "\103\165\x73\x74\x6f\x6d\145\162\x20\x72\x65\x74\162\x69\x65\166\x65\144\40\x73\165\143\x63\145\x73\163\146\x75\x6c\154\171");
update_option("\x6d\157\x5f\163\x61\155\x6c\137\162\145\147\x69\163\x74\x72\141\x74\151\157\x6e\x5f\163\164\x61\164\165\163", "\x45\x78\x69\x73\164\x69\x6e\147\40\125\163\145\x72");
delete_option("\155\157\137\163\141\155\154\137\x76\145\162\x69\x66\x79\x5f\x63\165\x73\164\x6f\155\145\162");
if (get_option("\163\x6d\154\x5f\x6c\x6b")) {
goto aj;
}
$this->mo_saml_show_success_message();
goto qe;
aj:
$h7 = get_option("\x6d\x6f\x5f\163\141\155\x6c\137\143\165\163\x74\x6f\x6d\x65\x72\x5f\164\x6f\153\x65\x6e");
$NV = AESEncryption::decrypt_data(get_option("\x73\x6d\x6c\x5f\x6c\x6b"), $h7);
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
update_option("\166\x6c\137\x63\150\145\143\153\x5f\x74", time());
if (strcasecmp($F5["\163\164\141\164\x75\x73"], "\123\x55\x43\x43\105\123\123") == 0) {
goto lj;
}
update_option("\155\157\137\163\x61\x6d\154\137\x6d\x65\163\x73\141\147\x65", "\x4c\151\143\145\x6e\163\145\40\153\x65\171\x20\x66\157\x72\40\x74\150\151\x73\40\x69\156\x73\x74\141\156\143\145\40\151\x73\40\x69\x6e\x63\157\x72\162\x65\143\x74\56\40\115\x61\153\x65\x20\163\x75\x72\x65\40\171\x6f\165\40\150\x61\166\x65\40\156\157\164\40\x74\x61\155\x70\x65\162\145\x64\40\x77\x69\x74\150\40\x69\x74\x20\141\x74\x20\141\x6c\154\56\40\x50\154\x65\x61\163\145\x20\x65\156\164\145\x72\40\x61\40\166\141\x6c\x69\144\x20\154\151\143\x65\156\x73\x65\x20\153\x65\171\56");
delete_option("\163\x6d\154\137\154\x6b");
$this->mo_saml_show_error_message();
goto zK;
lj:
$this->mo_saml_show_success_message();
zK:
qe:
m2:
update_option("\x6d\157\137\x73\x61\155\154\x5f\x61\x64\x6d\x69\x6e\x5f\160\x61\163\x73\167\x6f\x72\144", '');
KC:
if (!(isset($_POST["\x6f\x70\x74\x69\157\x6e"]) && $_POST["\x6f\x70\164\151\157\156"] == "\x6d\157\x5f\x73\x61\155\x6c\137\x76\145\162\x69\146\x79\137\154\x69\x63\x65\x6e\163\145")) {
goto rz;
}
if (!$this->mo_saml_check_empty_or_null($_POST["\163\141\x6d\x6c\137\x6c\151\143\x65\x6e\143\x65\x5f\x6b\145\x79"])) {
goto cN;
}
update_option("\x6d\x6f\x5f\163\x61\155\154\137\x6d\145\x73\x73\x61\147\145", "\101\x6c\154\40\164\150\x65\x20\146\151\x65\154\144\x73\40\141\x72\x65\x20\162\x65\x71\x75\151\x72\x65\144\x2e\40\120\x6c\x65\141\163\145\40\145\x6e\164\145\162\x20\x76\141\154\x69\144\40\154\151\143\x65\x6e\x73\145\40\153\x65\171\x2e");
$this->mo_saml_show_error_message();
return;
cN:
$NV = trim($_POST["\163\141\155\x6c\137\x6c\x69\143\145\x6e\x63\x65\137\x6b\145\x79"]);
$di = new Customersaml();
$F5 = json_decode($di->check_customer_ln(), true);
if (strcasecmp($F5["\163\164\141\x74\x75\163"], "\x53\x55\103\x43\105\x53\123") == 0) {
goto Iv;
}
$h7 = get_option("\155\x6f\x5f\163\x61\x6d\154\x5f\x63\x75\x73\164\x6f\x6d\145\x72\137\164\157\x6b\x65\x6e");
update_option("\163\x69\164\145\x5f\x63\x6b\137\154", AESEncryption::encrypt_data("\x66\141\154\163\145", $h7));
$g0 = add_query_arg(array("\164\x61\x62" => "\154\151\x63\145\156\163\x69\156\147"), $_SERVER["\x52\105\x51\x55\x45\123\x54\137\x55\122\x49"]);
update_option("\x6d\157\137\163\x61\x6d\x6c\x5f\155\x65\x73\163\x61\x67\145", "\x59\x6f\x75\40\x68\x61\166\145\40\156\x6f\164\40\165\160\x67\x72\141\144\145\144\40\171\x65\164\x2e\40\74\x61\40\x68\162\145\146\x3d\x22" . $g0 . "\42\76\103\154\x69\x63\x6b\40\x68\145\162\145\74\x2f\141\x3e\x20\x74\157\40\165\x70\x67\162\x61\144\145\40\164\157\40\160\x72\145\x6d\151\165\155\x20\166\x65\162\163\151\x6f\x6e\x2e");
$this->mo_saml_show_error_message();
goto g0;
Iv:
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
update_option("\166\x6c\137\x63\150\x65\x63\153\137\x74", time());
if (strcasecmp($F5["\163\x74\x61\x74\x75\x73"], "\123\125\103\x43\x45\x53\x53") == 0) {
goto KP;
}
if (strcasecmp($F5["\163\164\141\164\x75\x73"], "\106\x41\x49\114\x45\104") == 0) {
goto Fl;
}
update_option("\x6d\157\137\163\x61\x6d\154\137\155\145\x73\x73\141\x67\x65", "\101\x6e\x20\145\x72\162\157\x72\x20\x6f\x63\143\165\x72\x65\144\40\167\x68\151\154\145\40\x70\162\157\x63\145\163\x73\x69\156\147\40\x79\157\165\x72\x20\x72\145\x71\165\145\x73\x74\56\x20\120\154\145\141\163\x65\x20\124\162\x79\x20\141\147\141\x69\156\56");
$this->mo_saml_show_error_message();
goto vV;
Fl:
if (strcasecmp($F5["\x6d\x65\163\x73\x61\147\145"], "\x43\157\x64\145\40\150\141\x73\40\105\170\160\151\162\x65\144") == 0) {
goto EA;
}
update_option("\155\157\137\x73\x61\155\154\x5f\155\145\163\163\141\147\x65", "\x59\x6f\165\x20\x68\141\x76\x65\x20\x65\x6e\164\x65\162\145\144\x20\x61\156\40\x69\156\x76\x61\154\151\144\x20\x6c\x69\x63\145\156\x73\145\40\x6b\x65\x79\x2e\40\120\x6c\x65\x61\163\145\x20\x65\x6e\x74\145\x72\40\141\40\166\x61\x6c\x69\144\40\154\151\143\145\156\163\145\x20\x6b\x65\x79\56");
goto vv;
EA:
$g0 = add_query_arg(array("\164\141\142" => "\154\151\x63\x65\156\163\151\156\x67"), $_SERVER["\x52\x45\121\125\x45\123\124\137\125\x52\111"]);
update_option("\x6d\157\x5f\x73\141\155\x6c\137\155\145\163\x73\141\x67\x65", "\114\151\143\145\156\163\145\x20\x6b\145\x79\40\171\157\165\40\150\141\166\x65\x20\x65\x6e\x74\145\162\145\144\x20\x68\x61\x73\40\141\154\162\x65\141\x64\x79\40\142\145\145\x6e\40\x75\x73\x65\144\x2e\x20\x50\x6c\145\141\163\145\x20\145\x6e\164\x65\162\40\141\x20\153\x65\x79\40\167\x68\151\x63\150\x20\x68\141\x73\40\x6e\157\164\40\x62\x65\x65\156\40\x75\163\x65\144\x20\x62\x65\x66\x6f\162\x65\x20\157\x6e\x20\x61\156\x79\x20\x6f\x74\150\x65\x72\40\x69\156\163\x74\x61\x6e\x63\x65\x20\x6f\162\40\x69\x66\40\171\157\x75\40\150\141\x76\145\40\145\x78\141\x75\x73\164\x65\144\x20\141\x6c\154\x20\171\157\x75\x72\x20\x6b\x65\171\x73\40\164\150\145\x6e\x20\74\141\40\150\162\x65\146\75\42" . $g0 . "\x22\x3e\x43\x6c\x69\x63\x6b\40\150\145\x72\x65\x3c\57\141\x3e\40\x74\x6f\x20\142\165\171\40\x6d\157\x72\145\x2e");
vv:
$this->mo_saml_show_error_message();
vV:
goto nQ;
KP:
$h7 = get_option("\155\x6f\x5f\163\x61\x6d\154\x5f\143\x75\163\164\157\155\145\x72\x5f\x74\x6f\153\145\x6e");
update_option("\x73\x6d\154\x5f\154\153", AESEncryption::encrypt_data($NV, $h7));
update_option("\x6d\157\x5f\x73\x61\x6d\154\x5f\155\145\163\163\x61\147\x65", "\131\x6f\x75\162\40\154\x69\143\145\156\163\x65\x20\x69\x73\40\x76\x65\162\x69\x66\151\x65\x64\x2e\40\x59\x6f\x75\x20\143\141\156\x20\156\157\167\40\x73\x65\164\x75\x70\40\x74\150\145\40\160\154\165\147\x69\156\56");
$h7 = get_option("\x6d\157\x5f\x73\x61\155\x6c\137\143\x75\x73\164\157\155\145\x72\x5f\164\157\x6b\145\x6e");
update_option("\163\x69\x74\x65\x5f\x63\x6b\x5f\154", AESEncryption::encrypt_data("\x74\162\x75\145", $h7));
update_option("\x74\x5f\x73\x69\x74\145\x5f\x73\164\x61\x74\x75\163", AESEncryption::encrypt_data("\x66\x61\154\x73\145", $h7));
$this->mo_saml_show_success_message();
nQ:
g0:
rz:
if (!(isset($_POST["\x6f\x70\164\x69\157\156"]) && $_POST["\157\x70\x74\151\157\156"] == "\155\x6f\137\163\x61\155\x6c\x5f\146\162\x65\x65\137\164\162\151\141\x6c")) {
goto UI;
}
if (decryptSamlElement()) {
goto pg;
}
$NV = postResponse();
$di = new Customersaml();
$F5 = json_decode($di->mo_saml_vl($NV, false), true);
if (strcasecmp($F5["\x73\x74\x61\164\165\x73"], "\x53\125\103\x43\x45\x53\x53") == 0) {
goto L6;
}
if (strcasecmp($F5["\163\164\x61\164\x75\x73"], "\x46\101\x49\114\105\x44") == 0) {
goto kH;
}
update_option("\x6d\x6f\137\x73\141\x6d\154\137\155\145\x73\163\141\x67\145", "\x41\156\40\x65\x72\162\x6f\162\40\157\143\x63\x75\x72\x65\x64\40\x77\150\x69\x6c\x65\40\160\x72\x6f\x63\145\x73\163\151\156\x67\x20\171\x6f\x75\x72\40\162\x65\161\x75\145\x73\x74\x2e\x20\x50\x6c\x65\141\163\145\x20\x54\162\171\40\141\147\x61\x69\156\x2e");
$this->mo_saml_show_error_message();
goto DI;
kH:
update_option("\155\157\x5f\163\x61\x6d\154\137\155\x65\x73\x73\141\x67\x65", "\124\x68\x65\x72\x65\40\x77\x61\x73\40\141\x6e\40\x65\162\x72\x6f\162\40\141\x63\x74\x69\x76\x61\x74\x69\156\x67\x20\171\157\x75\162\40\124\x52\x49\101\114\40\166\145\162\x73\x69\x6f\x6e\x2e\40\120\x6c\x65\x61\x73\x65\40\143\x6f\x6e\164\x61\143\164\40\x69\156\146\x6f\x40\x6d\151\156\x69\157\x72\x61\156\x67\145\x2e\x63\x6f\x6d\40\146\157\x72\40\x67\x65\x74\x74\x69\x6e\147\40\156\x65\167\x20\154\x69\x63\x65\156\163\x65\x20\x66\x6f\162\x20\x74\x72\x69\x61\154\x20\x76\x65\x72\163\x69\x6f\156\x2e");
$this->mo_saml_show_error_message();
DI:
goto Am;
L6:
$h7 = get_option("\155\157\x5f\163\x61\x6d\x6c\137\143\x75\163\x74\157\x6d\x65\162\x5f\x74\x6f\153\145\156");
$h7 = get_option("\x6d\157\x5f\163\141\155\154\137\x63\165\163\x74\x6f\155\145\x72\x5f\164\x6f\153\x65\x6e");
update_option("\164\x5f\x73\x69\x74\x65\137\x73\x74\141\164\165\x73", AESEncryption::encrypt_data("\x74\x72\165\145", $h7));
update_option("\155\x6f\x5f\163\141\x6d\x6c\x5f\x6d\145\x73\x73\x61\147\145", "\x59\157\165\x72\x20\x35\x20\x64\141\x79\x73\40\x54\122\111\x41\114\40\151\x73\x20\x61\x63\x74\x69\x76\141\164\145\144\x2e\40\x59\157\165\x20\143\x61\x6e\x20\156\x6f\x77\x20\x73\145\x74\x75\160\x20\x74\150\x65\x20\x70\154\x75\x67\151\x6e\x2e");
$this->mo_saml_show_success_message();
Am:
goto D3;
pg:
update_option("\x6d\x6f\x5f\x73\141\x6d\x6c\137\155\x65\163\163\x61\147\x65", "\124\150\x65\x72\145\40\167\141\x73\x20\x61\156\40\x65\162\162\x6f\x72\x20\x61\x63\164\x69\166\x61\164\x69\x6e\x67\x20\171\157\x75\162\x20\x54\x52\x49\101\114\x20\x76\x65\162\163\151\x6f\156\56\x20\x45\x69\x74\150\145\x72\x20\171\157\x75\x72\x20\164\x72\x69\141\x6c\x20\160\145\x72\x69\x6f\144\x20\x69\x73\40\x65\x78\160\x69\x72\x65\144\40\157\162\40\171\x6f\165\x20\x61\x72\x65\x20\165\163\x69\156\147\40\x77\x72\157\156\147\40\164\162\x69\141\154\x20\x76\145\x72\163\x69\157\156\x2e\40\x50\154\x65\x61\163\145\40\x63\157\x6e\164\141\143\164\x20\151\x6e\146\157\100\x6d\x69\156\x69\x6f\x72\141\156\x67\145\x2e\x63\x6f\x6d\40\x66\157\x72\x20\147\x65\164\164\151\156\147\40\156\x65\167\x20\154\151\143\x65\156\163\145\40\x66\157\162\x20\x74\x72\x69\141\154\40\166\x65\162\x73\x69\x6f\156\x2e");
$this->mo_saml_show_error_message();
D3:
UI:
if (!(isset($_POST["\x6f\x70\x74\151\157\x6e"]) && $_POST["\x6f\x70\164\x69\x6f\x6e"] == "\x6d\157\137\x73\x61\x6d\154\x5f\143\x68\145\143\153\137\154\x69\x63\145\156\x73\145")) {
goto ul;
}
$di = new Customersaml();
$F5 = json_decode($di->check_customer_ln(), true);
if (strcasecmp($F5["\163\164\141\x74\x75\163"], "\123\125\103\103\105\x53\123") == 0) {
goto sH;
}
$h7 = get_option("\155\157\137\163\x61\x6d\154\x5f\143\165\163\x74\x6f\x6d\145\x72\x5f\x74\157\153\x65\156");
update_option("\163\151\164\x65\x5f\x63\x6b\x5f\154", AESEncryption::encrypt_data("\x66\x61\x6c\x73\145", $h7));
$g0 = add_query_arg(array("\164\x61\x62" => "\x6c\151\x63\x65\156\163\x69\x6e\147"), $_SERVER["\122\105\121\x55\105\x53\x54\x5f\x55\x52\111"]);
update_option("\155\157\x5f\163\141\x6d\x6c\x5f\155\x65\163\x73\141\147\145", "\x59\157\x75\x20\150\x61\x76\145\x20\x6e\x6f\x74\x20\165\160\147\162\141\144\x65\144\40\171\x65\164\56\40\74\141\x20\150\x72\145\x66\75\x22" . $g0 . "\42\x3e\103\154\151\x63\x6b\40\x68\x65\x72\x65\74\x2f\141\76\40\164\157\x20\165\x70\147\x72\141\x64\145\x20\x74\x6f\x20\160\x72\x65\155\x69\x75\155\40\166\145\162\163\151\157\156\x2e");
$this->mo_saml_show_error_message();
goto ID;
sH:
if (array_key_exists("\154\x69\x63\x65\x6e\163\145\x50\x6c\x61\x6e", $F5) && !$this->mo_saml_check_empty_or_null($F5["\154\x69\x63\x65\x6e\163\145\120\154\x61\x6e"])) {
goto Qv;
}
$h7 = get_option("\x6d\x6f\x5f\163\141\155\154\137\143\165\x73\x74\157\155\145\x72\x5f\164\x6f\153\x65\x6e");
update_option("\163\151\x74\x65\x5f\x63\153\137\x6c", AESEncryption::encrypt_data("\x66\x61\154\x73\145", $h7));
$g0 = add_query_arg(array("\164\141\142" => "\x6c\151\143\x65\x6e\163\151\x6e\147"), $_SERVER["\x52\105\x51\x55\105\123\x54\x5f\x55\122\x49"]);
update_option("\155\157\137\x73\141\x6d\154\137\x6d\145\163\163\141\x67\x65", "\x59\157\165\x20\150\141\166\145\x20\x6e\157\164\x20\x75\x70\x67\162\x61\144\145\144\40\171\145\x74\x2e\x20\x3c\141\x20\150\x72\145\146\75\x22" . $g0 . "\x22\x3e\x43\154\151\x63\153\40\150\x65\x72\x65\74\57\x61\x3e\40\164\x6f\x20\x75\x70\147\x72\141\144\145\x20\164\x6f\40\160\162\x65\155\151\165\x6d\40\x76\145\x72\x73\x69\x6f\156\56");
$this->mo_saml_show_error_message();
goto v3;
Qv:
update_option("\x6d\x6f\137\163\x61\x6d\154\137\x6c\x69\x63\x65\x6e\163\x65\137\156\x61\155\x65", base64_encode($F5["\x6c\x69\x63\x65\156\x73\x65\x50\154\x61\156"]));
$h7 = get_option("\155\x6f\137\163\141\155\154\137\143\x75\x73\x74\157\155\145\162\x5f\164\157\x6b\145\156");
if (!(array_key_exists("\156\x6f\x4f\x66\x55\163\x65\162\x73", $F5) && !$this->mo_saml_check_empty_or_null($F5["\156\x6f\117\x66\125\163\x65\x72\163"]))) {
goto Pa;
}
update_option("\x6d\157\x5f\163\141\x6d\154\x5f\165\x73\162\x5f\x6c\155\x74", AESEncryption::encrypt_data($F5["\x6e\x6f\117\146\125\163\145\162\163"], $h7));
Pa:
update_option("\x73\151\164\x65\137\x63\x6b\137\x6c", AESEncryption::encrypt_data("\x74\x72\x75\x65", $h7));
$g0 = add_query_arg(array("\164\141\x62" => "\154\x6f\x67\151\156"), $_SERVER["\x52\x45\x51\125\x45\x53\x54\137\125\122\x49"]);
update_option("\x6d\157\137\163\x61\x6d\x6c\137\x6d\x65\163\163\x61\147\x65", "\131\x6f\x75\40\150\141\x76\145\40\163\165\x63\143\x65\x73\x73\146\x75\x6c\x6c\171\40\x75\160\147\162\141\x64\145\x64\40\171\157\x75\162\x20\154\151\143\145\x6e\163\145\x2e");
$this->mo_saml_show_success_message();
v3:
ID:
ul:
if (!(isset($_POST["\157\x70\x74\x69\x6f\156"]) && $_POST["\157\160\164\x69\x6f\156"] == "\x6d\157\137\x73\141\155\x6c\x5f\x72\145\155\157\166\x65\x5f\x61\x63\143\x6f\x75\x6e\x74")) {
goto kC;
}
$this->mo_sso_saml_deactivate();
add_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\137\162\145\147\151\163\x74\162\x61\164\151\157\x6e\x5f\x73\164\x61\164\x75\163", "\162\x65\155\x6f\x76\x65\144\137\x61\143\x63\x6f\165\x6e\x74");
$g0 = add_query_arg(array("\164\x61\142" => "\154\x6f\x67\151\156"), $_SERVER["\122\105\x51\x55\x45\123\x54\137\125\122\111"]);
header("\114\157\143\x61\x74\151\157\156\72\40" . $g0);
kC:
uz:
add_action("\x73\165\160\x70\157\x72\x74\137\146\157\x72\155", "\x73\x75\160\160\x6f\162\164\137\146\x6f\162\155", 10, 3);
do_action("\x73\x75\160\x70\x6f\x72\x74\x5f\146\x6f\162\x6d");
if (mo_saml_is_trial_active()) {
goto dR;
}
if (site_check()) {
goto o_;
}
delete_option("\155\157\137\163\x61\155\154\x5f\x65\156\141\142\154\145\137\154\x6f\147\151\x6e\x5f\162\x65\144\151\x72\145\x63\x74");
delete_option("\x6d\157\137\x73\141\155\x6c\137\x61\x6c\x6c\x6f\167\x5f\x77\160\x5f\x73\151\x67\x6e\x69\x6e");
delete_option("\155\157\137\x73\141\155\154\137\162\x65\147\x69\x73\164\x65\162\x65\x64\x5f\x6f\x6e\x6c\171\137\x61\x63\143\145\163\163");
delete_option("\155\157\x5f\x73\x61\x6d\x6c\137\146\157\162\143\145\x5f\x61\165\x74\150\x65\156\164\151\x63\x61\x74\x69\157\x6e");
o_:
goto u_;
dR:
if (!decryptSamlElement()) {
goto q8;
}
$h7 = get_option("\x6d\x6f\137\163\141\155\154\137\143\x75\163\164\x6f\155\145\x72\137\x74\157\153\145\x6e");
update_option("\x74\137\x73\x69\x74\x65\137\x73\164\x61\164\165\163", AESEncryption::encrypt_data("\x66\141\154\163\145", $h7));
q8:
u_:
}
function create_customer()
{
$di = new CustomerSaml();
$Y2 = json_decode($di->create_customer(), true);
if (strcasecmp($Y2["\163\164\x61\x74\165\x73"], "\103\125\123\x54\117\x4d\x45\122\137\x55\123\105\x52\116\101\x4d\105\137\x41\114\x52\x45\101\104\x59\137\105\130\x49\x53\x54\x53") == 0) {
goto iZ;
}
if (!(strcasecmp($Y2["\x73\164\x61\164\165\163"], "\x53\x55\103\x43\105\x53\123") == 0)) {
goto HX;
}
update_option("\155\157\x5f\x73\x61\155\x6c\137\x61\x64\x6d\151\x6e\137\x63\165\163\x74\157\155\145\162\137\153\x65\171", $Y2["\151\x64"]);
update_option("\155\x6f\x5f\163\x61\x6d\154\x5f\x61\144\155\151\156\137\141\x70\151\137\153\145\171", $Y2["\x61\160\151\x4b\145\171"]);
update_option("\x6d\157\x5f\x73\141\x6d\154\x5f\143\x75\x73\164\x6f\x6d\145\x72\137\164\157\x6b\x65\x6e", $Y2["\x74\x6f\153\x65\156"]);
update_option("\x6d\x6f\x5f\163\x61\155\x6c\x5f\141\x64\155\x69\x6e\137\160\141\163\163\x77\x6f\x72\144", '');
update_option("\x6d\157\137\163\x61\x6d\154\x5f\x6d\145\163\163\141\x67\145", "\124\150\x61\156\x6b\40\x79\157\165\x20\x66\x6f\x72\40\x72\145\147\151\163\x74\145\x72\151\156\147\x20\167\x69\x74\x68\40\x6d\151\x6e\151\157\162\x61\156\147\x65\x2e");
update_option("\x6d\x6f\x5f\x73\141\x6d\154\x5f\162\145\x67\x69\x73\164\x72\141\x74\x69\157\156\x5f\x73\164\x61\x74\165\163", '');
delete_option("\155\157\137\x73\141\x6d\x6c\x5f\166\145\162\151\146\x79\137\x63\165\x73\x74\x6f\155\x65\x72");
delete_option("\x6d\157\x5f\x73\x61\155\x6c\x5f\x6e\145\167\x5f\162\x65\147\x69\x73\164\x72\141\x74\151\x6f\156");
$this->mo_saml_show_success_message();
HX:
goto r6;
iZ:
$this->get_current_customer();
r6:
update_option("\155\157\137\163\141\x6d\154\137\x61\x64\x6d\x69\x6e\x5f\x70\x61\163\163\167\x6f\x72\x64", '');
}
function get_current_customer()
{
$di = new CustomerSaml();
$F5 = $di->get_customer_key();
$Y2 = json_decode($F5, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto w5;
}
update_option("\x6d\x6f\x5f\163\x61\155\x6c\137\155\145\163\x73\x61\147\145", "\x59\157\x75\x20\x61\x6c\162\145\141\x64\171\x20\x68\141\166\145\x20\141\x6e\40\x61\x63\143\x6f\165\156\x74\40\167\x69\x74\x68\x20\155\x69\156\151\x4f\x72\141\x6e\147\145\x2e\x20\120\x6c\x65\141\x73\x65\40\x65\156\x74\145\162\40\141\x20\166\x61\x6c\x69\x64\x20\x70\141\x73\163\x77\157\162\144\x2e");
update_option("\x6d\x6f\x5f\163\141\155\154\137\166\x65\162\151\x66\x79\137\x63\165\163\164\x6f\x6d\145\x72", "\x74\x72\x75\145");
delete_option("\155\157\x5f\163\141\x6d\154\137\x6e\x65\167\x5f\x72\x65\x67\x69\x73\164\x72\141\164\x69\x6f\x6e");
$this->mo_saml_show_error_message();
goto pI;
w5:
update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\x61\144\x6d\x69\x6e\x5f\143\x75\163\x74\x6f\x6d\x65\x72\x5f\x6b\145\x79", $Y2["\x69\144"]);
update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\141\144\x6d\x69\x6e\137\x61\x70\151\x5f\x6b\x65\x79", $Y2["\x61\160\151\113\x65\171"]);
update_option("\x6d\x6f\x5f\163\x61\x6d\154\137\x63\165\x73\164\x6f\x6d\145\162\x5f\x74\x6f\153\x65\x6e", $Y2["\x74\x6f\153\x65\156"]);
update_option("\155\157\137\x73\x61\155\x6c\137\141\144\155\x69\x6e\137\160\141\x73\x73\x77\157\162\x64", '');
update_option("\155\x6f\x5f\163\141\x6d\154\x5f\x6d\145\x73\x73\x61\x67\145", "\131\x6f\x75\x72\40\x61\x63\143\157\165\156\164\x20\150\141\x73\40\142\x65\145\x6e\40\162\x65\x74\x72\x69\x65\166\145\144\x20\x73\x75\x63\x63\145\163\163\146\x75\x6c\154\171\x2e");
delete_option("\x6d\157\x5f\x73\x61\155\154\x5f\x76\x65\162\151\146\x79\137\x63\x75\x73\x74\x6f\x6d\x65\162");
delete_option("\x6d\x6f\x5f\x73\x61\155\x6c\x5f\x6e\145\x77\x5f\x72\x65\x67\151\163\x74\162\141\164\151\x6f\156");
$this->mo_saml_show_success_message();
pI:
}
public function mo_saml_check_empty_or_null($pU)
{
if (!(!isset($pU) || empty($pU))) {
goto Mr;
}
return true;
Mr:
return false;
}
function miniorange_sso_menu()
{
$ar = add_menu_page("\x4d\x4f\x20\x53\101\115\x4c\x20\123\x65\x74\164\151\x6e\147\x73\40" . __("\x43\157\x6e\x66\151\x67\165\x72\x65\40\x53\x41\x4d\114\x20\111\x64\145\x6e\x74\151\164\x79\40\x50\x72\157\x76\151\144\145\162\40\146\x6f\162\x20\x53\123\x4f", "\x6d\x6f\x5f\x73\141\x6d\154\x5f\x73\145\x74\x74\151\x6e\x67\x73"), "\x6d\151\x6e\x69\117\x72\x61\156\147\145\40\123\x41\115\114\40\x32\x2e\60\40\x53\123\117", "\x61\144\155\x69\156\151\163\x74\x72\141\164\157\x72", "\x6d\157\x5f\163\x61\x6d\x6c\137\x73\x65\x74\164\151\156\147\163", array($this, "\155\157\x5f\154\x6f\147\x69\156\137\167\x69\x64\147\x65\x74\x5f\163\141\x6d\x6c\x5f\x6f\x70\x74\x69\157\x6e\x73"), plugin_dir_url(__FILE__) . "\x69\155\x61\147\145\x73\x2f\x6d\151\x6e\151\x6f\x72\141\156\147\145\x2e\160\x6e\147");
}
function mo_saml_redirect_for_authentication($AZ)
{
if (!mo_saml_is_customer_license_key_verified()) {
goto gP;
}
if (get_option("\155\157\137\x73\141\x6d\154\x5f\x65\156\141\142\154\145\x5f\143\x6c\x6f\x75\x64\x5f\142\x72\157\153\145\162") == "\146\141\x6c\x73\145") {
goto g3;
}
$OQ = get_option("\155\157\137\163\141\155\154\x5f\150\157\x73\x74\x5f\x6e\x61\155\145") . "\57\155\157\x61\163\x2f\162\x65\163\x74\x2f\163\141\x6d\154\57\162\145\161\x75\x65\x73\x74\77\x69\x64\75" . get_option("\x6d\x6f\137\x73\x61\x6d\154\x5f\x61\x64\155\x69\156\137\143\165\x73\x74\x6f\155\145\162\x5f\153\x65\171") . "\46\162\145\164\x75\x72\156\x75\162\154\x3d" . urlencode(home_url() . "\57\x3f\157\x70\x74\x69\157\156\75\x72\x65\141\x64\x73\x61\155\x6c\154\x6f\x67\x69\156\46\162\x65\144\151\162\x65\143\x74\x5f\164\157\x3d" . urlencode($AZ));
header("\x4c\157\x63\x61\164\151\157\x6e\72\40" . $OQ);
die;
goto wN;
g3:
if (!(mo_saml_is_sp_configured() && !is_user_logged_in())) {
goto Jf;
}
$xR = get_option("\155\x6f\x5f\x73\141\x6d\154\137\163\160\137\142\x61\163\145\x5f\165\x72\154");
if (!empty($xR)) {
goto CX;
}
$xR = home_url();
CX:
if (!(get_option("\155\x6f\x5f\163\141\155\x6c\137\162\x65\154\x61\171\137\163\164\141\164\x65") && get_option("\x6d\x6f\x5f\163\x61\155\154\x5f\162\145\154\141\171\137\163\x74\x61\164\145") != '')) {
goto NC;
}
$AZ = get_option("\x6d\157\x5f\x73\141\155\x6c\x5f\x72\x65\x6c\141\x79\x5f\x73\164\141\164\x65");
NC:
$cw = empty($AZ) ? "\57" : $AZ;
$rt = get_option("\x73\x61\x6d\154\x5f\154\157\x67\151\x6e\137\x75\x72\x6c");
$wF = get_option("\163\141\x6d\x6c\x5f\x6c\x6f\147\x69\156\137\142\151\156\144\x69\156\147\137\164\x79\x70\x65");
$i8 = get_option("\x6d\157\137\163\x61\155\x6c\x5f\x66\157\x72\x63\x65\x5f\x61\x75\x74\150\x65\x6e\x74\151\143\x61\x74\x69\x6f\x6e");
$Yl = $xR . "\x2f";
$Fx = get_option("\155\x6f\x5f\163\141\155\x6c\x5f\163\160\x5f\145\x6e\164\151\x74\171\137\151\144");
if (!empty($Fx)) {
goto dx;
}
$Fx = $xR . "\x2f\x77\x70\x2d\x63\157\156\x74\145\156\x74\x2f\160\154\165\x67\151\156\x73\57\x6d\151\156\151\157\x72\x61\156\x67\145\55\163\141\155\x6c\55\62\x30\55\x73\151\x6e\147\x6c\x65\55\x73\151\147\156\55\x6f\x6e\57";
dx:
$GD = SAMLSPUtilities::createAuthnRequest($Yl, $Fx, $rt, $i8, $wF);
if (empty($wF) || $wF == "\110\x74\164\x70\x52\145\x64\x69\162\x65\x63\164") {
goto Pl;
}
if (!(get_option("\x73\141\155\154\x5f\x72\x65\161\165\145\163\164\x5f\163\151\147\156\x65\x64") == "\165\x6e\x63\x68\x65\x63\153\x65\x64")) {
goto Or1;
}
$L7 = base64_encode($GD);
SAMLSPUtilities::postSAMLRequest($rt, $L7, $cw);
die;
Or1:
$wA = plugin_dir_path(__FILE__) . "\162\145\x73\x6f\x75\x72\143\145\x73" . DIRECTORY_SEPARATOR . "\163\160\55\x6b\145\x79\x2e\x6b\145\171";
$Nz = plugin_dir_path(__FILE__) . "\162\x65\163\157\x75\x72\143\145\163" . DIRECTORY_SEPARATOR . "\x73\160\x2d\143\x65\x72\x74\x69\x66\151\143\141\x74\145\x2e\x63\162\x74";
$L7 = SAMLSPUtilities::signXML($GD, $Nz, $wA, "\116\x61\x6d\145\x49\x44\x50\x6f\x6c\151\143\x79");
SAMLSPUtilities::postSAMLRequest($rt, $L7, $cw);
goto ad;
Pl:
$Ru = $rt;
if (strpos($rt, "\77") !== false) {
goto im;
}
$Ru .= "\77";
goto Q2;
im:
$Ru .= "\x26";
Q2:
if (!(get_option("\x73\141\155\154\137\162\x65\x71\165\145\163\x74\x5f\x73\151\x67\156\145\144") == "\x75\x6e\x63\x68\145\143\x6b\x65\x64")) {
goto MW;
}
$Ru .= "\x53\101\x4d\114\122\x65\161\165\x65\x73\164\x3d" . $GD . "\46\x52\x65\x6c\x61\171\123\x74\141\164\145\75" . urlencode($cw);
header("\x4c\x6f\x63\141\x74\151\157\156\72\x20" . $Ru);
die;
MW:
$GD = "\123\x41\115\114\122\x65\161\165\145\x73\x74\75" . $GD . "\46\122\x65\x6c\141\171\x53\x74\141\164\145\x3d" . urlencode($cw) . "\x26\x53\151\147\x41\154\x67\75" . urlencode(XMLSecurityKey::RSA_SHA256);
$Dh = array("\x74\171\160\145" => "\160\x72\151\166\141\164\145");
$h7 = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $Dh);
$rM = plugin_dir_path(__FILE__) . "\x72\145\163\x6f\x75\162\143\145\163" . DIRECTORY_SEPARATOR . "\163\160\x2d\153\x65\171\x2e\153\x65\171";
$h7->loadKey($rM, TRUE);
$cr = new XMLSecurityDSig();
$dS = $h7->signData($GD);
$dS = base64_encode($dS);
$Ru .= $GD . "\46\x53\x69\147\156\141\164\x75\x72\x65\75" . urlencode($dS);
header("\x4c\x6f\143\141\x74\151\x6f\156\x3a\x20" . $Ru);
die;
ad:
Jf:
wN:
gP:
}
function mo_saml_authenticate()
{
$yP = '';
if (!isset($_REQUEST["\162\145\x64\151\x72\x65\x63\164\137\164\x6f"])) {
goto HO;
}
$yP = $_REQUEST["\x72\x65\x64\151\x72\x65\x63\x74\137\x74\157"];
HO:
if (!is_user_logged_in()) {
goto HA;
}
if (!empty($yP)) {
goto S0;
}
header("\x4c\x6f\143\x61\x74\x69\x6f\x6e\x3a\x20" . home_url());
goto IG;
S0:
header("\114\157\x63\141\x74\x69\x6f\x6e\x3a\x20" . $yP);
IG:
die;
HA:
if (!(get_option("\155\x6f\137\163\141\155\x6c\x5f\x65\x6e\141\142\x6c\x65\x5f\154\x6f\147\151\156\x5f\162\145\144\x69\x72\x65\143\x74") == "\x74\x72\x75\145")) {
goto BU;
}
if (isset($_GET["\154\x6f\147\147\x65\x64\x6f\x75\164"]) && $_GET["\154\x6f\147\147\145\144\x6f\165\x74"] == "\164\x72\165\145") {
goto lO;
}
if (get_option("\x6d\157\137\163\x61\x6d\154\x5f\141\154\x6c\x6f\167\x5f\x77\160\137\163\x69\147\156\151\156") == "\x74\162\165\145") {
goto QY;
}
goto Gn;
lO:
header("\114\x6f\143\141\x74\151\157\x6e\x3a\40" . home_url());
die;
goto Gn;
QY:
if (isset($_GET["\x73\x61\155\154\137\163\x73\x6f"]) && $_GET["\163\141\x6d\x6c\x5f\163\163\x6f"] == "\146\141\x6c\163\x65" || isset($_POST["\163\x61\x6d\x6c\137\x73\163\x6f"]) && $_POST["\163\x61\x6d\x6c\x5f\x73\x73\x6f"] == "\x66\x61\154\x73\x65") {
goto gn;
}
if (isset($_REQUEST["\x72\x65\144\151\x72\x65\143\x74\137\x74\x6f"])) {
goto Kd;
}
goto Y1;
gn:
return;
goto Y1;
Kd:
$yP = $_REQUEST["\162\x65\x64\151\162\x65\143\x74\137\x74\157"];
if (!(strpos($yP, "\167\x70\55\141\x64\x6d\x69\x6e") !== false && strpos($yP, "\x73\x61\155\x6c\x5f\163\163\x6f\x3d\146\141\x6c\163\x65") !== false)) {
goto Eg;
}
return;
Eg:
Y1:
Gn:
$this->mo_saml_redirect_for_authentication($yP);
BU:
}
function mo_saml_auto_redirect()
{
if (!current_user_can("\162\145\x61\x64")) {
goto eZ;
}
return;
eZ:
if (!(get_option("\x6d\157\x5f\163\x61\x6d\x6c\137\x72\x65\x67\151\x73\164\145\x72\145\144\137\x6f\x6e\154\171\x5f\x61\x63\143\x65\x73\163") == "\x74\x72\165\145")) {
goto hJ;
}
if (!(get_option("\155\x6f\x5f\x73\x61\155\154\x5f\x65\156\x61\x62\x6c\145\x5f\x72\163\x73\x5f\x61\143\x63\x65\x73\163") == "\164\x72\x75\145" && is_feed())) {
goto pk;
}
return;
pk:
$AZ = saml_get_current_page_url();
$this->mo_saml_redirect_for_authentication($AZ);
hJ:
}
function mo_saml_modify_login_form()
{
echo "\74\151\x6e\160\165\x74\x20\164\171\160\145\75\x22\150\x69\144\144\x65\x6e\x22\x20\156\141\x6d\145\x3d\x22\163\x61\x6d\154\x5f\163\x73\x6f\x22\x20\x76\141\154\x75\145\x3d\42\146\x61\x6c\x73\x65\x22\x3e" . "\xa";
}
function mo_get_saml_shortcode()
{
if (!is_user_logged_in()) {
goto IL;
}
$Xg = "\x48\x65\x6c\x6c\157\54\40" . wp_get_current_user()->display_name . "\40\174\40\x3c\x61\40\x68\162\145\146\x3d" . wp_logout_url(home_url()) . "\x3e\x4c\x6f\147\x6f\165\164\x3c\57\141\x3e";
goto BD;
IL:
$xR = get_option("\x6d\157\137\163\141\x6d\x6c\x5f\x73\160\x5f\x62\x61\x73\x65\x5f\x75\x72\154");
if (!empty($xR)) {
goto Pv;
}
$xR = home_url();
Pv:
if (mo_saml_is_sp_configured() && mo_saml_is_customer_license_key_verified()) {
goto dE;
}
$Xg = "\123\x50\x20\x69\163\x20\x6e\x6f\x74\x20\x63\157\156\146\151\x67\x75\x72\145\x64\56";
goto y7;
dE:
if (get_option("\x6d\x6f\x5f\163\141\155\x6c\x5f\x65\x6e\x61\x62\x6c\x65\137\143\154\x6f\x75\144\x5f\142\x72\157\x6b\x65\162") == "\x66\141\x6c\163\145") {
goto Fw;
}
$Xg = "\x3c\141\40\150\162\x65\x66\75" . get_option("\x6d\x6f\137\163\141\155\154\x5f\x68\x6f\163\x74\x5f\x6e\141\155\x65") . "\x2f\155\157\x61\x73\x2f\x72\145\163\x74\x2f\163\141\x6d\x6c\x2f\162\145\x71\165\145\163\164\x3f\151\x64\75" . get_option("\x6d\x6f\137\163\141\x6d\x6c\x5f\x61\144\x6d\x69\156\137\143\x75\x73\x74\157\155\145\x72\x5f\153\145\171") . "\x26\x72\145\164\165\x72\x6e\165\x72\154\x3d" . urlencode(home_url() . "\57\x3f\157\160\x74\151\157\x6e\75\x72\x65\141\x64\x73\x61\155\x6c\154\157\x67\x69\x6e") . "\40\57\x3e\114\x6f\x67\x69\156\x20\x77\x69\164\x68\x20" . get_option("\163\x61\155\154\x5f\x69\144\145\x6e\164\151\164\x79\x5f\x6e\141\x6d\145") . "\74\x2f\x61\76";
goto DD;
Fw:
$yP = urlencode(saml_get_current_page_url());
$Xg = "\x3c\x61\40\150\x72\145\146\x3d\47" . $xR . "\57\77\157\x70\x74\x69\x6f\156\75\163\x61\155\x6c\x5f\x75\163\x65\x72\137\x6c\x6f\147\x69\x6e\x26\x72\x65\144\151\162\145\143\x74\x5f\x74\x6f\x3d{$yP}\47\76\x4c\157\147\x69\156\40\x77\x69\x74\x68\x20" . get_option("\163\141\x6d\154\137\151\144\145\156\164\151\x74\171\137\x6e\141\x6d\145") . "\74\x2f\x61\x3e";
DD:
y7:
BD:
return $Xg;
}
function _handle_upload_metadata()
{
if (!(isset($_FILES["\155\145\164\141\x64\x61\164\141\137\x66\x69\x6c\x65"]) || isset($_POST["\155\x65\164\x61\144\141\x74\141\x5f\x75\162\x6c"]))) {
goto uF;
}
if (!empty($_FILES["\x6d\145\164\141\x64\x61\164\x61\137\146\x69\x6c\x65"]["\x74\155\x70\x5f\x6e\141\155\x65"])) {
goto wI;
}
$g0 = $_POST["\155\145\x74\141\144\141\164\141\137\x75\162\154"];
$NI = curl_init();
curl_setopt($NI, CURLOPT_URL, $g0);
curl_setopt($NI, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($NI, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($NI, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($NI, CURLOPT_SSL_VERIFYHOST, false);
$KQ = get_option("\x6d\x6f\x5f\x70\x72\157\x78\171\137\150\157\163\164");
if (empty($KQ)) {
goto L7;
}
curl_setopt($NI, CURLOPT_PROXY, get_option("\x6d\x6f\137\x70\162\x6f\170\x79\137\150\x6f\x73\164"));
curl_setopt($NI, CURLOPT_PROXYPORT, get_option("\155\x6f\137\x70\162\x6f\170\x79\137\160\157\x72\x74"));
curl_setopt($NI, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($NI, CURLOPT_PROXYUSERPWD, get_option("\x6d\157\137\x70\x72\157\170\x79\x5f\165\163\x65\x72\x6e\141\x6d\x65") . "\x3a" . get_option("\155\157\137\160\x72\157\x78\x79\137\160\141\x73\163\x77\x6f\162\x64"));
L7:
$kC = curl_exec($NI);
curl_close($NI);
if (isset($_POST["\163\x79\x6e\x63\137\155\145\164\x61\x64\x61\x74\x61"])) {
goto zk;
}
delete_option("\163\x61\x6d\154\x5f\x6d\145\164\141\144\141\164\141\x5f\x75\162\x6c\x5f\x66\157\x72\x5f\x73\171\156\143");
delete_option("\163\x61\x6d\154\137\x6d\x65\x74\141\144\x61\x74\141\137\163\171\x6e\143\137\x69\x6e\164\145\x72\x76\141\x6c");
wp_unschedule_event(wp_next_scheduled("\x6d\x65\x74\x61\144\141\164\x61\137\163\x79\156\x63\x5f\x63\x72\157\156\137\141\143\164\151\157\156"), "\155\x65\164\x61\144\x61\164\141\x5f\x73\x79\156\x63\x5f\143\162\x6f\x6e\137\x61\x63\164\x69\157\156");
goto ZB;
zk:
update_option("\x73\x61\155\x6c\x5f\x6d\145\164\141\144\x61\x74\141\137\x75\x72\154\x5f\x66\157\162\x5f\x73\171\x6e\143", $_POST["\x6d\x65\x74\x61\144\141\x74\141\x5f\x66\151\154\145"]);
update_option("\x73\141\155\x6c\137\x6d\x65\x74\141\x64\x61\x74\x61\x5f\163\x79\x6e\143\x5f\151\x6e\164\145\x72\x76\x61\x6c", $_POST["\163\x79\156\143\137\151\x6e\164\145\x72\x76\141\x6c"]);
if (wp_next_scheduled("\x6d\145\164\141\x64\141\x74\141\x5f\163\x79\156\x63\x5f\x63\162\x6f\x6e\137\x61\x63\164\151\x6f\156")) {
goto h1;
}
wp_schedule_event(time(), $_POST["\x73\x79\156\x63\137\151\156\x74\x65\162\x76\141\x6c"], "\x6d\145\x74\x61\x64\x61\164\x61\137\163\x79\156\143\x5f\143\162\157\x6e\x5f\141\143\164\x69\157\156");
h1:
ZB:
goto BC;
wI:
$kC = @file_get_contents($_FILES["\x6d\x65\164\141\x64\141\x74\141\x5f\146\151\154\145"]["\x74\x6d\160\x5f\x6e\x61\155\145"]);
BC:
$this->upload_metadata($kC);
uF:
}
function upload_metadata($kC)
{
$pA = set_error_handler(array($this, "\150\141\156\144\x6c\x65\130\155\x6c\x45\x72\x72\157\162"));
$LQ = new DOMDocument();
$LQ->loadXML($kC);
restore_error_handler();
$FN = $LQ->firstChild;
if (!empty($FN)) {
goto EE;
}
update_option("\x6d\157\x5f\163\141\155\154\x5f\x6d\x65\x73\x73\141\147\145", "\120\154\x65\x61\163\x65\40\160\162\157\x76\x69\144\145\40\x61\x20\x76\141\154\x69\144\x20\155\145\164\x61\x64\141\x74\x61\x20\146\151\154\145\56");
$this->mo_saml_show_error_message();
goto ow;
EE:
$JJ = new IDPMetadataReader($LQ);
$cG = $JJ->getIdentityProviders();
if (!empty($cG)) {
goto eG;
}
update_option("\155\x6f\x5f\x73\141\x6d\x6c\x5f\155\x65\163\x73\x61\x67\x65", "\x50\x6c\145\141\163\145\40\160\x72\x6f\166\x69\x64\x65\x20\x61\x20\166\141\x6c\x69\144\x20\155\145\164\141\x64\x61\164\x61\x20\x66\x69\x6c\x65\56");
$this->mo_saml_show_error_message();
return;
eG:
foreach ($cG as $h7 => $zz) {
$K1 = $_POST["\163\x61\x6d\x6c\x5f\x69\144\145\156\164\x69\x74\171\137\x6d\x65\x74\x61\144\141\x74\141\x5f\160\x72\x6f\166\151\x64\x65\162"];
$Dc = "\110\x74\164\x70\x52\145\144\x69\x72\145\x63\x74";
$A7 = $zz->getLoginURL("\110\124\x54\120\55\x52\145\144\x69\x72\x65\x63\164");
$fu = "\x48\164\164\x70\122\145\x64\151\162\x65\x63\164";
$h_ = $zz->getLogoutURL("\110\124\124\x50\55\x52\145\x64\x69\x72\x65\143\164");
$Bt = $zz->getEntityID();
$gf = $zz->getSigningCertificate();
update_option("\x73\141\x6d\154\137\x69\x64\x65\x6e\x74\x69\x74\171\137\x6e\x61\155\145", $K1);
update_option("\x73\141\155\x6c\137\x6c\157\147\x69\x6e\137\142\x69\x6e\x64\151\156\147\137\x74\x79\x70\x65", $Dc);
update_option("\163\141\x6d\x6c\137\154\x6f\x67\x69\156\137\165\162\x6c", $A7);
update_option("\x73\x61\155\154\137\x6c\157\x67\x6f\x75\x74\137\x62\151\x6e\144\x69\156\x67\x5f\x74\x79\160\145", $fu);
update_option("\163\x61\155\154\137\x6c\157\147\x6f\165\x74\x5f\x75\x72\x6c", $h_);
update_option("\163\x61\x6d\154\x5f\x69\x73\x73\x75\x65\162", $Bt);
update_option("\163\141\x6d\154\x5f\170\65\x30\71\137\x63\x65\162\164\151\x66\151\143\141\x74\x65", maybe_serialize($gf));
goto fn;
pN:
}
fn:
update_option("\x6d\157\x5f\x73\141\x6d\x6c\x5f\155\x65\x73\163\141\147\x65", "\x49\x64\x65\156\x74\151\x74\171\x20\120\162\157\166\x69\x64\145\x72\x20\144\x65\164\141\151\154\x73\40\x73\141\x76\145\144\40\x73\165\143\x63\145\163\163\x66\x75\154\154\x79\56");
$this->mo_saml_show_success_message();
ow:
}
function handleXmlError($qQ, $Zv, $Ki, $GP)
{
if ($qQ == E_WARNING && substr_count($Zv, "\104\117\x4d\x44\157\143\x75\155\x65\x6e\164\x3a\x3a\154\x6f\x61\144\x58\115\114\50\x29") > 0) {
goto p4;
}
return false;
goto JW;
p4:
return;
JW:
}
}
new saml_mo_login();
Function Calls
None |
Stats
MD5 | 232f9d2878750d46f518d429d537463d |
Eval Count | 0 |
Decode Time | 181 ms |