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 include_once dirname(__FILE__) . '/Utilities.php'; include_once dirname(__FILE..
Decoded Output download
<?php
include_once dirname(__FILE__) . '/Utilities.php';
include_once dirname(__FILE__) . '/Response.php';
include_once dirname(__FILE__) . '/LogoutRequest.php';
if(!class_exists("AESEncryption")) {
require_once dirname(__FILE__) . '/includes/lib/encryption.php';
}
include_once 'xmlseclibs.php';
use RobRichards\XMLSecLibs\XMLSecurityKey;
use RobRichards\XMLSecLibs\XMLSecurityDSig;
use RobRichards\XMLSecLibs\XMLSecEnc;
class Mo_SAML_Login_Widget extends WP_Widget
{
public function __construct()
{
parent::__construct("Saml_Login_Widget", "Login", array("description" => __("This is a miniOrange SAML login widget.", "mosaml")));
}
public function widget($s1, $Pt)
{
extract($s1);
if (!(isset($Pt["wid_title"]) && !empty($Pt["wid_title"]))) {
goto Qzj;
}
$MT = apply_filters("widget_title", $Pt["wid_title"]);
Qzj:
echo $s1["before_widget"];
if (empty($MT)) {
goto fd9;
}
echo $s1["before_title"] . $MT . $s1["after_title"];
fd9:
$this->loginForm();
echo $s1["after_widget"];
}
public function update($di, $ug)
{
$Pt = array();
$Pt["wid_title"] = strip_tags($di["wid_title"]);
return $Pt;
}
public function form($Pt)
{
$MT = '';
if (!isset($Pt["wid_title"])) {
goto j18;
}
$MT = $Pt["wid_title"];
j18:
echo "\xd\xa\x9 <p><label for="" . $this->get_field_id("wid_title") . " ">" . _e("Title:") . " </label>\xd
\x9<input class="widefat" id="" . $this->get_field_id("wid_title") . "" name="" . $this->get_field_name("wid_title") . "" type="text" value="" . $MT . "" />\xd\xa\x9\x9</p>";
}
public function loginForm()
{
global $post;
if (!is_user_logged_in()) {
goto Zin;
}
$current_user = wp_get_current_user();
$an = get_option("saml_identity_providers");
$an = maybe_unserialize($an);
$pi = get_user_meta($current_user->ID, "mo_saml_logged_in_with_idp", true);
if (!empty($pi)) {
goto xPg;
}
$l2 = "DEFAULT";
goto MWW;
xPg:
$l2 = $an[$pi];
MWW:
$PP = "Hello,";
if (empty($l2["custom_greeting_text"])) {
goto nb4;
}
$PP = $l2["custom_greeting_text"];
nb4:
$Rx = '';
if (empty($l2["greeting_name"])) {
goto g4w;
}
switch ($l2["greeting_name"]) {
case "USERNAME":
$Rx = $current_user->user_login;
goto Jfl;
case "EMAIL":
$Rx = $current_user->user_email;
goto Jfl;
case "FNAME":
$Rx = $current_user->user_firstname;
goto Jfl;
case "LNAME":
$Rx = $current_user->user_lastname;
goto Jfl;
case "FNAME_LNAME":
$Rx = $current_user->user_firstname . " " . $current_user->user_lastname;
goto Jfl;
case "LNAME_FNAME":
$Rx = $current_user->user_lastname . " " . $current_user->user_firstname;
goto Jfl;
default:
$Rx = $current_user->user_login;
}
rWN:
Jfl:
g4w:
if (!empty(trim($Rx))) {
goto vCl;
}
$Rx = $current_user->user_login;
vCl:
$m2 = $PP . " " . $Rx;
$Rz = "Logout";
if (empty($l2["custom_logout_text"])) {
goto oLr;
}
$Rz = $l2["custom_logout_text"];
oLr:
echo $m2 . " | <a href="" . wp_logout_url(home_url()) . "" title="logout" >" . $Rz . "</a></li>";
$vP = saml_get_current_page_url();
update_option("logout_redirect_url", $vP);
goto y6h;
Zin:
$b1 = saml_get_current_page_url();
$rw = maybe_unserialize(get_option("saml_identity_providers"));
if (!empty($rw)) {
goto Ixe;
}
echo "Please configure the miniOrange SAML Plugin first.";
goto A8r;
Ixe:
foreach ($rw as $pi) {
if (!(isset($pi["enable_idp"]) && $pi["enable_idp"] == false)) {
goto qdD;
}
goto yXc;
qdD:
if (!empty($pi["idp_name"])) {
goto IXA;
}
echo "Please configure the miniOrange SAML Plugin first.";
goto J5X;
IXA:
$s4 = "login_" . $pi["idp_name"];
$ov = "mosubmitsamlform_" . $pi["idp_name"];
echo "<script>
\xa \x9\x9 jQuery( document ).ready(function() {
\x9 \x9\x9\x9 jQuery("#" . $ov . "").click(function(e) {
\x9\x9 e.preventDefault();\xd\xa\x9 \x9\x9 \x9\x9\x9jQuery("#" . $s4 . "").submit();
\xa\x9\x9\x9 \x9 });
\xa \x9 \x9 \x9});
\x9 \x9 \x9</script>\xd
\x9 \x9\x9\x9<form name="" . esc_attr($s4) . "" id="" . esc_attr($s4) . "" method="post" action="">\xd\xa <input type="hidden" name="option" value="saml_user_login" />
\x9\x9\x9\x9\x9\x9 \x9<input type="hidden" name="redirect_to" value="" . esc_url($b1) . "" />
\x9 \x9\x9<input type="hidden" name="idp" value="" . esc_attr($pi["idp_name"]) . "" />
\xa\x9 \x9 \x9 <font size="+1" style="vertical-align:top;"> </font>";
$Ow = !empty($pi["custom_login_text"]) ? $pi["custom_login_text"] : "Login with " . $pi["idp_name"];
echo "<a href="#" id="" . esc_attr($ov) . "">" . esc_html($Ow) . "</a></form>";
J5X:
yXc:
}
koO:
A8r:
y6h:
}
public function mo_saml_check_empty_or_null_val($y2)
{
if (!(!isset($y2) || empty($y2))) {
goto WGE;
}
return true;
WGE:
return false;
}
public function mo_saml_widget_init()
{
if (!(isset($_REQUEST["option"]) and $_REQUEST["option"] == "saml_user_logout")) {
goto syS;
}
$user = is_user_logged_in() ? wp_get_current_user() : null;
if (empty($user)) {
goto tmE;
}
wp_logout();
tmE:
syS:
}
function mo_saml_logout($x2)
{
$user = get_user_by("id", $x2);
$current_user = $user;
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto yle;
}
session_start();
yle:
$LJ = array();
$yD = isset($_SESSION["mo_saml"]["logged_in_with_idp"]) ? $_SESSION["mo_saml"]["logged_in_with_idp"] : '';
if (!(!$yD && $current_user)) {
goto kwT;
}
$yD = get_user_meta($current_user->ID, "mo_saml_logged_in_with_idp", true);
kwT:
if (isset($_REQUEST["redirect_to"]) and !empty($_REQUEST["redirect_to"])) {
goto zai;
}
$Ha = wp_get_referer();
goto VEz;
zai:
$Ha = $_REQUEST["redirect_to"];
VEz:
if (!empty($Ha)) {
goto RC6;
}
$Ha = !empty(get_option("mo_saml_sp_base_url")) ? get_option("mo_saml_sp_base_url") : home_url();
RC6:
$an = get_option("saml_identity_providers");
$an = maybe_unserialize($an);
if (!(is_array($an) && array_key_exists($yD, $an))) {
goto NsS;
}
$LJ = $an[$yD];
NsS:
if (!empty($LJ)) {
goto UK2;
}
wp_redirect($Ha);
exit;
goto Maz;
UK2:
$Ja = $LJ["slo_url"];
$ka = $LJ["slo_binding_type"];
$uZ = $LJ["request_signed"];
if (!empty($Ja)) {
goto EOl;
}
wp_redirect($Ha);
exit;
goto F9x;
EOl:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto PAz;
}
session_start();
PAz:
if (isset($_SESSION["mo_saml_logout_request"])) {
goto fgN;
}
if (isset($_SESSION["mo_saml"]["logged_in_with_idp"])) {
goto lAz;
}
goto rzr;
fgN:
self::createLogoutResponseAndRedirect($Ja, $ka, $LJ);
exit;
goto rzr;
lAz:
unset($_SESSION["mo_saml"]);
$hn = get_user_meta($current_user->ID, "mo_saml_name_id");
$G6 = get_user_meta($current_user->ID, "mo_saml_session_index");
$he = get_option("mo_saml_sp_base_url");
if (!empty($he)) {
goto jei;
}
$he = network_home_url();
jei:
if (!(substr($he, -1) == "/")) {
goto LSn;
}
$he = substr($he, 0, -1);
LSn:
$cC = get_option("mo_saml_sp_entity_id");
if (!empty($cC)) {
goto Pa0;
}
$cC = $he . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
Pa0:
$cC = isset($LJ["saml_sp_entity_id"]) ? $LJ["saml_sp_entity_id"] : $cC;
$BL = $Ja;
$VO = $Ha;
$eD = $LJ["nameid_format"];
$VO = parse_url($VO, PHP_URL_PATH);
$VO = empty($VO) ? "/" : $VO;
$zz = Utilities::createLogoutRequest($hn, $cC, $BL, $ka, $G6, $eD);
if (empty($ka) || $ka == "HttpRedirect") {
goto m10;
}
if (!($uZ == "unchecked")) {
goto BCX;
}
$F0 = base64_encode($zz);
Utilities::postSAMLRequest($Ja, $F0, $VO);
exit;
BCX:
$F0 = Utilities::signXML($zz, $LJ, "NameID");
Utilities::postSAMLRequest($Ja, $F0, $LJ, $VO);
goto g1s;
m10:
$kY = $Ja;
if (strpos($Ja, "?") !== false) {
goto f3Q;
}
$kY .= "?";
goto dgW;
f3Q:
$kY .= "&";
dgW:
if (!($uZ == "unchecked")) {
goto xkG;
}
$kY .= "SAMLRequest=" . $zz . "&RelayState=" . urlencode($VO);
header("Location: " . $kY);
exit;
xkG:
$zz = "SAMLRequest=" . $zz . "&RelayState=" . urlencode($VO) . "&SigAlg=" . urlencode(XMLSecurityKey::RSA_SHA256);
$IK = array("type" => "private");
$sv = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $IK);
$yN = mo_saml_get_sp_private_key_for_idp($LJ);
$sv->loadKey($yN, FALSE);
$V8 = new XMLSecurityDSig();
$E1 = $sv->signData($zz);
$E1 = base64_encode($E1);
$kY .= $zz . "&Signature=" . urlencode($E1);
header("Location: " . $kY);
exit;
g1s:
rzr:
F9x:
Maz:
}
function createLogoutResponseAndRedirect($Ja, $ka, $LJ)
{
$he = get_option("mo_saml_sp_base_url");
if (!empty($he)) {
goto dPx;
}
$he = home_url();
dPx:
$Cd = $_SESSION["mo_saml_logout_request"];
$p3 = $_SESSION["mo_saml_logout_relay_state"];
$uZ = $LJ["request_signed"];
if (!empty($p3) && (filter_var($p3, FILTER_VALIDATE_URL) || parse_url(home_url(), PHP_URL_HOST) === parse_url($p3, PHP_URL_HOST))) {
goto zOz;
}
wp_redirect($he);
goto iyc;
zOz:
wp_redirect($p3);
iyc:
unset($_SESSION["mo_saml_logout_request"]);
unset($_SESSION["mo_saml_logout_relay_state"]);
$Pg = new DOMDocument();
$Pg->loadXML($Cd);
$Cd = $Pg->firstChild;
if (!($Cd->localName == "LogoutRequest")) {
goto vQ1;
}
$S5 = new SAML2_LogoutRequest($Cd);
$Y1 = get_option("mo_saml_sp_entity_id");
if (!empty($Y1)) {
goto ZIg;
}
$Y1 = $he . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
ZIg:
$Y1 = isset($LJ["saml_sp_entity_id"]) ? $LJ["saml_sp_entity_id"] : $Y1;
$BL = $Ja;
$D3 = Utilities::createLogoutResponse($S5->getId(), $Y1, $BL, $ka);
if (empty($ka) || $ka == "HttpRedirect") {
goto oR_;
}
if (!($uZ == "unchecked")) {
goto qSJ;
}
$F0 = base64_encode($D3);
Utilities::postSAMLResponse($Ja, $F0, $p3);
exit;
qSJ:
$F0 = Utilities::signXML($D3, $LJ, "Status");
Utilities::postSAMLResponse($Ja, $F0, $p3);
goto MwH;
oR_:
$kY = $Ja;
if (strpos($Ja, "?") !== false) {
goto qgx;
}
$kY .= "?";
goto onD;
qgx:
$kY .= "&";
onD:
if (!($uZ == "unchecked")) {
goto Vfj;
}
$kY .= "SAMLResponse=" . $D3 . "&RelayState=" . urlencode($p3);
header("Location: " . $kY);
exit;
Vfj:
$kY .= "SAMLResponse=" . $D3 . "&RelayState=" . urlencode($p3);
header("Location: " . $kY);
exit;
MwH:
vQ1:
}
}
function plugin_settings_script_widget()
{
wp_enqueue_script("jquery");
wp_enqueue_script("mo_saml_admin_settings_script_widget", plugins_url("includes/js/settings.js", __FILE__));
}
function plugin_settings_style_widget()
{
wp_enqueue_style("mo_saml_admin_settings_style", plugins_url("includes/css/jquery.ui.css", __FILE__));
}
function mo_login_validate()
{
if (!(isset($_REQUEST["option"]) && $_REQUEST["option"] == "mosaml_metadata")) {
goto mPd;
}
miniorange_generate_metadata();
mPd:
if (!(isset($_REQUEST["option"]) && $_REQUEST["option"] == "export_configuration" and check_admin_referer("export_Configuration"))) {
goto C9g;
}
if (!current_user_can("manage_options")) {
goto fz7;
}
miniorange_import_export(true);
fz7:
exit;
C9g:
$rw = get_option("saml_identity_providers");
$rw = maybe_unserialize($rw);
if (is_array($rw)) {
goto SEM;
}
$an = array();
goto rZ5;
SEM:
$an = array_change_key_case($rw, CASE_LOWER);
rZ5:
if (isset($_REQUEST["idp"])) {
goto K13;
}
if (!empty(get_option("saml_default_idp"))) {
goto OBp;
}
goto n0R;
K13:
$K1 = strtolower($_REQUEST["idp"]);
goto n0R;
OBp:
$K1 = strtolower(get_option("saml_default_idp"));
n0R:
if (!(!empty($rw) && (isset($_REQUEST["option"]) && $_REQUEST["option"] == "saml_user_login" || isset($_REQUEST["option"]) && $_REQUEST["option"] == "testConfig") && (!empty($K1) && array_key_exists($K1, $an) || isset($_REQUEST["entityID"])))) {
goto wOO;
}
if (!(is_user_logged_in() && $_REQUEST["option"] != "testConfig")) {
goto wh_;
}
return;
wh_:
if (!mo_saml_is_sp_configured()) {
goto THB;
}
$he = get_option("mo_saml_sp_base_url");
if (empty($K1)) {
goto Uan;
}
$pi = $an[$K1];
Uan:
if (!isset($_REQUEST["entityID"])) {
goto i1X;
}
$yD = getIdpNameFromEntityId($rw, $_REQUEST["entityID"]);
if ($yD) {
goto him;
}
wp_die("We could not sign you in. Please contact your administrator", "Error: No such Identity Provider is counfigured at your SP");
him:
$pi = $rw[$yD];
i1X:
if (array_key_exists("enable_idp", $pi)) {
goto d0m;
}
$pi["enable_idp"] = false;
d0m:
if ($pi["enable_idp"]) {
goto Rka;
}
wp_die("We could not sign you in. Please contact your administrator", "Error: IDP not enabled");
Rka:
if (!empty($he)) {
goto VaU;
}
$he = home_url();
VaU:
if ($_REQUEST["option"] == "testConfig" and array_key_exists("newcert", $_REQUEST)) {
goto qo1;
}
if ($_REQUEST["option"] == "testConfig") {
goto apC;
}
if (get_option("mo_saml_relay_state") && get_option("mo_saml_relay_state") != '') {
goto Pbv;
}
if (isset($_REQUEST["redirect_to"])) {
goto phL;
}
$VO = saml_get_referer_page_url();
goto m2P;
phL:
$VO = $_REQUEST["redirect_to"];
m2P:
goto rmP;
Pbv:
$VO = get_option("mo_saml_relay_state");
rmP:
goto XzL;
apC:
$VO = "testValidate";
XzL:
goto PNy;
qo1:
$VO = "testNewCertificate";
PNy:
if (empty($VO)) {
goto wdI;
}
$hT = parse_url($VO, PHP_URL_PATH);
wdI:
$hT = empty($hT) ? "/" : $hT;
if (empty($VO)) {
goto H2l;
}
$AR = parse_url($VO, PHP_URL_QUERY);
H2l:
if (!empty($AR)) {
goto Jkp;
}
$VO = $hT;
goto Cw6;
Jkp:
$VO = $hT . "?" . $AR;
Cw6:
$tF = $pi["sso_url"];
$uZ = $pi["request_signed"];
$F8 = $pi["sso_binding_type"];
$DD = get_option("mo_saml_force_authentication");
$RK = $he . "/";
$Y1 = get_option("mo_saml_sp_entity_id");
$eD = $pi["nameid_format"];
if (!empty($eD)) {
goto XhR;
}
$eD = "1.1:nameid-format:unspecified";
XhR:
if (!empty($Y1)) {
goto INe;
}
$Y1 = $he . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
INe:
$Y1 = isset($pi["saml_sp_entity_id"]) ? $pi["saml_sp_entity_id"] : $Y1;
$Es = isset($_POST["uname_email"]) ? $_POST["uname_email"] : false;
if (!$Es) {
goto n39;
}
$x2 = email_exists($Es);
if (!($x2 == false)) {
goto W50;
}
$Es = false;
update_site_option("mo_saml_shortcode_message", "User does not Exits");
return;
W50:
n39:
$zz = Utilities::createAuthnRequest($RK, $Y1, $tF, $pi, $DD, $F8, $eD);
if (empty($F8) || $F8 == "HttpRedirect") {
goto F1i;
}
if (!($uZ == "unchecked")) {
goto u57;
}
$F0 = base64_encode($zz);
Utilities::postSAMLRequest($tF, $F0, $VO, $Es);
exit;
u57:
if ($_REQUEST["option"] == "testidpconfig" && $_REQUEST["newcert"] == true) {
goto UdA;
}
$F0 = Utilities::signXML($zz, $pi, "NameIDPolicy");
goto YjL;
UdA:
$F0 = Utilities::signXML($zz, $pi, "NameIDPolicy", true);
YjL:
Utilities::postSAMLRequest($tF, $F0, $VO, $Es);
goto irP;
F1i:
$kY = $tF;
if (strpos($tF, "?") !== false) {
goto D11;
}
$kY .= "?";
goto BsX;
D11:
$kY .= "&";
BsX:
if (!($uZ == "unchecked")) {
goto dC_;
}
$kY .= "SAMLRequest=" . $zz . "&RelayState=" . urlencode($VO);
if (!$Es) {
goto WZY;
}
$kY .= "&Email=" . urlencode($Es);
WZY:
header("Location: " . $kY);
exit;
dC_:
$zz = "SAMLRequest=" . $zz . "&RelayState=" . urlencode($VO) . "&SigAlg=" . urlencode(XMLSecurityKey::RSA_SHA256);
$IK = array("type" => "private");
$sv = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $IK);
if ($_REQUEST["option"] == "testidpconfig" && $_REQUEST["newcert"] == true) {
goto GDT;
}
$yN = mo_saml_get_sp_private_key_for_idp($pi);
goto eAA;
GDT:
$yN = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
eAA:
$sv->loadKey($yN, FALSE);
$V8 = new XMLSecurityDSig();
$E1 = $sv->signData($zz);
$E1 = base64_encode($E1);
$kY .= $zz . "&Signature=" . urlencode($E1);
if (!$Es) {
goto b9u;
}
$kY .= "&Email=" . urlencode($Es);
b9u:
header("Location: " . $kY);
exit;
irP:
THB:
wOO:
if (!(array_key_exists("SAMLResponse", $_REQUEST) && !empty($_REQUEST["SAMLResponse"]))) {
goto NR8;
}
$he = get_option("mo_saml_sp_base_url");
if (!empty($he)) {
goto H36;
}
$he = home_url();
H36:
$Pj = $_REQUEST["SAMLResponse"];
$Pj = base64_decode($Pj);
if (!(array_key_exists("SAMLResponse", $_GET) && !empty($_GET["SAMLResponse"]))) {
goto ttv;
}
$Pj = gzinflate($Pj);
ttv:
$Pg = new DOMDocument();
$Pg->loadXML($Pj);
$Bh = $Pg->firstChild;
$KS = $Pg->documentElement;
$nY = new DOMXpath($Pg);
$nY->registerNamespace("samlp", "urn:oasis:names:tc:SAML:2.0:protocol");
$nY->registerNamespace("saml", "urn:oasis:names:tc:SAML:2.0:assertion");
if ($Bh->localName == "LogoutResponse") {
goto J9N;
}
$rt = $nY->query("/samlp:Response/samlp:Status/samlp:StatusCode", $KS);
$B_ = isset($rt) ? $rt->item(0)->getAttribute("Value") : '';
$x1 = explode(":", $B_);
if (!array_key_exists(7, $x1)) {
goto l68;
}
$rt = $x1[7];
l68:
$A4 = $nY->query("/samlp:Response/samlp:Status/samlp:StatusMessage", $KS);
$Q5 = isset($A4) ? $A4->item(0) : '';
if (empty($Q5)) {
goto sKq;
}
$Q5 = $Q5->nodeValue;
sKq:
$an = get_option("saml_identity_providers");
$an = maybe_unserialize($an);
if (array_key_exists("RelayState", $_POST) && !empty($_POST["RelayState"]) && $_POST["RelayState"] != "/") {
goto L7M;
}
$il = saml_get_current_page_url();
goto FQF;
L7M:
$il = $_POST["RelayState"];
FQF:
$JF = array("saml_response" => base64_encode($Pj));
$Pj = new SAML2_Response($Bh);
$UG = $Pj->getIssuer();
$LD = NULL;
foreach ($an as $sv => $y2) {
if (!($y2["idp_entity_id"] == $UG)) {
goto EPR;
}
$LD = $an[$sv];
goto DXC;
EPR:
dcT:
}
DXC:
if (!($rt != "Success")) {
goto vaJ;
}
show_status_error($rt, $il, $Q5, $LD);
vaJ:
if (!($LD == null)) {
goto JVP;
}
$LD = apply_filters("mo_saml_filter_identity_providers", $an, $UG);
JVP:
$yD = '';
if ($il == "testNewCertificate") {
goto hxc;
}
$Q6 = mo_saml_get_sp_private_key_for_idp($LD);
goto daN;
hxc:
$Q6 = file_get_contents(plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
daN:
$Pj->parseAssertions($Bh, $Q6);
$pU = $Pj->getSignatureData();
$U9 = current($Pj->getAssertions())->getSignatureData();
$cC = current($Pj->getAssertions())->getIssuer();
if (is_null($LD)) {
goto Qdz;
}
$yD = $LD["idp_name"];
$an[$yD] = array_merge($an[$yD], $JF);
$an = array_filter($an, "filter_empty_values");
update_option("saml_identity_providers", $an);
Qdz:
if (!(empty($U9) && empty($pU))) {
goto gE3;
}
if ($il == "testValidate" or $il == "testNewCertificate") {
goto GDU;
}
wp_die("We could not sign you in. Please contact administrator", "Error: Invalid SAML Response");
goto ilc;
GDU:
$no = mo_options_error_constants::Error_no_certificate;
$KD = mo_options_error_constants::Cause_no_certificate;
echo "<div style="font-family:Calibri;padding:0 3%;">
<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>\xd\xa <div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error :" . esc_html($no) . " </strong></p>
<p><strong>Possible Cause: " . esc_html($KD) . "</strong></p>
\xd\xa </div></div>";
mo_saml_download_logs($no, $KD, $yD);
exit;
ilc:
gE3:
if (!($LD === null && $il == "testValidate")) {
goto rq7;
}
$no = mo_options_error_constants::Error_issuer_not_verfied;
$KD = mo_options_error_constants::Cause_issuer_not_verfied;
echo "<div style="font-family:Calibri;padding:0 3%;">";
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>
\x9\x9<div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error: </strong>Unable to find a IDP Entity ID matching the configured fingerprint.</p>\xd
\x9\x9<p>Please contact your administrator and report the following error:</p>\xd\xa <p><strong>Possible Cause: </strong>'IDP Entity ID' field in plugin does not match the one found in SAML Response.</p>
\x9\x9 <p><strong>Entity ID found in SAML Response: </strong><font face="Courier New";font-size:10pt><br><br>" . esc_html($cC) . "</p></font>\xd
<p><strong>Solution:</strong></p>\xd
<ol>\xd
<li>Copy the Entity ID of SAML Response from above and paste it in Entity ID or Issuer field under Service Provider Setup tab.</li>
\xa </ol> \xd
</div>\xd
\x9 \x9 <div style="margin:3%;display:block;text-align:center;">
\x9\x9\x9 \x9<div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
mo_saml_download_logs($no, $KD);
exit;
rq7:
$e7 = maybe_unserialize($LD["x509_certificate"]);
$RK = $he . "/";
if (is_array($e7)) {
goto qOU;
}
$aH = XMLSecurityKey::getRawThumbprint($e7);
$aH = mo_saml_convert_to_windows_iconv($aH, $LD);
$aH = preg_replace("/\s+/", '', $aH);
if (empty($pU)) {
goto p2I;
}
$Tc = Utilities::processResponse($RK, $aH, $pU, $Pj, $e7, $il);
p2I:
if (empty($U9)) {
goto C89;
}
$Tc = Utilities::processResponse($RK, $aH, $U9, $Pj, $e7, $il);
C89:
goto kx5;
qOU:
foreach ($e7 as $WW => $KH) {
$aH = XMLSecurityKey::getRawThumbprint(Utilities::sanitize_certificate($KH));
$aH = mo_saml_convert_to_windows_iconv($aH, $LD);
$aH = preg_replace("/\s+/", '', $aH);
if (empty($pU)) {
goto s0b;
}
$Tc = Utilities::processResponse($RK, $aH, $pU, $Pj, $KH, $il);
s0b:
if (empty($U9)) {
goto nvG;
}
$Tc = Utilities::processResponse($RK, $aH, $U9, $Pj, $KH, $il);
nvG:
if (!$Tc) {
goto bih;
}
goto PHs;
bih:
rra:
}
PHs:
kx5:
if (!(empty($U9) && empty($pU))) {
goto PDD;
}
echo "No signature found in SAML Response or Assertion. Please sign at least one of them.";
exit;
PDD:
if ($pU) {
goto mOQ;
}
if ($U9) {
goto wIC;
}
goto G_m;
mOQ:
if (!(count($pU["Certificates"]) > 0)) {
goto K1A;
}
$QW = $pU["Certificates"][0];
K1A:
goto G_m;
wIC:
if (!(count($U9["Certificates"]) > 0)) {
goto wq9;
}
$QW = $U9["Certificates"][0];
wq9:
G_m:
if ($Tc) {
goto PTK;
}
if ($il == "testValidate" or $il == "testNewCertificate") {
goto MR3;
}
wp_die("We could not sign you in. Please contact administrator", "Error: Invalid SAML Response");
goto yqJ;
MR3:
$no = mo_options_error_constants::Error_wrong_certificate;
$KD = mo_options_error_constants::Cause_wrong_certificate;
$ZK = "-----BEGIN CERTIFICATE-----<br>" . chunk_split($QW, 64) . "<br>-----END CERTIFICATE-----";
echo "<div style="font-family:Calibri;padding:0 3%;">";
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>
\x9 \x9<div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error: </strong>Unable to find a certificate matching the configured fingerprint.</p>\xd\xa\x9 <p>Please contact your administrator and report the following error:</p>
\xa\x9\x9\x9<p><strong>Possible Cause: </strong>'X.509 Certificate' field in plugin does not match the certificate found in SAML Response.</p>
\xa\x9\x9 <p><strong>Certificate found in SAML Response: </strong><font face="Courier New";font-size:10pt><br><br>" . wp_kses($ZK, array("br" => array(), "u" => array())) . "</p></font>\xd\xa <p><strong>Solution: </strong></p>
\xa\x9\x9\x9 <ol>
<li>Copy paste the certificate provided above in X509 Certificate under Service Provider Setup tab.</li>
<li>If issue persists disable <b>Character encoding</b> under Service Provder Setup tab.</li>\xd
</ol> \xd
</div>
\xa\x9\x9 \x9 <div style="margin:3%;display:block;text-align:center;">
\xa\x9\x9\x9 <div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
mo_saml_download_logs($no, $KD, $yD);
exit;
yqJ:
PTK:
$Y1 = get_option("mo_saml_sp_entity_id");
if (!empty($Y1)) {
goto gJR;
}
$Y1 = $he . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
gJR:
$Y1 = isset($LD["saml_sp_entity_id"]) ? $LD["saml_sp_entity_id"] : $Y1;
Utilities::validateIssuerAndAudience($Pj, $Y1, $cC, $il, $yD);
$nF = current(current($Pj->getAssertions())->getNameId());
$w_ = current($Pj->getAssertions())->getAttributes();
$w_["NameID"] = array("0" => $nF);
$G6 = current($Pj->getAssertions())->getSessionIndex();
mo_saml_checkMapping($LD, $w_, $il, $G6);
goto mMF;
J9N:
if (!isset($_REQUEST["RelayState"])) {
goto MdQ;
}
$p3 = $_REQUEST["RelayState"];
MdQ:
if (!is_user_logged_in()) {
goto LNA;
}
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user(0);
LNA:
if (!empty($p3)) {
goto ZXn;
}
$p3 = home_url();
ZXn:
header("Location: " . $p3);
exit;
mMF:
NR8:
if (!(array_key_exists("SAMLRequest", $_REQUEST) && !empty($_REQUEST["SAMLRequest"]))) {
goto eI1;
}
$zz = $_REQUEST["SAMLRequest"];
$il = "/";
if (!array_key_exists("RelayState", $_REQUEST)) {
goto jm4;
}
$il = $_REQUEST["RelayState"];
jm4:
$zz = base64_decode($zz);
if (!(array_key_exists("SAMLRequest", $_GET) && !empty($_GET["SAMLRequest"]))) {
goto pdf;
}
$zz = gzinflate($zz);
pdf:
$Pg = new DOMDocument();
$Pg->loadXML($zz);
$Zl = $Pg->firstChild;
if (!($Zl->localName == "LogoutRequest")) {
goto xpc;
}
$S5 = new SAML2_LogoutRequest($Zl);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto VTQ;
}
session_start();
VTQ:
$_SESSION["mo_saml_logout_request"] = $zz;
$_SESSION["mo_saml_logout_relay_state"] = $il;
wp_logout();
xpc:
eI1:
}
function getIdpNameFromEntityId($an, $RJ)
{
if (!(!empty($an) and is_array($an))) {
goto yPu;
}
foreach ($an as $pi) {
if (!($pi["idp_entity_id"] == $RJ)) {
goto A1m;
}
return $pi["idp_name"];
A1m:
OZd:
}
Nj9:
yPu:
return false;
}
function mo_saml_checkMapping($LD, $w_, $il, $G6)
{
try {
$AX = get_option("saml_idp_attribute_mapping");
$AX = maybe_unserialize($AX);
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
$Wl = "NameID";
$PI = "NameID";
$pf = '';
$HY = check_if_default_mapping_required(true, $LD["idp_name"]);
if ($HY) {
goto maN;
}
$yD = $LD["idp_name"];
goto qfd;
maN:
$yD = "DEFAULT";
qfd:
if (!(!empty($AX) && array_key_exists($yD, $AX))) {
goto ctY;
}
if (empty($AX[$yD])) {
goto CiA;
}
$Wl = $AX[$yD]["email"];
$PI = $AX[$yD]["username"];
$m3 = $AX[$yD]["first_name"];
$cy = $AX[$yD]["last_name"];
$Gf = $AX[$yD]["group_name"];
$pf = $AX[$yD]["display_name"];
if (!array_key_exists("saml_am_account_matcher", $AX[$yD])) {
goto kCr;
}
$Y_ = $AX[$yD]["saml_am_account_matcher"];
kCr:
CiA:
ctY:
$HI = '';
$WK = '';
if (empty($w_)) {
goto jm8;
}
if (!empty($m3) && array_key_exists($m3, $w_)) {
goto pPp;
}
$m3 = '';
goto ezJ;
pPp:
$m3 = $w_[$m3][0];
ezJ:
if (!empty($cy) && array_key_exists($cy, $w_)) {
goto xSA;
}
$cy = '';
goto IGs;
xSA:
$cy = $w_[$cy][0];
IGs:
if (!empty($PI) && array_key_exists($PI, $w_)) {
goto W6X;
}
$WK = $w_["NameID"][0];
goto FJA;
W6X:
$WK = $w_[$PI][0];
FJA:
if (!empty($Wl) && array_key_exists($Wl, $w_)) {
goto a9W;
}
$HI = $w_["NameID"][0];
goto xhG;
a9W:
$HI = $w_[$Wl][0];
xhG:
if (!empty($Gf) && array_key_exists($Gf, $w_)) {
goto tgy;
}
$Gf = array();
goto JVp;
tgy:
$Gf = $w_[$Gf];
JVp:
if (!empty($Y_)) {
goto Xvp;
}
$Y_ = "email";
Xvp:
jm8:
if ($il == "testValidate" || $il == "testNewCertificate") {
goto Dbt;
}
mo_saml_login_user($HI, $m3, $cy, $WK, $Gf, $il, $Y_, $LD, $G6, $w_["NameID"][0], $pf, $w_);
goto pMB;
Dbt:
$an = get_option("saml_identity_providers");
$an = maybe_unserialize($an);
$yt = $LD["idp_name"];
$JF = array("test_status" => "Test successful");
if (empty($yt)) {
goto je2;
}
$an[$yt] = array_merge($an[$yt], $JF);
$an = array_filter($an, "filter_empty_values");
update_option("saml_identity_providers", $an);
je2:
mo_saml_show_test_result($m3, $cy, $HI, $Gf, $w_, $LD);
pMB:
} catch (Exception $dF) {
echo sprintf("An error occurred while processing the SAML Response.");
exit;
}
}
function check_if_default_mapping_required($Kv, $yD)
{
$AX = get_option("saml_idp_attribute_mapping");
$AX = maybe_unserialize($AX);
if (!empty($AX)) {
goto Z0p;
}
$AX = array();
Z0p:
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
if (!empty($ou)) {
goto S2c;
}
$ou = array();
S2c:
if ($Kv) {
goto QmV;
}
if (array_key_exists($yD, $ou)) {
goto UH5;
}
return true;
goto agx;
UH5:
$hR = $ou[$yD];
agx:
foreach ($hR as $sv => $y2) {
if (!($sv == "default_role")) {
goto tKI;
}
if ($y2 != "subscriber") {
goto vdk;
}
goto Cwp;
goto l2T;
vdk:
return false;
l2T:
tKI:
if (!($sv == "dont_create_user" || $sv == "dont_allow_unlisted_user" || $sv == "keep_existing_users_role" || $sv == "dont_allow_user_tologin_create_with_given_groups")) {
goto RZH;
}
if ($y2 != "unchecked") {
goto g0a;
}
goto Cwp;
goto Fsp;
g0a:
return false;
Fsp:
RZH:
if (empty($y2)) {
goto h80;
}
return false;
h80:
Cwp:
}
asV:
return true;
goto oAT;
QmV:
if (array_key_exists($yD, $AX)) {
goto HTi;
}
return true;
goto qkn;
HTi:
$Vm = $AX[$yD];
qkn:
$pJ = get_option("mo_saml_custom_attrs_mapping");
$pJ = maybe_unserialize($pJ);
$uM = array();
if (!array_key_exists($yD, $pJ)) {
goto SYa;
}
$uM = $pJ[$yD];
SYa:
if (empty($uM)) {
goto KG3;
}
$Vm = array_merge($Vm, $uM);
KG3:
foreach ($Vm as $sv => $y2) {
if (!($sv == "username" || $sv == "email")) {
goto WqI;
}
if ($y2 != "NameID") {
goto k7U;
}
goto MQN;
goto n7W;
k7U:
return false;
n7W:
WqI:
if (!($sv == "display_name")) {
goto EoV;
}
if ($y2 != "USERNAME") {
goto bRY;
}
goto MQN;
goto gjc;
bRY:
return false;
gjc:
EoV:
if (empty($y2)) {
goto WnW;
}
return false;
WnW:
MQN:
}
Gtf:
return true;
oAT:
}
function mo_saml_show_test_result($m3, $cy, $HI, $Gf, $w_, $LD)
{
ob_end_clean();
echo "<div style="font-family:Calibri;padding:0 3%;">";
$yt = $LD["idp_name"];
if (!empty($HI)) {
goto v_2;
}
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;">TEST FAILED</div>\xd\xa\x9 \x9<div style="color: #a94442;font-size:14pt; margin-bottom:20px;">WARNING: Some Attributes Did Not Match.</div>
\x9 <div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="" . plugin_dir_url(__FILE__) . "images/wrong.png"></div>";
goto n6h;
v_2:
$TT = maybe_unserialize(get_option("mo_saml_test_config_attrs"));
if (!empty($TT)) {
goto nXh;
}
$TT = array();
nXh:
if (empty($LD)) {
goto udE;
}
$Wk = array($yt => $w_);
$TT = array_merge($TT, $Wk);
update_option("mo_saml_test_config_attrs", $TT);
udE:
echo "<div style="color: #3c763d;
background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>";
if (!array_key_exists("NameID", $w_)) {
goto Wrq;
}
if (!(strlen($w_["NameID"][0]) > 60)) {
goto qx9;
}
echo "<div style="display: block;color: #e92b14;background-color: #fcf8e3;padding: 10px;border: solid 1px #faebcc;width:96%;">\xd
<span><b>NOTE :</b> NameID is greater than 60 characters long. User cannot be created with this NameID as Username.</span></div><br/>";
qx9:
Wrq:
echo "<div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="" . plugin_dir_url(__FILE__) . "images/green_check.png"></div>";
n6h:
$wf = get_option("saml_domain_restriction");
if (!empty($wf)) {
goto wd7;
}
$wf = array();
wd7:
$wf = maybe_unserialize($wf);
$z1 = $yt;
if (array_key_exists($z1, $wf)) {
goto n79;
}
$z1 = "DEFAULT";
n79:
if (!isset($wf[$z1])) {
goto Fu7;
}
$XL = $wf[$z1]["enable_domain_restriction"];
Fu7:
if (empty($XL)) {
goto xsa;
}
$IG = $wf[$z1]["allow_deny_login"];
if (!empty($IG) && $IG == "deny") {
goto mUu;
}
$GF = $wf[$z1]["email_domains"];
$YS = explode(";", $GF);
$bR = explode("@", $HI);
$tC = array_key_exists("1", $bR) ? $bR[1] : '';
if (in_array($tC, $YS)) {
goto XTl;
}
echo "<p style="color:red;">This user will not be allowed to login as the domain of the email is not included in the allowed list of Domain Restriction.</p>";
XTl:
goto d7u;
mUu:
$GF = $wf[$z1]["email_domains"];
$YS = explode(";", $GF);
$bR = explode("@", $HI);
$tC = array_key_exists("1", $bR) ? $bR[1] : '';
if (!in_array($tC, $YS)) {
goto s_N;
}
echo "<p style="color:red;">This user will not be allowed to login as the domain of the email is included in the denied list of Domain Restriction.</p>";
s_N:
d7u:
xsa:
echo "<span style="font-size:14pt;"><b>Hello</b>, " . $HI . "</span><br/><p style="font-weight:bold;font-size:14pt;margin-left:1%;">ATTRIBUTES RECEIVED:</p>\xd\xa\x9\x9\x9 <table style="border-collapse:collapse;border-spacing:0; width:100%; font-size:14pt;background-color:#EDEDED;">\xd\xa\x9\x9\x9\x9<tr style="text-align:center;"><td style="font-weight:bold;border:2px solid #949090;padding:2%;">ATTRIBUTE NAME</td><td style="font-weight:bold;padding:2%;border:2px solid #949090; word-wrap:break-word;">ATTRIBUTE VALUE</td></tr>";
if (!empty($w_)) {
goto x2M;
}
echo "No Attributes Received.";
goto Ckq;
x2M:
foreach ($w_ as $sv => $y2) {
echo "<tr><td style='font-weight:bold;border:2px solid #949090;padding:2%;word-wrap:break-word;'>" . $sv . "</td><td style='padding:2%;border:2px solid #949090; word-wrap:break-word;'>" . implode("<hr/>", $y2) . "</td></tr>";
ve9:
}
ht8:
Ckq:
echo "</table></div>";
echo "<div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
exit;
}
function mo_saml_convert_to_windows_iconv($aH, $LD)
{
$an = get_option("saml_identity_providers");
$an = maybe_unserialize($an);
if (!isset($LD["idp_name"]) || empty($LD["idp_name"])) {
goto yi9;
}
$yt = $LD["idp_name"];
goto Cb3;
yi9:
$yt = '';
Cb3:
if (!(!empty($yt) and isset($an[$yt]))) {
goto KMP;
}
$hV = $an[$yt]["mo_saml_encoding_enabled"];
if (!($hV === '')) {
goto VLy;
}
return $aH;
VLy:
KMP:
return iconv("UTF-8", "CP1252//IGNORE", $aH);
}
function mo_saml_login_user($HI, $m3, $cy, $WK, $Gf, $il, $Y_, $pi = NULL, $G6 = '', $hn = '', $Ks = '', $w_ = null)
{
$Jc = Utilities::mo_idp_limit_reached();
if (!$Jc) {
goto G0v;
}
wp_die("We could not sign you in. Please contact your administrator.", "IDP Limit Reached");
G0v:
$jE = sanitize_user($WK, true);
$et = apply_filters("pre_user_login", $jE);
$WK = trim($et);
$yD = $pi["idp_name"];
$Lq = $yD;
if (!array_key_exists("enable_idp", $pi)) {
goto XoY;
}
if ($pi["enable_idp"]) {
goto spJ;
}
wp_die("We could not sign you in. Please contact your administrator.", "IDP Disabled");
spJ:
XoY:
do_action("mo_abr_filter_login", $w_);
check_if_user_allowed_to_login_due_to_role_restriction($Gf, $yD);
$he = get_option("mo_saml_sp_base_url");
if (!empty($he)) {
goto Z24;
}
$he = home_url();
Z24:
$wf = get_option("saml_domain_restriction");
if (!empty($wf)) {
goto Qyv;
}
$wf = array();
Qyv:
$wf = maybe_unserialize($wf);
$z1 = $yD;
if (array_key_exists($z1, $wf)) {
goto SAi;
}
$z1 = "DEFAULT";
SAi:
if (!isset($wf[$z1])) {
goto jTF;
}
$XL = isset($wf[$z1]["enable_domain_restriction"]) ? $wf[$z1]["enable_domain_restriction"] : false;
jTF:
if (empty($XL)) {
goto ZPp;
}
$GF = $wf[$z1]["email_domains"];
$YS = explode(";", $GF);
$bR = explode("@", $HI);
$tC = array_key_exists("1", $bR) ? $bR[1] : '';
$IG = $wf[$z1]["allow_deny_login"];
$BY = get_option("mo_saml_restricted_domain_error_msg");
if (!empty($BY)) {
goto HYH;
}
$BY = "You are not allowed to login. Please contact your Administrator.";
HYH:
if (!empty($IG) && $IG == "deny") {
goto dRW;
}
if (in_array($tC, $YS)) {
goto LVY;
}
wp_die($BY, "Permission Denied : Not a Whitelisted user.");
LVY:
goto lUU;
dRW:
if (!in_array($tC, $YS)) {
goto lJ2;
}
wp_die($BY, "Permission Denied : Blacklisted user.");
lJ2:
lUU:
ZPp:
$fK = false;
$Xv = null;
if (!is_multisite()) {
goto aBh;
}
if (!username_exists($WK)) {
goto ezo;
}
$user = get_user_by("login", $WK);
ezo:
if (!email_exists($HI)) {
goto Eg_;
}
$user = get_user_by("email", $HI);
Eg_:
if (empty($user)) {
goto Rlf;
}
$Xv = $user;
$x2 = $user->ID;
$blog_id = get_current_blog_id();
if (is_user_member_of_blog($x2, $blog_id)) {
goto wXT;
}
$fK = true;
wXT:
Rlf:
aBh:
if ($Y_ == "username" && username_exists($WK) || username_exists($WK) and !$fK) {
goto CBZ;
}
if (email_exists($HI) and !$fK) {
goto cYI;
}
if (!username_exists($WK) && !email_exists($HI) || $fK) {
goto Ph5;
}
goto DzL;
cYI:
$user = get_user_by("email", $HI);
$x2 = $user->ID;
$yD = $pi["idp_name"];
do_action("mo_saml_update_username", $WK, $yD);
if (empty($m3)) {
goto AWV;
}
wp_update_user(array("ID" => $x2, "first_name" => $m3));
AWV:
if (empty($cy)) {
goto UY9;
}
wp_update_user(array("ID" => $x2, "last_name" => $cy));
UY9:
if (is_null($w_)) {
goto uCo;
}
update_user_meta($x2, "mo_saml_user_attributes", $w_);
if (empty($Ks)) {
goto EgP;
}
if (strcmp($Ks, "USERNAME") == 0) {
goto awu;
}
if (strcmp($Ks, "FNAME") == 0 && !empty($m3)) {
goto JzS;
}
if (strcmp($Ks, "LNAME") == 0 && !empty($cy)) {
goto OQ2;
}
if (strcmp($Ks, "FNAME_LNAME") == 0 && !empty($cy) && !empty($m3)) {
goto SSX;
}
if (!(strcmp($Ks, "LNAME_FNAME") == 0 && !empty($cy) && !empty($m3))) {
goto sBb;
}
wp_update_user(array("ID" => $x2, "display_name" => $cy . " " . $m3));
sBb:
goto iQf;
SSX:
wp_update_user(array("ID" => $x2, "display_name" => $m3 . " " . $cy));
iQf:
goto wFw;
OQ2:
wp_update_user(array("ID" => $x2, "display_name" => $cy));
wFw:
goto B1R;
JzS:
wp_update_user(array("ID" => $x2, "display_name" => $m3));
B1R:
goto yGv;
awu:
wp_update_user(array("ID" => $x2, "display_name" => $user->user_login));
yGv:
EgP:
if (!get_option("mo_saml_custom_attrs_mapping")) {
goto hNG;
}
$pJ = get_option("mo_saml_custom_attrs_mapping");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto m_9;
}
$HY = check_if_default_mapping_required(true, $yD);
if (!$HY) {
goto YVx;
}
$yD = "DEFAULT";
YVx:
if (!array_key_exists($yD, $pJ)) {
goto Y9X;
}
foreach ($pJ[$yD] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto GG1;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto T09;
}
$F1 = true;
T09:
if (!$F1) {
goto RHz;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto W_K;
RHz:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
R13:
}
ZVM:
update_user_meta($x2, $sv, $qP);
W_K:
GG1:
SPz:
}
Cpy:
Y9X:
m_9:
hNG:
uCo:
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
$ty = '';
$wh = get_option("mo_saml_relay_state");
if (!empty($wh)) {
goto bv3;
}
if (!empty($il)) {
goto LG1;
}
$ty = $he;
goto WgF;
LG1:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto XP4;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto PHj;
}
$ty = $he;
goto X7F;
PHj:
$ty = $il;
X7F:
goto lag;
XP4:
$ty = $il;
lag:
WgF:
goto qz8;
bv3:
$ty = $wh;
qz8:
do_action("miniorange_post_authenticate_user_login", $user, null, $ty);
$yD = $pi["idp_name"];
$nR = $yD;
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto In6;
}
$yD = "DEFAULT";
In6:
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto GcA;
}
$nw = $ou[$yD]["dont_allow_unlisted_user"];
$D6 = $ou[$yD]["default_role"];
$RD = $ou[$yD]["dont_create_user"];
$Zc = $ou[$yD]["keep_existing_users_role"];
GcA:
if (isset($Zc) && $Zc == "checked") {
goto IuP;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto qci;
IuP:
$PB = false;
qci:
if (is_administrator_user($user)) {
goto WhM;
}
if ($PB !== true && !empty($Zc) && $Zc == "checked") {
goto D8a;
}
if ($PB !== true && !empty($nw) && $nw == "checked") {
goto Wa2;
}
if ($PB !== true && !empty($D6)) {
goto z52;
}
if ($PB !== true) {
goto kyb;
}
goto FDK;
D8a:
wp_update_user(array("ID" => $x2));
goto FDK;
Wa2:
wp_update_user(array("ID" => $x2, "role" => false));
goto FDK;
z52:
wp_update_user(array("ID" => $x2, "role" => $D6));
goto FDK;
kyb:
$mR = get_option("default_role");
wp_update_user(array("ID" => $x2, "role" => $mR));
FDK:
WhM:
wp_set_current_user($x2);
$oK = false;
$oK = apply_filters("mo_remember_me", $oK);
wp_set_auth_cookie($x2, $oK);
$user = get_user_by("id", $x2);
do_action("wp_login", $user->user_login, $user);
if (empty($nR)) {
goto TTo;
}
update_user_meta($x2, "mo_saml_logged_in_with_idp", $nR);
TTo:
if (empty($G6)) {
goto gs8;
}
update_user_meta($x2, "mo_saml_session_index", $G6);
gs8:
if (empty($hn)) {
goto OND;
}
update_user_meta($x2, "mo_saml_name_id", $hn);
OND:
do_action("mo_saml_attributes", $WK, $HI, $m3, $cy, $Gf, $Lq);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto T8f;
}
session_start();
T8f:
$_SESSION["mo_saml"]["logged_in_with_idp"] = $nR;
if (empty($G6)) {
goto Uvk;
}
$_SESSION["mo_saml"]["sessionIndex"] = $G6;
Uvk:
if (empty($hn)) {
goto izm;
}
$_SESSION["mo_saml"]["nameId"] = $hn;
izm:
wp_redirect($ty);
exit;
goto DzL;
Ph5:
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
$yD = $pi["idp_name"];
$WK = apply_filters("mo_saml_filter_username", $WK, $yD);
$nR = $yD;
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto xkl;
}
$yD = "DEFAULT";
xkl:
$Lo = true;
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto ShT;
}
$nw = $ou[$yD]["dont_allow_unlisted_user"];
$D6 = $ou[$yD]["default_role"];
$RD = $ou[$yD]["dont_create_user"];
ShT:
$Nr = get_saml_roles_to_assign($ou, $yD, $Gf);
if (!(empty($Nr) && !empty($RD) && strcmp($RD, "checked") == 0)) {
goto T8O;
}
$Lo = FALSE;
T8O:
$x2 = NULL;
if ($Lo) {
goto x7y;
}
$BY = get_option("mo_saml_account_creation_disabled_msg");
if (!empty($BY)) {
goto yxO;
}
$BY = "We could not sign you in. Please contact your Administrator.";
yxO:
wp_die($BY, "Error: Not a WordPress Member");
exit;
goto OV_;
x7y:
$UW = wp_generate_password(10, false);
if (!$fK) {
goto r3w;
}
$x2 = $Xv->ID;
goto UOa;
r3w:
if (!empty($WK)) {
goto zlI;
}
$x2 = wp_create_user($HI, $UW, $HI);
goto eZp;
zlI:
if (!(strlen($WK) > 60)) {
goto UpW;
}
wp_die("We couldn't sign you in. Please contact your administrator", "Username length limit reached");
UpW:
$x2 = wp_create_user($WK, $UW, $HI);
eZp:
if (!is_wp_error($x2)) {
goto sPJ;
}
wp_die($x2->get_error_message() . "<br>Please contact your Administrator.<br><b>Username</b>: " . $HI, "Error: Couldn't create user");
sPJ:
UOa:
$user = get_user_by("id", $x2);
if (isset($Zc) and $Zc == "checked") {
goto l7k;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto eNO;
l7k:
$PB = false;
eNO:
if ($PB !== true && !empty($Zc) && $Zc == "checked") {
goto hWZ;
}
if ($PB !== true && !empty($nw) && $nw == "checked") {
goto ICw;
}
if ($PB !== true && !empty($D6)) {
goto fnC;
}
if ($PB !== true) {
goto msA;
}
goto A20;
hWZ:
wp_update_user(array("ID" => $x2));
goto A20;
ICw:
wp_update_user(array("ID" => $x2, "role" => false));
goto A20;
fnC:
wp_update_user(array("ID" => $x2, "role" => $D6));
goto A20;
msA:
$mR = get_option("default_role");
wp_update_user(array("ID" => $x2, "role" => $mR));
A20:
if (empty($m3)) {
goto JBe;
}
wp_update_user(array("ID" => $x2, "first_name" => $m3));
JBe:
if (empty($cy)) {
goto gKu;
}
wp_update_user(array("ID" => $x2, "last_name" => $cy));
gKu:
if (is_null($w_)) {
goto CMx;
}
update_user_meta($x2, "mo_saml_user_attributes", $w_);
if (empty($Ks)) {
goto bBr;
}
if (strcmp($Ks, "USERNAME") == 0) {
goto Zez;
}
if (strcmp($Ks, "FNAME") == 0 && !empty($m3)) {
goto IVV;
}
if (strcmp($Ks, "LNAME") == 0 && !empty($cy)) {
goto gje;
}
if (strcmp($Ks, "FNAME_LNAME") == 0 && !empty($cy) && !empty($m3)) {
goto PeA;
}
if (!(strcmp($Ks, "LNAME_FNAME") == 0 && !empty($cy) && !empty($m3))) {
goto St3;
}
wp_update_user(array("ID" => $x2, "display_name" => $cy . " " . $m3));
St3:
goto mmK;
PeA:
wp_update_user(array("ID" => $x2, "display_name" => $m3 . " " . $cy));
mmK:
goto ZN9;
gje:
wp_update_user(array("ID" => $x2, "display_name" => $cy));
ZN9:
goto h_H;
IVV:
wp_update_user(array("ID" => $x2, "display_name" => $m3));
h_H:
goto U7j;
Zez:
wp_update_user(array("ID" => $x2, "display_name" => $user->user_login));
U7j:
bBr:
if (!get_option("mo_saml_custom_attrs_mapping")) {
goto pmO;
}
$pJ = get_option("mo_saml_custom_attrs_mapping");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto Aiw;
}
$HY = check_if_default_mapping_required(true, $nR);
if (!$HY) {
goto i_c;
}
$nR = "DEFAULT";
i_c:
if (!array_key_exists($nR, $pJ)) {
goto hk5;
}
foreach ($pJ[$nR] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto SpL;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto HtZ;
}
$F1 = true;
HtZ:
if (!$F1) {
goto fwM;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto gpd;
fwM:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
cnQ:
}
TjD:
update_user_meta($x2, $sv, $qP);
gpd:
SpL:
Gu8:
}
fcX:
hk5:
Aiw:
pmO:
CMx:
OV_:
$user = get_user_by("id", $x2);
if ($user) {
goto vg7;
}
if (!empty($il)) {
goto XZC;
}
wp_redirect(network_home_url());
goto WeW;
XZC:
wp_redirect($il);
WeW:
exit;
vg7:
$wh = get_option("mo_saml_relay_state");
if (!empty($wh)) {
goto aku;
}
if (!empty($il)) {
goto FfU;
}
$ty = $he;
goto k6K;
FfU:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto x2L;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto OlP;
}
$ty = $he;
goto zOX;
OlP:
$ty = $il;
zOX:
goto MCr;
x2L:
$ty = $il;
MCr:
k6K:
goto PNz;
aku:
$ty = $wh;
PNz:
do_action("miniorange_post_authenticate_user_login", $user, null, $ty, true);
wp_set_current_user($user->ID);
$oK = false;
$oK = apply_filters("mo_remember_me", $oK);
do_action("user_register", $user->ID);
wp_set_auth_cookie($user->ID, $oK);
do_action("wp_login", $user->user_login, $user);
if (empty($nR)) {
goto Kvo;
}
update_user_meta($x2, "mo_saml_logged_in_with_idp", $nR);
Kvo:
if (empty($G6)) {
goto xE5;
}
update_user_meta($x2, "mo_saml_session_index", $G6);
xE5:
if (empty($hn)) {
goto AkQ;
}
update_user_meta($x2, "mo_saml_name_id", $hn);
AkQ:
do_action("mo_saml_attributes", $WK, $HI, $m3, $cy, $Gf, $Lq, true);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto hfZ;
}
session_start();
hfZ:
$_SESSION["mo_saml"]["logged_in_with_idp"] = $nR;
if (empty($G6)) {
goto vLJ;
}
$_SESSION["mo_saml"]["sessionIndex"] = $G6;
vLJ:
if (empty($hn)) {
goto o6v;
}
$_SESSION["mo_saml"]["nameId"] = $hn;
o6v:
wp_redirect($ty);
exit;
DzL:
goto bvL;
CBZ:
if (!(strlen($WK) > 60)) {
goto OIt;
}
wp_die("We couldn't sign you in. Please contact your administrator", "Username length limit reached");
OIt:
$user = get_user_by("login", $WK);
$x2 = $user->ID;
$yD = $pi["idp_name"];
$nR = $yD;
do_action("mo_saml_update_username", $WK, $yD);
if (empty($m3)) {
goto xEh;
}
wp_update_user(array("ID" => $x2, "first_name" => $m3));
xEh:
if (empty($cy)) {
goto rL9;
}
wp_update_user(array("ID" => $x2, "last_name" => $cy));
rL9:
if (empty($HI)) {
goto sZX;
}
wp_update_user(array("ID" => $x2, "user_email" => $HI));
sZX:
if (!get_option("mo_saml_custom_attrs_mapping")) {
goto Hro;
}
$pJ = get_option("mo_saml_custom_attrs_mapping");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto hT2;
}
$HY = check_if_default_mapping_required(true, $yD);
if (!$HY) {
goto KoL;
}
$yD = "DEFAULT";
KoL:
if (!array_key_exists($yD, $pJ)) {
goto wfF;
}
foreach ($pJ[$yD] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto ZQx;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto gEv;
}
$F1 = true;
gEv:
if (!$F1) {
goto WBW;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto Dab;
WBW:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
QRm:
}
qHG:
update_user_meta($x2, $sv, $qP);
Dab:
ZQx:
JmZ:
}
t7g:
wfF:
hT2:
Hro:
global $wpdb;
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto gZd;
}
$yD = "DEFAULT";
gZd:
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto wIL;
}
$nw = isset($ou[$yD]["dont_allow_unlisted_user"]) ? $ou[$yD]["dont_allow_unlisted_user"] : '';
$D6 = $ou[$yD]["default_role"];
$RD = isset($ou[$yD]["dont_create_user"]) ? $ou[$yD]["dont_create_user"] : '';
$Zc = isset($ou[$yD]["keep_existing_users_role"]) ? $ou[$yD]["keep_existing_users_role"] : '';
wIL:
if (isset($Zc) && $Zc == "checked") {
goto X2W;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto mCA;
X2W:
$PB = false;
mCA:
if (is_administrator_user($user)) {
goto ew4;
}
if ($PB !== true && !empty($Zc) && $Zc == "checked") {
goto iY9;
}
if ($PB !== true && !empty($nw) && $nw == "checked") {
goto Pep;
}
if ($PB !== true && !empty($D6)) {
goto IqI;
}
if ($PB !== true) {
goto xGz;
}
goto QyL;
iY9:
wp_update_user(array("ID" => $x2));
goto QyL;
Pep:
wp_update_user(array("ID" => $x2, "role" => false));
goto QyL;
IqI:
wp_update_user(array("ID" => $x2, "role" => $D6));
goto QyL;
xGz:
$mR = get_option("default_role");
wp_update_user(array("ID" => $x2, "role" => $mR));
QyL:
ew4:
if (is_null($w_)) {
goto dIp;
}
update_user_meta($x2, "mo_saml_user_attributes", $w_);
if (empty($Ks)) {
goto xNz;
}
if (strcmp($Ks, "USERNAME") == 0) {
goto huz;
}
if (strcmp($Ks, "FNAME") == 0 && !empty($m3)) {
goto ESz;
}
if (strcmp($Ks, "LNAME") == 0 && !empty($cy)) {
goto c18;
}
if (strcmp($Ks, "FNAME_LNAME") == 0 && !empty($cy) && !empty($m3)) {
goto EzE;
}
if (!(strcmp($Ks, "LNAME_FNAME") == 0 && !empty($cy) && !empty($m3))) {
goto JeQ;
}
wp_update_user(array("ID" => $x2, "display_name" => $cy . " " . $m3));
JeQ:
goto lTb;
EzE:
wp_update_user(array("ID" => $x2, "display_name" => $m3 . " " . $cy));
lTb:
goto Jr3;
c18:
wp_update_user(array("ID" => $x2, "display_name" => $cy));
Jr3:
goto f63;
ESz:
wp_update_user(array("ID" => $x2, "display_name" => $m3));
f63:
goto QUL;
huz:
wp_update_user(array("ID" => $x2, "display_name" => $user->user_login));
QUL:
xNz:
dIp:
$ty = '';
$wh = get_option("mo_saml_relay_state");
if (!empty($wh)) {
goto Ojy;
}
if (!empty($il)) {
goto O2v;
}
$ty = $he;
goto pdg;
O2v:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto hcJ;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto dZa;
}
$ty = $he;
goto ot1;
dZa:
$ty = $il;
ot1:
goto NSL;
hcJ:
$ty = $il;
NSL:
pdg:
goto QwA;
Ojy:
$ty = $wh;
QwA:
do_action("miniorange_post_authenticate_user_login", $user, null, $ty, true);
wp_set_current_user($x2);
$oK = false;
$oK = apply_filters("mo_remember_me", $oK);
wp_set_auth_cookie($x2, $oK);
$user = get_user_by("id", $x2);
do_action("wp_login", $user->user_login, $user);
if (empty($nR)) {
goto aCU;
}
update_user_meta($x2, "mo_saml_logged_in_with_idp", $nR);
aCU:
if (empty($G6)) {
goto uoB;
}
update_user_meta($x2, "mo_saml_session_index", $G6);
uoB:
if (empty($hn)) {
goto l9Q;
}
update_user_meta($x2, "mo_saml_name_id", $hn);
l9Q:
do_action("mo_saml_attributes", $WK, $HI, $m3, $cy, $Gf, $Lq);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto nbt;
}
session_start();
nbt:
$_SESSION["mo_saml"]["logged_in_with_idp"] = $nR;
if (empty($G6)) {
goto nvi;
}
$_SESSION["mo_saml"]["sessionIndex"] = $G6;
nvi:
if (empty($hn)) {
goto Zaj;
}
$_SESSION["mo_saml"]["nameId"] = $hn;
Zaj:
wp_redirect($ty);
exit;
bvL:
}
function check_if_user_allowed_to_login_due_to_role_restriction($Gf, $yD)
{
$ou = get_option("saml_idp_role_mapping");
$ou = maybe_unserialize($ou);
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto N0c;
}
$yD = "DEFAULT";
N0c:
if (!(!empty($ou) && array_key_exists($yD, $ou))) {
goto M2w;
}
$jz = isset($ou[$yD]["dont_allow_user_tologin_create_with_given_groups"]) ? $ou[$yD]["dont_allow_user_tologin_create_with_given_groups"] : '';
if (!($jz == "checked")) {
goto Cdb;
}
if (empty($Gf)) {
goto Nu3;
}
$CK = $ou[$yD]["mo_saml_restrict_users_with_groups"];
$LZ = explode(";", $CK);
foreach ($LZ as $MV) {
foreach ($Gf as $Nx) {
$Nx = trim($Nx);
if (!(!empty($Nx) && $Nx == $MV)) {
goto TUn;
}
wp_die("You are not authorized to login. Please contact your administrator.", "Error");
TUn:
V9p:
}
Vn7:
qc0:
}
voD:
Nu3:
Cdb:
M2w:
}
function assign_roles_to_user($user, $ou, $yD, $Gf)
{
$PB = false;
if (!(!empty($Gf) && !empty($ou) && !is_administrator_user($user) && !empty($ou[$yD]))) {
goto iPA;
}
$user->set_role(false);
$G0 = '';
$kO = false;
$cF = $ou[$yD];
unset($cF["default_role"]);
unset($cF["dont_create_user"]);
unset($cF["dont_allow_unlisted_user"]);
unset($cF["mo_saml_restrict_users_with_groups"]);
unset($cF["keep_existing_users_role"]);
unset($cF["dont_allow_user_tologin_create_with_given_groups"]);
foreach ($cF as $G3 => $BG) {
$LZ = explode(";", $BG);
foreach ($LZ as $MV) {
if (!(!empty($MV) and in_array($MV, $Gf))) {
goto r24;
}
$PB = true;
$user->add_role($G3);
r24:
H2h:
}
c02:
hQB:
}
xyI:
iPA:
return $PB;
}
function get_saml_roles_to_assign($ou, $yD, $Gf)
{
$Nr = array();
if (!(!empty($Gf) && !empty($ou) && !empty($ou[$yD]))) {
goto kwp;
}
unset($ou[$yD]["default_role"]);
unset($ou[$yD]["dont_create_user"]);
unset($ou[$yD]["dont_allow_unlisted_user"]);
unset($ou[$yD]["mo_saml_restrict_users_with_groups"]);
unset($ou[$yD]["keep_existing_users_role"]);
unset($ou[$yD]["dont_allow_user_tologin_create_with_given_groups"]);
foreach ($ou[$yD] as $G3 => $BG) {
$LZ = explode(";", $BG);
foreach ($LZ as $MV) {
if (!(!empty($MV) && in_array($MV, $Gf))) {
goto Vkf;
}
array_push($Nr, $G3);
Vkf:
CCE:
}
Yle:
mfX:
}
kEj:
kwp:
return $Nr;
}
function show_status_error($Ot, $il, $U1, $LD)
{
if ($il == "testValidate") {
goto a43;
}
if ($Ot == "Responder" || $Ot == "Requester") {
goto Y3r;
}
wp_die("We could not sign you in. Please contact your Administrator.", "Error: Invalid SAML Response Status");
goto cPS;
Y3r:
mo_saml_handle_azureb2c_cases($il, $U1, $LD);
cPS:
goto COZ;
a43:
if (!($Ot == "Responder")) {
goto AEX;
}
mo_saml_handle_azureb2c_cases($il, $U1, $LD);
AEX:
echo "<div style="font-family:Calibri;padding:0 3%;">";
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>\xd
<div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error: </strong> Invalid SAML Response Status.</p>\xd\xa <p><strong>Causes</strong>: Identity Provider has sent '" . esc_html($Ot) . "' status code in SAML Response. </p>\xd\xa <p><strong>Reason</strong>: " . get_status_message(esc_html($Ot)) . "</p><br>";
if (empty($U1)) {
goto kFl;
}
echo "<p><strong>Status Message in the SAML Response:</strong> <br/>" . esc_html($U1) . "</p>";
kFl:
if (!($U1 == mo_options_plugin_azureb2c_statusmsg::Forgot)) {
goto fmV;
}
echo "<p>Please set the password reset link in your azure b2c idp configuration settings.</p> ";
fmV:
echo "
</div>
<div style="margin: 3%; display: block; text-align: center;">\xd\xa <div style="margin: 3%; display: block; text-align: center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
exit;
COZ:
}
function mo_saml_handle_azureb2c_cases($il, $U1, $LD)
{
switch ($U1) {
case mo_options_plugin_azureb2c_statusmsg::Forgot:
mo_saml_paswd_reset_url($LD, $il);
goto E_V;
case mo_options_plugin_azureb2c_statusmsg::Cancel:
mo_saml_azureb2c_cancel_msg_case($il);
case mo_options_plugin_azureb2c_statusmsg::Largeurl:
mo_saml_paswd_reset_large_url_case($il);
exit;
default:
if (!($il != "testValidate")) {
goto G19;
}
wp_die("We could not sign you in. Please contact your Administrator.", "Error: Invalid SAML Response Status");
goto E_V;
G19:
}
oUJ:
E_V:
}
function mo_saml_paswd_reset_url($LD, $il)
{
$Up = $LD;
$KY = !empty($Up["saml_pw_reset_url"]) ? html_entity_decode($Up["saml_pw_reset_url"]) : '';
if (!empty($KY)) {
goto hab;
}
if (!($il != "testValidate")) {
goto I3m;
}
wp_die("We could not sign you in. Please contact your Administrator.", "Error: Password reset URL is not configured in AzureB2C configuration");
I3m:
goto u7s;
hab:
wp_redirect($KY);
exit;
u7s:
}
function mo_saml_paswd_reset_large_url_case($il)
{
if (!($il != "testValidate")) {
goto Olo;
}
$ng = parse_url($il);
$il = $ng["path"];
wp_redirect($il);
Olo:
}
function mo_saml_azureb2c_cancel_msg_case($il)
{
if ($il == "testValidate") {
goto tDc;
}
wp_redirect($il);
exit;
goto Rzm;
tDc:
wp_redirect(home_url());
exit;
Rzm:
}
function addLink($RM, $wR)
{
$mG = "<a href="" . $wR . "">" . $RM . "</a>";
return $mG;
}
function get_status_message($Ot)
{
switch ($Ot) {
case "Requester":
return "The request could not be performed due to an error on the part of the requester.";
goto c7v;
case "Responder":
return "The request could not be performed due to an error on the part of the SAML responder or SAML authority.";
goto c7v;
case "VersionMismatch":
return "The SAML responder could not process the request because the version of the request message was incorrect.";
goto c7v;
default:
return "Unknown";
}
Sy2:
c7v:
}
function is_administrator_user($user)
{
$xn = $user->roles;
if (!is_null($xn) && in_array("administrator", $xn)) {
goto RCV;
}
return false;
goto G5M;
RCV:
return true;
G5M:
}
function mo_saml_is_customer_registered()
{
$jA = get_option("mo_saml_admin_email");
$UU = get_option("mo_saml_admin_customer_key");
if (!$jA || !$UU || !is_numeric(trim($UU))) {
goto Fhn;
}
return 1;
goto vv1;
Fhn:
return 0;
vv1:
}
function saml_get_referer_page_url()
{
if (!(isset($_SERVER["HTTP_REFERER"]) && !empty($_SERVER["HTTP_REFERER"]) && $_SERVER["HTTP_REFERER"] !== "/")) {
goto Zyv;
}
return $_SERVER["HTTP_REFERER"];
Zyv:
}
function saml_get_current_page_url()
{
$bd = $_SERVER["HTTP_HOST"];
if (!(substr($bd, -1) == "/")) {
goto LRB;
}
$bd = substr($bd, 0, -1);
LRB:
$BA = $_SERVER["REQUEST_URI"];
if (!(substr($BA, 0, 1) == "/")) {
goto C7X;
}
$BA = substr($BA, 1);
C7X:
$if = isset($_SERVER["HTTPS"]) && strcasecmp($_SERVER["HTTPS"], "on") == 0;
$p3 = "http" . ($if ? "s" : '') . "://" . $bd . "/" . $BA;
return $p3;
}
add_action("widgets_init", function () {
register_widget("Mo_SAML_Login_Widget");
});
add_action("wp_enqueue_scripts", "plugin_settings_style_widget");
add_action("wp_enqueue_scripts", "plugin_settings_script_widget");
add_action("init", "mo_login_validate");
?>
Did this file decode correctly?
Original Code
<?php
include_once dirname(__FILE__) . '/Utilities.php';
include_once dirname(__FILE__) . '/Response.php';
include_once dirname(__FILE__) . '/LogoutRequest.php';
if(!class_exists("AESEncryption")) {
require_once dirname(__FILE__) . '/includes/lib/encryption.php';
}
include_once 'xmlseclibs.php';
use RobRichards\XMLSecLibs\XMLSecurityKey;
use RobRichards\XMLSecLibs\XMLSecurityDSig;
use RobRichards\XMLSecLibs\XMLSecEnc;
class Mo_SAML_Login_Widget extends WP_Widget
{
public function __construct()
{
parent::__construct("\x53\x61\155\154\x5f\x4c\x6f\x67\151\156\137\127\x69\144\147\145\x74", "\114\x6f\147\x69\156", array("\144\145\163\x63\x72\151\160\x74\x69\157\x6e" => __("\124\150\x69\163\40\x69\x73\x20\x61\x20\155\151\x6e\x69\x4f\162\x61\156\x67\x65\40\x53\x41\115\x4c\x20\x6c\x6f\147\x69\x6e\x20\167\x69\144\147\145\x74\56", "\x6d\157\163\x61\x6d\154")));
}
public function widget($s1, $Pt)
{
extract($s1);
if (!(isset($Pt["\167\x69\x64\137\x74\x69\164\x6c\x65"]) && !empty($Pt["\167\x69\x64\x5f\x74\151\164\x6c\x65"]))) {
goto Qzj;
}
$MT = apply_filters("\167\x69\144\x67\x65\164\x5f\164\151\x74\x6c\145", $Pt["\x77\151\144\x5f\164\x69\x74\x6c\145"]);
Qzj:
echo $s1["\142\145\x66\157\162\x65\x5f\167\x69\144\147\x65\164"];
if (empty($MT)) {
goto fd9;
}
echo $s1["\x62\x65\x66\157\x72\x65\x5f\x74\151\164\x6c\x65"] . $MT . $s1["\141\x66\164\x65\162\137\x74\151\x74\x6c\x65"];
fd9:
$this->loginForm();
echo $s1["\x61\146\x74\x65\x72\137\167\151\x64\x67\145\x74"];
}
public function update($di, $ug)
{
$Pt = array();
$Pt["\167\151\144\x5f\164\151\164\x6c\x65"] = strip_tags($di["\167\151\144\x5f\164\151\164\154\145"]);
return $Pt;
}
public function form($Pt)
{
$MT = '';
if (!isset($Pt["\167\151\x64\x5f\x74\x69\x74\154\145"])) {
goto j18;
}
$MT = $Pt["\x77\x69\x64\137\164\151\x74\154\145"];
j18:
echo "\xd\xa\x9\11\74\160\x3e\x3c\x6c\x61\142\x65\154\x20\146\x6f\x72\75\x22" . $this->get_field_id("\x77\151\x64\x5f\164\151\164\x6c\x65") . "\x20\42\76" . _e("\124\x69\x74\154\x65\72") . "\x20\x3c\x2f\154\x61\x62\145\x6c\x3e\xd\12\11\x9\x3c\151\156\x70\x75\164\40\x63\154\x61\163\x73\75\42\x77\151\x64\145\146\x61\x74\x22\40\151\144\x3d\x22" . $this->get_field_id("\x77\151\x64\137\x74\x69\x74\154\145") . "\42\40\156\x61\155\145\x3d\x22" . $this->get_field_name("\x77\x69\144\137\x74\151\164\x6c\145") . "\42\40\x74\x79\160\x65\x3d\42\164\x65\170\164\x22\x20\166\141\x6c\x75\145\x3d\42" . $MT . "\42\40\x2f\x3e\xd\xa\x9\x9\74\57\160\76";
}
public function loginForm()
{
global $post;
if (!is_user_logged_in()) {
goto Zin;
}
$current_user = wp_get_current_user();
$an = get_option("\163\141\x6d\154\x5f\x69\144\x65\x6e\x74\151\x74\x79\137\x70\162\157\166\151\144\x65\162\163");
$an = maybe_unserialize($an);
$pi = get_user_meta($current_user->ID, "\155\x6f\137\x73\x61\155\x6c\x5f\x6c\157\147\147\x65\144\x5f\x69\156\x5f\x77\151\x74\x68\137\151\144\x70", true);
if (!empty($pi)) {
goto xPg;
}
$l2 = "\104\x45\x46\x41\125\x4c\124";
goto MWW;
xPg:
$l2 = $an[$pi];
MWW:
$PP = "\110\145\154\x6c\157\x2c";
if (empty($l2["\143\165\163\164\157\x6d\137\147\x72\145\145\x74\x69\156\x67\137\x74\x65\170\164"])) {
goto nb4;
}
$PP = $l2["\143\165\163\x74\157\x6d\137\x67\x72\x65\145\x74\x69\x6e\x67\x5f\x74\x65\170\164"];
nb4:
$Rx = '';
if (empty($l2["\147\x72\x65\x65\164\151\156\x67\x5f\156\141\155\145"])) {
goto g4w;
}
switch ($l2["\147\162\145\x65\164\x69\156\147\137\x6e\x61\x6d\x65"]) {
case "\125\x53\105\x52\116\x41\115\105":
$Rx = $current_user->user_login;
goto Jfl;
case "\105\115\x41\111\x4c":
$Rx = $current_user->user_email;
goto Jfl;
case "\106\x4e\x41\x4d\x45":
$Rx = $current_user->user_firstname;
goto Jfl;
case "\x4c\x4e\101\x4d\x45":
$Rx = $current_user->user_lastname;
goto Jfl;
case "\106\116\101\115\105\137\x4c\x4e\x41\x4d\x45":
$Rx = $current_user->user_firstname . "\x20" . $current_user->user_lastname;
goto Jfl;
case "\x4c\116\101\x4d\105\x5f\x46\116\101\115\x45":
$Rx = $current_user->user_lastname . "\40" . $current_user->user_firstname;
goto Jfl;
default:
$Rx = $current_user->user_login;
}
rWN:
Jfl:
g4w:
if (!empty(trim($Rx))) {
goto vCl;
}
$Rx = $current_user->user_login;
vCl:
$m2 = $PP . "\x20" . $Rx;
$Rz = "\114\x6f\x67\x6f\x75\x74";
if (empty($l2["\x63\x75\x73\x74\x6f\155\137\x6c\157\x67\157\x75\164\137\x74\x65\x78\x74"])) {
goto oLr;
}
$Rz = $l2["\x63\x75\163\164\x6f\x6d\x5f\x6c\157\x67\157\x75\x74\x5f\164\x65\x78\164"];
oLr:
echo $m2 . "\40\x7c\x20\74\x61\40\150\x72\x65\146\x3d\42" . wp_logout_url(home_url()) . "\x22\40\x74\151\164\154\x65\x3d\42\154\x6f\147\157\x75\164\42\x20\x3e" . $Rz . "\74\57\141\76\74\x2f\154\151\x3e";
$vP = saml_get_current_page_url();
update_option("\x6c\x6f\147\157\x75\164\x5f\x72\x65\144\x69\162\x65\143\164\137\x75\162\154", $vP);
goto y6h;
Zin:
$b1 = saml_get_current_page_url();
$rw = maybe_unserialize(get_option("\x73\x61\155\x6c\x5f\151\x64\x65\x6e\x74\151\x74\171\x5f\x70\x72\x6f\166\x69\144\145\162\163"));
if (!empty($rw)) {
goto Ixe;
}
echo "\120\154\145\x61\x73\x65\40\143\157\x6e\x66\151\x67\165\162\x65\x20\164\150\x65\40\155\151\x6e\151\117\162\141\156\147\x65\x20\x53\101\x4d\114\40\x50\154\165\x67\151\x6e\40\146\151\162\163\x74\56";
goto A8r;
Ixe:
foreach ($rw as $pi) {
if (!(isset($pi["\x65\x6e\141\142\x6c\145\x5f\x69\144\x70"]) && $pi["\x65\156\141\142\154\145\x5f\x69\x64\160"] == false)) {
goto qdD;
}
goto yXc;
qdD:
if (!empty($pi["\x69\x64\160\x5f\156\141\155\x65"])) {
goto IXA;
}
echo "\120\154\145\x61\163\x65\40\x63\157\x6e\146\x69\147\x75\162\145\x20\x74\x68\x65\40\x6d\151\x6e\151\117\162\x61\x6e\147\x65\40\123\x41\x4d\x4c\x20\120\x6c\165\147\151\x6e\x20\146\x69\162\x73\x74\56";
goto J5X;
IXA:
$s4 = "\154\157\x67\x69\x6e\137" . $pi["\x69\144\x70\137\x6e\141\x6d\x65"];
$ov = "\155\157\163\165\x62\x6d\151\x74\x73\x61\155\154\146\x6f\162\x6d\137" . $pi["\x69\x64\160\137\156\141\x6d\145"];
echo "\x3c\x73\143\x72\x69\x70\164\76\15\xa\40\40\40\40\11\x9\x9\11\11\x6a\x51\x75\x65\x72\171\50\40\144\157\x63\x75\155\145\x6e\164\40\51\56\162\x65\x61\x64\171\x28\x66\165\156\x63\x74\151\x6f\156\x28\51\x20\x7b\15\12\x9\11\11\x9\x9\x9\x20\x20\40\40\152\x51\x75\x65\162\171\50\x22\x23" . $ov . "\x22\x29\56\x63\x6c\x69\x63\153\50\x66\x75\156\143\x74\x69\x6f\x6e\50\145\51\x20\x7b\15\12\x9\x9\11\11\11\x20\x20\40\40\11\11\x65\56\160\x72\145\166\x65\x6e\164\104\x65\x66\x61\165\154\164\x28\51\73\xd\xa\x9\11\x9\x9\x20\x20\40\x20\x9\x9\x9\152\121\x75\x65\162\x79\50\x22\x23" . $s4 . "\42\x29\56\163\x75\x62\x6d\151\x74\x28\x29\73\15\xa\x9\x9\x9\x20\40\40\x20\x9\11\11\x7d\x29\x3b\15\xa\11\x9\x20\40\40\40\x9\11\x9\175\x29\73\15\12\x9\40\40\40\40\x9\11\11\x9\74\x2f\x73\x63\162\151\x70\164\x3e\xd\12\40\x20\x20\x20\x9\11\x9\x9\x9\74\x66\157\x72\x6d\x20\x6e\x61\155\x65\x3d\x22" . esc_attr($s4) . "\42\x20\151\x64\x3d\42" . esc_attr($s4) . "\42\40\x6d\145\x74\150\x6f\x64\x3d\x22\x70\x6f\163\x74\42\x20\141\x63\164\x69\x6f\156\75\x22\42\76\xd\xa\x20\40\x20\x20\40\x20\40\x20\x20\40\x20\40\40\40\40\40\40\40\x20\x20\40\x20\x20\40\x20\40\40\x20\40\x20\40\x20\74\151\156\160\165\x74\x20\x74\171\160\x65\75\x22\150\x69\144\144\x65\x6e\x22\x20\156\x61\x6d\145\x3d\x22\x6f\160\164\x69\x6f\x6e\x22\x20\x76\x61\x6c\165\145\x3d\42\x73\x61\155\154\137\x75\x73\145\x72\x5f\154\157\147\x69\156\x22\x20\57\76\15\12\x9\x9\x9\x9\x9\x9\40\40\40\40\x9\x3c\151\156\x70\x75\x74\40\164\171\160\145\x3d\42\150\151\x64\x64\145\x6e\42\40\156\141\155\x65\75\x22\x72\x65\144\x69\x72\145\143\164\137\x74\x6f\x22\x20\x76\141\154\x75\x65\75\42" . esc_url($b1) . "\42\40\57\x3e\15\12\11\11\11\11\x9\40\x20\40\40\x9\x9\74\x69\156\160\x75\x74\x20\x74\x79\160\x65\75\x22\x68\151\144\144\145\156\42\x20\156\141\155\x65\75\42\151\144\x70\42\x20\x76\x61\154\x75\x65\x3d\42" . esc_attr($pi["\x69\144\x70\x5f\x6e\x61\x6d\145"]) . "\x22\40\57\76\15\xa\x9\11\x9\11\x20\x20\40\40\11\x9\11\74\146\157\x6e\x74\x20\163\x69\x7a\x65\75\x22\x2b\x31\x22\40\x73\x74\x79\x6c\145\x3d\x22\x76\x65\162\164\151\143\x61\x6c\x2d\141\x6c\x69\x67\156\x3a\x74\x6f\160\x3b\x22\x3e\40\74\57\x66\x6f\156\x74\x3e";
$Ow = !empty($pi["\143\x75\163\x74\x6f\x6d\137\x6c\x6f\147\151\156\x5f\x74\145\x78\x74"]) ? $pi["\x63\165\x73\x74\157\x6d\x5f\154\x6f\147\151\156\x5f\164\145\x78\164"] : "\114\x6f\x67\151\x6e\x20\167\x69\x74\150\40" . $pi["\x69\144\x70\x5f\x6e\141\155\145"];
echo "\74\141\40\x68\x72\145\146\x3d\x22\x23\x22\x20\151\x64\75\42" . esc_attr($ov) . "\42\x3e" . esc_html($Ow) . "\x3c\57\141\x3e\74\57\146\x6f\162\x6d\76";
J5X:
yXc:
}
koO:
A8r:
y6h:
}
public function mo_saml_check_empty_or_null_val($y2)
{
if (!(!isset($y2) || empty($y2))) {
goto WGE;
}
return true;
WGE:
return false;
}
public function mo_saml_widget_init()
{
if (!(isset($_REQUEST["\157\x70\164\x69\x6f\x6e"]) and $_REQUEST["\x6f\160\x74\151\x6f\156"] == "\163\141\155\x6c\x5f\x75\x73\x65\162\137\x6c\x6f\147\157\x75\164")) {
goto syS;
}
$user = is_user_logged_in() ? wp_get_current_user() : null;
if (empty($user)) {
goto tmE;
}
wp_logout();
tmE:
syS:
}
function mo_saml_logout($x2)
{
$user = get_user_by("\151\144", $x2);
$current_user = $user;
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto yle;
}
session_start();
yle:
$LJ = array();
$yD = isset($_SESSION["\155\157\x5f\163\141\155\x6c"]["\154\157\147\147\x65\x64\x5f\x69\x6e\137\167\x69\164\150\137\151\144\160"]) ? $_SESSION["\x6d\x6f\x5f\x73\x61\155\154"]["\154\x6f\147\147\145\144\x5f\x69\x6e\x5f\167\151\164\150\137\151\x64\160"] : '';
if (!(!$yD && $current_user)) {
goto kwT;
}
$yD = get_user_meta($current_user->ID, "\x6d\157\137\x73\x61\x6d\x6c\137\154\157\147\x67\145\x64\x5f\151\156\137\167\151\x74\150\137\151\144\160", true);
kwT:
if (isset($_REQUEST["\x72\x65\144\151\x72\145\143\164\137\x74\157"]) and !empty($_REQUEST["\x72\x65\x64\x69\162\x65\x63\164\x5f\164\157"])) {
goto zai;
}
$Ha = wp_get_referer();
goto VEz;
zai:
$Ha = $_REQUEST["\x72\145\x64\x69\x72\x65\x63\164\137\x74\157"];
VEz:
if (!empty($Ha)) {
goto RC6;
}
$Ha = !empty(get_option("\155\157\137\x73\x61\155\x6c\x5f\163\x70\137\142\141\163\145\x5f\165\x72\154")) ? get_option("\155\157\x5f\163\141\155\154\x5f\x73\x70\137\x62\141\163\x65\x5f\x75\162\154") : home_url();
RC6:
$an = get_option("\163\x61\155\x6c\137\x69\144\x65\156\164\151\164\x79\x5f\x70\x72\157\x76\x69\144\145\162\163");
$an = maybe_unserialize($an);
if (!(is_array($an) && array_key_exists($yD, $an))) {
goto NsS;
}
$LJ = $an[$yD];
NsS:
if (!empty($LJ)) {
goto UK2;
}
wp_redirect($Ha);
exit;
goto Maz;
UK2:
$Ja = $LJ["\x73\x6c\157\137\165\x72\x6c"];
$ka = $LJ["\163\x6c\x6f\x5f\x62\x69\156\x64\x69\x6e\x67\x5f\x74\x79\x70\145"];
$uZ = $LJ["\x72\x65\161\x75\145\163\164\x5f\163\x69\147\x6e\x65\x64"];
if (!empty($Ja)) {
goto EOl;
}
wp_redirect($Ha);
exit;
goto F9x;
EOl:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto PAz;
}
session_start();
PAz:
if (isset($_SESSION["\155\157\x5f\163\x61\x6d\x6c\x5f\154\157\x67\157\x75\x74\x5f\x72\x65\161\x75\145\x73\x74"])) {
goto fgN;
}
if (isset($_SESSION["\155\157\x5f\x73\141\155\154"]["\x6c\x6f\x67\147\145\144\x5f\151\x6e\137\167\151\x74\150\x5f\x69\x64\x70"])) {
goto lAz;
}
goto rzr;
fgN:
self::createLogoutResponseAndRedirect($Ja, $ka, $LJ);
exit;
goto rzr;
lAz:
unset($_SESSION["\155\157\137\x73\141\x6d\154"]);
$hn = get_user_meta($current_user->ID, "\x6d\157\x5f\163\x61\x6d\154\137\156\x61\x6d\145\x5f\x69\x64");
$G6 = get_user_meta($current_user->ID, "\x6d\157\137\163\x61\155\x6c\137\163\x65\163\x73\x69\157\x6e\137\x69\156\x64\145\x78");
$he = get_option("\155\157\x5f\163\141\x6d\154\137\x73\x70\137\x62\141\x73\145\137\165\x72\154");
if (!empty($he)) {
goto jei;
}
$he = network_home_url();
jei:
if (!(substr($he, -1) == "\x2f")) {
goto LSn;
}
$he = substr($he, 0, -1);
LSn:
$cC = get_option("\x6d\157\137\x73\x61\x6d\x6c\137\163\160\137\145\156\x74\x69\164\171\x5f\x69\x64");
if (!empty($cC)) {
goto Pa0;
}
$cC = $he . "\57\167\160\55\x63\x6f\x6e\x74\145\x6e\x74\57\160\x6c\x75\147\151\x6e\x73\x2f\155\x69\x6e\151\x6f\162\141\156\147\x65\55\x73\141\155\154\55\62\x30\x2d\x73\151\x6e\x67\154\145\55\x73\151\147\x6e\55\157\156\57";
Pa0:
$cC = isset($LJ["\x73\141\x6d\x6c\x5f\x73\160\x5f\145\156\164\151\164\171\137\151\144"]) ? $LJ["\x73\x61\155\154\x5f\x73\x70\137\145\x6e\x74\151\x74\171\137\x69\144"] : $cC;
$BL = $Ja;
$VO = $Ha;
$eD = $LJ["\x6e\x61\155\x65\x69\144\137\146\x6f\162\155\141\x74"];
$VO = parse_url($VO, PHP_URL_PATH);
$VO = empty($VO) ? "\x2f" : $VO;
$zz = Utilities::createLogoutRequest($hn, $cC, $BL, $ka, $G6, $eD);
if (empty($ka) || $ka == "\110\164\164\x70\122\145\x64\151\x72\145\x63\164") {
goto m10;
}
if (!($uZ == "\x75\x6e\143\150\x65\143\153\x65\x64")) {
goto BCX;
}
$F0 = base64_encode($zz);
Utilities::postSAMLRequest($Ja, $F0, $VO);
exit;
BCX:
$F0 = Utilities::signXML($zz, $LJ, "\x4e\141\155\x65\111\104");
Utilities::postSAMLRequest($Ja, $F0, $LJ, $VO);
goto g1s;
m10:
$kY = $Ja;
if (strpos($Ja, "\x3f") !== false) {
goto f3Q;
}
$kY .= "\77";
goto dgW;
f3Q:
$kY .= "\46";
dgW:
if (!($uZ == "\165\x6e\143\150\145\143\x6b\145\144")) {
goto xkG;
}
$kY .= "\123\101\x4d\114\122\x65\x71\165\145\x73\164\75" . $zz . "\x26\122\x65\x6c\x61\x79\x53\164\141\164\x65\x3d" . urlencode($VO);
header("\114\x6f\x63\x61\x74\151\157\156\x3a\40" . $kY);
exit;
xkG:
$zz = "\x53\101\x4d\x4c\122\145\x71\165\x65\163\164\75" . $zz . "\x26\122\x65\x6c\141\171\x53\x74\141\x74\x65\75" . urlencode($VO) . "\46\x53\151\x67\101\154\147\75" . urlencode(XMLSecurityKey::RSA_SHA256);
$IK = array("\164\171\160\145" => "\x70\162\x69\x76\x61\164\145");
$sv = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $IK);
$yN = mo_saml_get_sp_private_key_for_idp($LJ);
$sv->loadKey($yN, FALSE);
$V8 = new XMLSecurityDSig();
$E1 = $sv->signData($zz);
$E1 = base64_encode($E1);
$kY .= $zz . "\x26\123\x69\x67\156\141\164\165\162\x65\75" . urlencode($E1);
header("\x4c\157\143\141\x74\x69\157\156\72\x20" . $kY);
exit;
g1s:
rzr:
F9x:
Maz:
}
function createLogoutResponseAndRedirect($Ja, $ka, $LJ)
{
$he = get_option("\155\x6f\x5f\x73\x61\x6d\x6c\137\x73\x70\137\x62\x61\163\x65\137\x75\162\x6c");
if (!empty($he)) {
goto dPx;
}
$he = home_url();
dPx:
$Cd = $_SESSION["\x6d\x6f\137\163\x61\x6d\x6c\x5f\154\x6f\x67\157\165\164\x5f\x72\x65\161\165\145\163\164"];
$p3 = $_SESSION["\x6d\157\137\x73\x61\155\x6c\137\x6c\157\x67\157\165\x74\x5f\x72\145\x6c\141\171\x5f\163\164\x61\164\x65"];
$uZ = $LJ["\x72\145\x71\165\145\x73\164\137\x73\151\x67\x6e\145\x64"];
if (!empty($p3) && (filter_var($p3, FILTER_VALIDATE_URL) || parse_url(home_url(), PHP_URL_HOST) === parse_url($p3, PHP_URL_HOST))) {
goto zOz;
}
wp_redirect($he);
goto iyc;
zOz:
wp_redirect($p3);
iyc:
unset($_SESSION["\155\157\x5f\x73\x61\x6d\x6c\x5f\x6c\x6f\x67\157\165\x74\x5f\x72\x65\161\165\145\163\x74"]);
unset($_SESSION["\x6d\157\x5f\x73\141\x6d\154\x5f\154\x6f\147\157\165\x74\x5f\x72\x65\154\141\171\x5f\163\x74\141\164\x65"]);
$Pg = new DOMDocument();
$Pg->loadXML($Cd);
$Cd = $Pg->firstChild;
if (!($Cd->localName == "\114\x6f\147\x6f\x75\x74\122\145\x71\x75\145\163\x74")) {
goto vQ1;
}
$S5 = new SAML2_LogoutRequest($Cd);
$Y1 = get_option("\x6d\x6f\137\163\141\155\154\x5f\x73\160\x5f\x65\156\x74\151\164\x79\x5f\x69\144");
if (!empty($Y1)) {
goto ZIg;
}
$Y1 = $he . "\57\x77\160\55\143\157\156\x74\145\156\x74\57\160\x6c\x75\x67\x69\156\163\57\x6d\151\156\x69\157\x72\141\156\147\145\55\x73\x61\155\154\55\62\60\x2d\163\x69\156\147\x6c\145\x2d\163\151\x67\x6e\x2d\x6f\156\57";
ZIg:
$Y1 = isset($LJ["\x73\141\x6d\154\x5f\x73\x70\x5f\145\x6e\x74\151\164\x79\137\151\144"]) ? $LJ["\x73\x61\x6d\x6c\x5f\163\x70\x5f\145\156\164\151\x74\x79\137\151\x64"] : $Y1;
$BL = $Ja;
$D3 = Utilities::createLogoutResponse($S5->getId(), $Y1, $BL, $ka);
if (empty($ka) || $ka == "\110\164\164\160\x52\x65\x64\x69\162\x65\x63\x74") {
goto oR_;
}
if (!($uZ == "\165\x6e\143\150\x65\x63\x6b\x65\144")) {
goto qSJ;
}
$F0 = base64_encode($D3);
Utilities::postSAMLResponse($Ja, $F0, $p3);
exit;
qSJ:
$F0 = Utilities::signXML($D3, $LJ, "\123\x74\x61\x74\x75\x73");
Utilities::postSAMLResponse($Ja, $F0, $p3);
goto MwH;
oR_:
$kY = $Ja;
if (strpos($Ja, "\77") !== false) {
goto qgx;
}
$kY .= "\77";
goto onD;
qgx:
$kY .= "\46";
onD:
if (!($uZ == "\x75\156\x63\x68\145\143\x6b\145\x64")) {
goto Vfj;
}
$kY .= "\x53\101\x4d\114\x52\x65\x73\160\157\x6e\163\x65\x3d" . $D3 . "\x26\x52\x65\154\141\x79\x53\164\x61\x74\145\x3d" . urlencode($p3);
header("\x4c\x6f\143\x61\x74\x69\157\156\x3a\40" . $kY);
exit;
Vfj:
$kY .= "\123\x41\115\114\x52\145\163\x70\157\x6e\163\x65\x3d" . $D3 . "\46\122\x65\154\141\171\123\x74\141\164\145\75" . urlencode($p3);
header("\114\157\143\x61\164\x69\157\x6e\72\40" . $kY);
exit;
MwH:
vQ1:
}
}
function plugin_settings_script_widget()
{
wp_enqueue_script("\152\161\x75\x65\x72\171");
wp_enqueue_script("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\141\144\155\x69\156\x5f\163\x65\164\164\151\156\x67\163\137\x73\x63\162\151\x70\x74\x5f\167\151\144\147\x65\164", plugins_url("\x69\156\x63\154\165\x64\145\163\57\x6a\163\x2f\163\145\x74\164\151\156\x67\x73\x2e\x6a\x73", __FILE__));
}
function plugin_settings_style_widget()
{
wp_enqueue_style("\155\x6f\x5f\163\141\x6d\x6c\x5f\141\x64\x6d\x69\x6e\137\x73\x65\164\164\151\156\x67\x73\137\163\x74\x79\x6c\x65", plugins_url("\151\x6e\143\154\165\144\145\x73\x2f\x63\163\163\57\x6a\161\165\145\162\171\x2e\165\151\x2e\x63\163\163", __FILE__));
}
function mo_login_validate()
{
if (!(isset($_REQUEST["\157\160\x74\x69\x6f\156"]) && $_REQUEST["\157\x70\x74\x69\x6f\x6e"] == "\155\157\x73\141\x6d\154\x5f\x6d\x65\164\x61\x64\x61\164\141")) {
goto mPd;
}
miniorange_generate_metadata();
mPd:
if (!(isset($_REQUEST["\x6f\160\164\151\x6f\x6e"]) && $_REQUEST["\157\x70\164\151\x6f\156"] == "\145\170\x70\157\162\x74\x5f\143\157\x6e\146\x69\x67\x75\162\141\x74\151\157\156" and check_admin_referer("\x65\x78\160\x6f\x72\x74\x5f\103\157\156\146\x69\147\165\162\x61\164\151\157\x6e"))) {
goto C9g;
}
if (!current_user_can("\155\141\156\141\x67\x65\137\157\160\x74\151\157\156\163")) {
goto fz7;
}
miniorange_import_export(true);
fz7:
exit;
C9g:
$rw = get_option("\163\141\155\154\137\x69\x64\145\156\164\151\164\171\x5f\x70\162\157\166\151\144\x65\162\163");
$rw = maybe_unserialize($rw);
if (is_array($rw)) {
goto SEM;
}
$an = array();
goto rZ5;
SEM:
$an = array_change_key_case($rw, CASE_LOWER);
rZ5:
if (isset($_REQUEST["\151\x64\x70"])) {
goto K13;
}
if (!empty(get_option("\163\141\x6d\x6c\x5f\144\145\146\x61\x75\154\x74\137\151\x64\160"))) {
goto OBp;
}
goto n0R;
K13:
$K1 = strtolower($_REQUEST["\151\144\160"]);
goto n0R;
OBp:
$K1 = strtolower(get_option("\x73\141\x6d\154\x5f\x64\145\146\141\165\x6c\164\x5f\x69\144\160"));
n0R:
if (!(!empty($rw) && (isset($_REQUEST["\x6f\x70\164\151\x6f\x6e"]) && $_REQUEST["\x6f\160\164\x69\157\x6e"] == "\163\141\x6d\x6c\137\x75\163\145\x72\x5f\x6c\x6f\x67\151\156" || isset($_REQUEST["\x6f\160\164\x69\157\156"]) && $_REQUEST["\x6f\x70\164\x69\157\x6e"] == "\164\145\x73\164\x43\x6f\156\x66\x69\147") && (!empty($K1) && array_key_exists($K1, $an) || isset($_REQUEST["\145\156\164\x69\x74\x79\111\x44"])))) {
goto wOO;
}
if (!(is_user_logged_in() && $_REQUEST["\x6f\x70\x74\151\157\156"] != "\164\x65\163\164\103\x6f\156\x66\151\x67")) {
goto wh_;
}
return;
wh_:
if (!mo_saml_is_sp_configured()) {
goto THB;
}
$he = get_option("\155\x6f\x5f\163\x61\x6d\154\137\x73\x70\x5f\x62\141\163\x65\137\x75\x72\x6c");
if (empty($K1)) {
goto Uan;
}
$pi = $an[$K1];
Uan:
if (!isset($_REQUEST["\145\x6e\164\151\164\171\x49\x44"])) {
goto i1X;
}
$yD = getIdpNameFromEntityId($rw, $_REQUEST["\x65\156\x74\151\164\171\x49\x44"]);
if ($yD) {
goto him;
}
wp_die("\127\145\40\x63\157\x75\x6c\x64\x20\x6e\x6f\x74\40\x73\151\147\x6e\40\171\157\165\x20\151\156\56\x20\x50\154\145\141\x73\x65\x20\x63\x6f\156\x74\141\143\164\x20\x79\157\165\162\x20\141\x64\x6d\151\156\151\x73\164\x72\141\164\x6f\x72", "\105\x72\162\x6f\162\72\40\116\x6f\40\x73\x75\x63\x68\x20\111\x64\145\156\x74\x69\164\x79\x20\120\162\x6f\166\151\144\x65\x72\40\151\163\x20\143\157\x75\x6e\146\151\147\x75\x72\145\x64\40\141\x74\40\171\157\x75\x72\x20\x53\x50");
him:
$pi = $rw[$yD];
i1X:
if (array_key_exists("\145\x6e\x61\142\154\145\x5f\x69\144\160", $pi)) {
goto d0m;
}
$pi["\145\156\x61\142\154\x65\x5f\x69\x64\160"] = false;
d0m:
if ($pi["\x65\156\x61\x62\x6c\x65\x5f\151\144\x70"]) {
goto Rka;
}
wp_die("\127\x65\40\143\x6f\165\x6c\x64\x20\x6e\x6f\x74\x20\x73\151\x67\156\40\x79\x6f\x75\x20\151\x6e\x2e\40\x50\154\x65\x61\x73\x65\40\x63\x6f\156\x74\141\x63\164\40\x79\x6f\x75\x72\x20\x61\x64\x6d\x69\x6e\x69\x73\164\x72\141\164\157\162", "\x45\162\162\x6f\x72\72\x20\111\104\120\40\x6e\x6f\x74\40\145\156\141\x62\154\x65\x64");
Rka:
if (!empty($he)) {
goto VaU;
}
$he = home_url();
VaU:
if ($_REQUEST["\x6f\160\164\x69\157\156"] == "\x74\x65\163\x74\103\157\x6e\x66\151\147" and array_key_exists("\156\145\167\x63\x65\x72\164", $_REQUEST)) {
goto qo1;
}
if ($_REQUEST["\x6f\160\x74\151\x6f\156"] == "\164\145\163\x74\103\x6f\x6e\146\151\x67") {
goto apC;
}
if (get_option("\x6d\x6f\137\163\141\155\154\137\162\145\x6c\x61\171\x5f\163\x74\141\164\x65") && get_option("\x6d\157\137\x73\141\155\154\x5f\x72\145\154\141\x79\x5f\163\164\x61\x74\145") != '') {
goto Pbv;
}
if (isset($_REQUEST["\162\145\144\151\x72\x65\x63\164\x5f\164\157"])) {
goto phL;
}
$VO = saml_get_referer_page_url();
goto m2P;
phL:
$VO = $_REQUEST["\162\145\x64\x69\x72\x65\143\164\x5f\164\157"];
m2P:
goto rmP;
Pbv:
$VO = get_option("\155\157\137\x73\141\155\154\x5f\x72\x65\x6c\x61\171\x5f\163\x74\141\x74\x65");
rmP:
goto XzL;
apC:
$VO = "\164\145\163\164\126\x61\x6c\151\144\x61\x74\x65";
XzL:
goto PNy;
qo1:
$VO = "\x74\x65\163\x74\116\145\x77\103\145\x72\164\151\146\x69\x63\x61\x74\145";
PNy:
if (empty($VO)) {
goto wdI;
}
$hT = parse_url($VO, PHP_URL_PATH);
wdI:
$hT = empty($hT) ? "\57" : $hT;
if (empty($VO)) {
goto H2l;
}
$AR = parse_url($VO, PHP_URL_QUERY);
H2l:
if (!empty($AR)) {
goto Jkp;
}
$VO = $hT;
goto Cw6;
Jkp:
$VO = $hT . "\x3f" . $AR;
Cw6:
$tF = $pi["\163\x73\x6f\x5f\x75\162\154"];
$uZ = $pi["\x72\x65\x71\x75\x65\x73\x74\137\x73\x69\x67\x6e\145\144"];
$F8 = $pi["\x73\163\157\137\142\x69\156\144\x69\156\x67\x5f\x74\x79\160\x65"];
$DD = get_option("\155\x6f\x5f\x73\141\x6d\154\x5f\146\157\x72\x63\145\137\141\165\x74\x68\145\x6e\x74\x69\143\x61\x74\151\x6f\156");
$RK = $he . "\x2f";
$Y1 = get_option("\x6d\x6f\x5f\163\141\155\x6c\x5f\x73\x70\137\x65\156\164\x69\x74\171\137\x69\x64");
$eD = $pi["\x6e\x61\155\145\151\144\x5f\146\157\x72\155\141\x74"];
if (!empty($eD)) {
goto XhR;
}
$eD = "\x31\56\x31\72\156\x61\x6d\x65\151\144\x2d\146\x6f\162\155\x61\164\72\165\x6e\x73\160\145\x63\151\x66\x69\145\144";
XhR:
if (!empty($Y1)) {
goto INe;
}
$Y1 = $he . "\57\167\x70\x2d\x63\x6f\156\164\x65\x6e\x74\x2f\160\x6c\x75\x67\x69\156\163\57\155\151\x6e\x69\x6f\x72\141\156\147\145\x2d\x73\x61\x6d\x6c\55\x32\x30\55\x73\x69\156\x67\154\x65\x2d\163\x69\x67\156\55\x6f\x6e\x2f";
INe:
$Y1 = isset($pi["\x73\x61\155\x6c\137\x73\160\137\x65\156\x74\x69\164\171\137\x69\x64"]) ? $pi["\163\141\155\154\137\x73\160\137\145\x6e\x74\151\164\x79\137\151\144"] : $Y1;
$Es = isset($_POST["\165\156\x61\x6d\145\x5f\x65\x6d\141\151\x6c"]) ? $_POST["\x75\x6e\x61\155\x65\137\145\155\x61\151\154"] : false;
if (!$Es) {
goto n39;
}
$x2 = email_exists($Es);
if (!($x2 == false)) {
goto W50;
}
$Es = false;
update_site_option("\155\x6f\137\x73\x61\x6d\x6c\x5f\163\x68\157\162\x74\143\x6f\144\x65\x5f\155\x65\x73\163\141\147\145", "\125\163\x65\x72\x20\x64\157\x65\x73\x20\156\x6f\x74\40\105\x78\x69\x74\163");
return;
W50:
n39:
$zz = Utilities::createAuthnRequest($RK, $Y1, $tF, $pi, $DD, $F8, $eD);
if (empty($F8) || $F8 == "\110\x74\164\160\122\145\x64\151\x72\x65\143\164") {
goto F1i;
}
if (!($uZ == "\165\x6e\143\150\145\x63\x6b\145\x64")) {
goto u57;
}
$F0 = base64_encode($zz);
Utilities::postSAMLRequest($tF, $F0, $VO, $Es);
exit;
u57:
if ($_REQUEST["\157\x70\x74\151\x6f\156"] == "\x74\145\163\x74\x69\x64\160\x63\x6f\x6e\x66\x69\147" && $_REQUEST["\x6e\x65\x77\143\145\162\164"] == true) {
goto UdA;
}
$F0 = Utilities::signXML($zz, $pi, "\x4e\141\155\145\x49\104\120\x6f\x6c\x69\x63\x79");
goto YjL;
UdA:
$F0 = Utilities::signXML($zz, $pi, "\116\x61\x6d\x65\x49\104\120\157\x6c\151\x63\x79", true);
YjL:
Utilities::postSAMLRequest($tF, $F0, $VO, $Es);
goto irP;
F1i:
$kY = $tF;
if (strpos($tF, "\x3f") !== false) {
goto D11;
}
$kY .= "\77";
goto BsX;
D11:
$kY .= "\x26";
BsX:
if (!($uZ == "\165\x6e\143\x68\x65\x63\x6b\x65\x64")) {
goto dC_;
}
$kY .= "\123\101\115\x4c\122\x65\161\x75\x65\163\164\x3d" . $zz . "\x26\x52\x65\x6c\141\171\123\x74\x61\164\145\x3d" . urlencode($VO);
if (!$Es) {
goto WZY;
}
$kY .= "\x26\105\155\141\151\x6c\x3d" . urlencode($Es);
WZY:
header("\114\x6f\143\x61\164\151\x6f\156\72\x20" . $kY);
exit;
dC_:
$zz = "\123\101\115\x4c\122\x65\161\165\x65\163\164\x3d" . $zz . "\x26\x52\x65\154\x61\171\123\x74\141\x74\x65\x3d" . urlencode($VO) . "\x26\123\x69\147\101\x6c\147\x3d" . urlencode(XMLSecurityKey::RSA_SHA256);
$IK = array("\164\171\160\145" => "\x70\x72\151\x76\141\x74\145");
$sv = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $IK);
if ($_REQUEST["\157\160\x74\x69\157\156"] == "\164\145\x73\164\151\144\x70\143\157\x6e\x66\x69\x67" && $_REQUEST["\156\x65\x77\x63\145\162\x74"] == true) {
goto GDT;
}
$yN = mo_saml_get_sp_private_key_for_idp($pi);
goto eAA;
GDT:
$yN = file_get_contents(plugin_dir_path(__FILE__) . "\x72\145\x73\157\165\x72\143\145\x73" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
eAA:
$sv->loadKey($yN, FALSE);
$V8 = new XMLSecurityDSig();
$E1 = $sv->signData($zz);
$E1 = base64_encode($E1);
$kY .= $zz . "\46\x53\x69\x67\x6e\x61\164\165\162\x65\75" . urlencode($E1);
if (!$Es) {
goto b9u;
}
$kY .= "\46\105\155\x61\x69\x6c\x3d" . urlencode($Es);
b9u:
header("\114\157\143\141\x74\151\157\156\x3a\40" . $kY);
exit;
irP:
THB:
wOO:
if (!(array_key_exists("\123\x41\x4d\x4c\122\x65\163\x70\x6f\156\x73\145", $_REQUEST) && !empty($_REQUEST["\123\101\115\114\x52\145\x73\x70\157\156\x73\145"]))) {
goto NR8;
}
$he = get_option("\x6d\x6f\x5f\x73\141\155\x6c\x5f\163\x70\137\x62\141\163\145\x5f\165\162\154");
if (!empty($he)) {
goto H36;
}
$he = home_url();
H36:
$Pj = $_REQUEST["\123\101\115\x4c\122\145\x73\160\157\x6e\163\x65"];
$Pj = base64_decode($Pj);
if (!(array_key_exists("\123\x41\115\x4c\122\145\163\160\x6f\156\163\145", $_GET) && !empty($_GET["\x53\x41\115\x4c\x52\145\x73\x70\x6f\156\163\x65"]))) {
goto ttv;
}
$Pj = gzinflate($Pj);
ttv:
$Pg = new DOMDocument();
$Pg->loadXML($Pj);
$Bh = $Pg->firstChild;
$KS = $Pg->documentElement;
$nY = new DOMXpath($Pg);
$nY->registerNamespace("\x73\141\x6d\154\x70", "\165\x72\156\x3a\x6f\x61\163\151\163\72\x6e\x61\x6d\145\163\x3a\164\x63\x3a\123\101\x4d\x4c\72\x32\x2e\x30\x3a\160\x72\157\164\157\x63\157\154");
$nY->registerNamespace("\x73\141\155\154", "\165\162\x6e\72\157\141\163\x69\163\72\156\141\155\145\163\x3a\x74\143\72\123\x41\115\114\x3a\62\x2e\x30\x3a\141\x73\x73\145\162\164\151\x6f\x6e");
if ($Bh->localName == "\114\x6f\x67\157\165\164\122\145\x73\160\x6f\156\x73\x65") {
goto J9N;
}
$rt = $nY->query("\x2f\163\x61\x6d\x6c\160\72\122\145\x73\x70\157\x6e\x73\x65\x2f\x73\141\x6d\x6c\x70\x3a\123\164\141\x74\x75\x73\x2f\x73\141\x6d\154\160\72\x53\164\x61\x74\x75\163\103\157\x64\145", $KS);
$B_ = isset($rt) ? $rt->item(0)->getAttribute("\x56\x61\154\x75\x65") : '';
$x1 = explode("\72", $B_);
if (!array_key_exists(7, $x1)) {
goto l68;
}
$rt = $x1[7];
l68:
$A4 = $nY->query("\x2f\x73\141\x6d\154\160\x3a\x52\x65\x73\x70\x6f\x6e\x73\145\x2f\x73\x61\x6d\154\x70\72\123\164\141\x74\x75\163\x2f\x73\x61\155\x6c\160\x3a\123\164\141\x74\x75\x73\115\145\x73\x73\141\147\145", $KS);
$Q5 = isset($A4) ? $A4->item(0) : '';
if (empty($Q5)) {
goto sKq;
}
$Q5 = $Q5->nodeValue;
sKq:
$an = get_option("\163\x61\x6d\154\137\151\144\145\x6e\x74\151\164\x79\x5f\160\162\157\166\x69\x64\x65\x72\163");
$an = maybe_unserialize($an);
if (array_key_exists("\x52\x65\154\x61\x79\x53\164\x61\164\x65", $_POST) && !empty($_POST["\122\x65\x6c\141\171\123\x74\x61\164\145"]) && $_POST["\x52\145\x6c\141\x79\x53\164\141\164\x65"] != "\x2f") {
goto L7M;
}
$il = saml_get_current_page_url();
goto FQF;
L7M:
$il = $_POST["\x52\x65\154\141\171\123\x74\141\x74\145"];
FQF:
$JF = array("\163\x61\155\154\x5f\162\145\x73\160\157\x6e\x73\145" => base64_encode($Pj));
$Pj = new SAML2_Response($Bh);
$UG = $Pj->getIssuer();
$LD = NULL;
foreach ($an as $sv => $y2) {
if (!($y2["\x69\x64\160\137\145\x6e\x74\x69\x74\x79\137\x69\x64"] == $UG)) {
goto EPR;
}
$LD = $an[$sv];
goto DXC;
EPR:
dcT:
}
DXC:
if (!($rt != "\x53\165\x63\x63\145\x73\163")) {
goto vaJ;
}
show_status_error($rt, $il, $Q5, $LD);
vaJ:
if (!($LD == null)) {
goto JVP;
}
$LD = apply_filters("\155\x6f\x5f\163\x61\x6d\x6c\137\146\x69\x6c\x74\x65\x72\137\x69\144\145\x6e\164\151\164\171\x5f\x70\x72\x6f\x76\x69\x64\x65\162\163", $an, $UG);
JVP:
$yD = '';
if ($il == "\x74\145\x73\x74\x4e\x65\167\x43\145\x72\x74\151\146\x69\143\141\x74\x65") {
goto hxc;
}
$Q6 = mo_saml_get_sp_private_key_for_idp($LD);
goto daN;
hxc:
$Q6 = file_get_contents(plugin_dir_path(__FILE__) . "\162\x65\x73\157\x75\x72\143\x65\163" . DIRECTORY_SEPARATOR . mo_options_enum_default_sp_certificate::SP_PRIVATE_KEY_FILE_NAME);
daN:
$Pj->parseAssertions($Bh, $Q6);
$pU = $Pj->getSignatureData();
$U9 = current($Pj->getAssertions())->getSignatureData();
$cC = current($Pj->getAssertions())->getIssuer();
if (is_null($LD)) {
goto Qdz;
}
$yD = $LD["\x69\144\x70\137\x6e\141\x6d\x65"];
$an[$yD] = array_merge($an[$yD], $JF);
$an = array_filter($an, "\146\151\x6c\x74\x65\x72\x5f\145\155\x70\164\x79\137\x76\141\x6c\165\145\x73");
update_option("\163\141\x6d\154\137\x69\144\x65\156\164\x69\x74\171\x5f\x70\x72\157\x76\x69\x64\x65\x72\163", $an);
Qdz:
if (!(empty($U9) && empty($pU))) {
goto gE3;
}
if ($il == "\x74\145\163\x74\x56\141\x6c\x69\x64\x61\x74\x65" or $il == "\164\145\163\x74\x4e\x65\167\x43\145\x72\164\151\146\x69\x63\x61\164\x65") {
goto GDU;
}
wp_die("\x57\145\x20\143\157\165\x6c\144\40\156\157\x74\x20\x73\x69\147\156\40\x79\x6f\x75\40\151\156\x2e\x20\120\x6c\145\141\x73\x65\40\143\x6f\156\164\141\143\164\40\x61\x64\x6d\151\156\151\163\164\x72\141\x74\x6f\162", "\x45\x72\x72\157\x72\x3a\40\x49\x6e\x76\x61\154\x69\144\x20\123\101\115\114\40\x52\145\x73\x70\157\156\x73\145");
goto ilc;
GDU:
$no = mo_options_error_constants::Error_no_certificate;
$KD = mo_options_error_constants::Cause_no_certificate;
echo "\x3c\x64\151\166\40\x73\164\x79\x6c\145\75\42\x66\x6f\156\x74\x2d\x66\x61\x6d\x69\x6c\171\x3a\x43\x61\x6c\x69\142\x72\x69\x3b\160\141\x64\x64\x69\156\x67\x3a\x30\40\x33\45\x3b\x22\x3e\15\12\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\40\x20\40\40\40\x20\x20\x20\40\74\x64\151\166\x20\163\164\x79\x6c\145\x3d\42\143\x6f\x6c\157\162\x3a\40\x23\x61\x39\64\x34\x34\x32\73\x62\141\x63\153\147\x72\157\x75\x6e\144\x2d\x63\157\154\157\162\x3a\40\43\x66\x32\144\x65\144\145\73\160\x61\144\x64\x69\156\147\x3a\40\x31\65\x70\x78\x3b\x6d\141\x72\x67\151\156\x2d\x62\x6f\164\x74\x6f\155\x3a\40\62\x30\160\170\73\164\145\170\164\x2d\x61\x6c\151\147\156\x3a\143\145\x6e\164\145\162\73\x62\157\x72\144\x65\x72\72\x31\x70\170\x20\x73\x6f\x6c\151\144\40\x23\105\x36\x42\x33\102\x32\73\146\x6f\x6e\x74\x2d\163\x69\172\x65\72\x31\70\x70\x74\x3b\x22\x3e\40\x45\122\122\x4f\122\74\57\144\x69\x76\x3e\xd\xa\x20\x20\x20\x20\x20\40\x20\x20\40\x20\x20\40\x20\40\40\40\40\40\40\40\x3c\144\151\x76\x20\163\x74\x79\154\145\x3d\42\x63\157\154\x6f\162\72\40\43\141\71\64\x34\64\62\x3b\x66\x6f\156\164\55\x73\151\172\145\x3a\x31\x34\x70\164\x3b\x20\x6d\141\162\147\151\x6e\55\142\157\164\164\157\x6d\72\x32\x30\160\170\73\x22\76\x3c\160\76\x3c\163\x74\x72\x6f\x6e\x67\76\105\162\x72\157\162\x20\40\72" . esc_html($no) . "\40\74\x2f\163\164\162\x6f\156\147\x3e\x3c\57\x70\76\15\12\x20\40\40\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\40\40\40\40\40\x20\x20\15\12\x20\40\40\x20\40\x20\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\x20\40\40\74\x70\x3e\74\x73\164\x72\157\x6e\x67\76\x50\x6f\163\163\x69\142\154\145\40\x43\141\165\163\x65\72\x20" . esc_html($KD) . "\74\57\163\164\x72\157\156\x67\76\x3c\x2f\x70\76\15\12\40\x20\x20\x20\x20\40\x20\40\40\40\x20\40\x20\40\40\40\x20\x20\40\x20\xd\xa\40\40\x20\40\40\40\40\x20\40\40\x20\x20\40\x20\40\x20\x20\40\40\40\x3c\x2f\144\x69\x76\x3e\x3c\x2f\144\151\166\x3e";
mo_saml_download_logs($no, $KD, $yD);
exit;
ilc:
gE3:
if (!($LD === null && $il == "\x74\145\163\164\x56\x61\x6c\x69\x64\141\164\145")) {
goto rq7;
}
$no = mo_options_error_constants::Error_issuer_not_verfied;
$KD = mo_options_error_constants::Cause_issuer_not_verfied;
echo "\x3c\144\151\166\40\163\x74\x79\x6c\145\x3d\42\146\157\x6e\x74\x2d\x66\x61\155\x69\x6c\171\x3a\x43\x61\x6c\x69\x62\162\151\73\x70\x61\144\144\x69\x6e\x67\72\60\40\x33\45\73\42\76";
echo "\x3c\x64\151\x76\x20\163\x74\171\154\145\75\42\x63\x6f\x6c\x6f\x72\x3a\40\x23\141\x39\x34\64\x34\62\x3b\142\x61\x63\x6b\x67\x72\157\x75\156\x64\x2d\143\157\x6c\157\162\72\40\x23\146\62\x64\145\144\145\x3b\160\141\x64\x64\x69\156\x67\x3a\40\x31\65\x70\x78\73\155\141\x72\x67\151\156\x2d\x62\157\x74\164\157\x6d\x3a\40\x32\x30\160\x78\x3b\x74\x65\x78\x74\55\141\x6c\x69\x67\156\72\143\145\156\x74\145\x72\x3b\142\157\x72\144\x65\162\x3a\x31\x70\170\40\163\157\154\151\144\40\43\x45\x36\102\x33\102\62\73\x66\157\x6e\x74\x2d\163\151\172\145\72\61\x38\160\164\73\x22\76\40\105\122\x52\117\122\74\x2f\144\x69\x76\76\15\12\11\x9\x9\x3c\x64\151\166\40\163\x74\171\x6c\x65\75\x22\143\x6f\x6c\x6f\162\x3a\40\x23\141\x39\x34\x34\64\62\73\x66\x6f\156\164\55\x73\x69\172\x65\x3a\61\x34\160\164\x3b\40\155\141\x72\147\x69\x6e\55\x62\157\x74\164\157\x6d\72\x32\60\x70\x78\73\x22\x3e\74\x70\76\x3c\x73\164\162\157\x6e\147\x3e\x45\162\162\x6f\162\72\40\74\57\x73\x74\x72\157\x6e\147\76\125\156\x61\142\154\x65\40\x74\157\40\x66\151\x6e\x64\x20\141\40\111\104\120\x20\x45\156\164\x69\164\x79\40\111\x44\x20\155\141\164\143\x68\151\x6e\x67\40\164\150\145\40\x63\x6f\156\146\151\147\165\x72\145\x64\x20\146\151\x6e\x67\145\x72\160\162\151\x6e\x74\56\74\57\x70\x3e\xd\12\11\x9\x9\x3c\160\76\x50\154\x65\141\x73\x65\x20\143\157\x6e\x74\x61\x63\164\x20\x79\157\x75\162\x20\141\144\155\x69\156\151\163\x74\162\141\164\x6f\162\40\x61\156\x64\x20\x72\145\x70\157\162\164\40\164\150\x65\40\x66\157\x6c\x6c\157\167\151\156\x67\x20\x65\x72\x72\157\162\x3a\74\x2f\160\76\xd\xa\11\11\11\x3c\x70\x3e\74\163\164\x72\157\x6e\147\76\x50\157\163\x73\151\x62\x6c\145\40\103\141\165\x73\x65\x3a\40\x3c\57\x73\x74\162\x6f\x6e\147\x3e\47\111\104\120\40\x45\x6e\164\x69\x74\x79\40\111\104\x27\40\x66\151\x65\154\144\40\151\x6e\x20\x70\x6c\x75\147\151\x6e\40\144\157\145\163\40\x6e\x6f\x74\x20\155\141\164\x63\150\x20\164\150\145\40\157\x6e\145\x20\146\157\165\156\144\x20\151\x6e\x20\123\x41\x4d\x4c\40\x52\145\163\x70\x6f\156\x73\x65\x2e\x3c\57\x70\76\15\12\x9\x9\11\x3c\160\x3e\x3c\x73\x74\162\x6f\x6e\x67\76\105\156\x74\x69\x74\x79\x20\x49\104\40\x66\x6f\165\156\144\x20\x69\156\40\x53\x41\x4d\114\40\x52\145\x73\160\x6f\x6e\x73\145\x3a\x20\74\x2f\163\164\x72\x6f\x6e\147\x3e\x3c\146\x6f\x6e\164\x20\x66\141\x63\145\x3d\x22\x43\157\165\162\x69\145\162\x20\x4e\x65\x77\42\73\x66\157\x6e\x74\x2d\163\x69\x7a\x65\72\61\60\160\164\x3e\74\142\162\76\74\142\162\x3e" . esc_html($cC) . "\x3c\57\160\x3e\x3c\x2f\x66\x6f\156\164\x3e\xd\12\40\40\40\40\x20\40\40\x20\x20\40\x20\40\x3c\160\76\x3c\x73\164\162\x6f\x6e\147\76\123\157\154\x75\x74\151\157\156\x3a\x3c\57\x73\164\x72\x6f\156\147\x3e\74\57\160\x3e\xd\12\x20\x20\40\x20\x20\40\x20\x20\40\x20\40\x20\74\x6f\154\76\xd\12\x20\x20\40\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\40\74\154\x69\76\103\x6f\160\x79\40\164\x68\145\40\x45\x6e\x74\151\164\x79\x20\x49\104\x20\157\146\x20\123\101\115\x4c\x20\122\145\x73\160\157\x6e\163\x65\x20\146\162\x6f\x6d\40\141\x62\x6f\166\x65\x20\x61\156\x64\40\160\141\163\164\145\x20\x69\164\x20\x69\x6e\x20\105\x6e\164\x69\164\x79\x20\111\104\x20\157\162\x20\x49\163\163\165\145\162\40\146\x69\x65\x6c\x64\x20\165\156\x64\x65\162\40\123\145\x72\x76\x69\x63\145\x20\x50\x72\157\166\x69\144\145\x72\40\x53\145\164\165\160\x20\x74\x61\x62\56\x3c\x2f\154\151\76\15\xa\40\x20\x20\40\x20\x20\x20\x20\40\40\x20\x20\74\x2f\x6f\x6c\76\x20\40\x20\40\x20\x20\40\40\xd\12\x20\x20\40\40\x20\40\40\40\x20\40\x20\40\x3c\57\x64\x69\x76\76\xd\12\11\x9\11\x9\11\74\144\151\166\x20\163\x74\x79\x6c\x65\75\x22\x6d\141\x72\x67\x69\156\72\x33\45\x3b\x64\151\163\x70\x6c\x61\x79\x3a\x62\154\157\143\x6b\x3b\164\x65\170\x74\x2d\141\154\151\x67\156\x3a\x63\x65\156\164\x65\x72\73\x22\x3e\15\12\x9\x9\x9\11\x9\x3c\144\151\166\x20\x73\x74\x79\154\145\x3d\42\x6d\141\x72\147\151\156\72\x33\45\x3b\x64\x69\163\160\154\141\x79\72\x62\x6c\157\143\x6b\73\164\145\x78\x74\x2d\x61\154\151\x67\156\x3a\x63\x65\x6e\x74\145\162\73\x22\76\x3c\x69\156\x70\165\164\x20\x73\164\171\154\145\75\42\160\x61\144\144\x69\156\147\x3a\61\x25\x3b\x77\151\144\x74\x68\72\61\x30\60\160\x78\x3b\142\141\x63\x6b\147\x72\x6f\165\x6e\x64\72\x20\x23\60\60\x39\x31\103\x44\40\x6e\x6f\156\145\40\162\x65\x70\145\x61\164\x20\163\143\x72\157\154\154\x20\x30\x25\40\x30\x25\x3b\x63\165\162\163\x6f\x72\x3a\x20\160\157\x69\x6e\164\145\x72\x3b\146\157\x6e\x74\x2d\x73\151\x7a\145\72\x31\x35\160\x78\73\142\x6f\x72\144\x65\x72\55\167\x69\x64\x74\x68\72\40\61\160\x78\x3b\x62\x6f\162\144\145\162\x2d\163\x74\171\x6c\145\72\40\x73\x6f\x6c\151\144\x3b\x62\x6f\162\144\x65\x72\55\162\141\144\x69\165\163\72\40\x33\x70\x78\x3b\167\x68\x69\164\145\x2d\163\x70\x61\x63\x65\72\x20\x6e\x6f\167\x72\141\160\73\142\x6f\x78\x2d\x73\x69\172\151\156\147\72\40\x62\x6f\162\x64\145\162\x2d\x62\x6f\170\x3b\142\157\162\144\x65\162\55\x63\x6f\154\x6f\162\x3a\x20\43\x30\60\x37\63\x41\101\x3b\x62\157\x78\55\x73\150\x61\144\157\167\x3a\x20\x30\160\170\x20\61\160\170\40\x30\160\x78\40\162\x67\x62\x61\x28\61\x32\x30\54\40\x32\x30\x30\x2c\40\62\x33\60\x2c\40\x30\56\x36\51\40\x69\x6e\163\x65\164\73\x63\x6f\154\x6f\162\x3a\40\x23\x46\106\x46\73\42\x74\x79\160\145\x3d\x22\x62\165\164\x74\x6f\156\42\40\x76\141\154\x75\145\75\42\x44\157\x6e\x65\42\x20\x6f\x6e\103\x6c\151\x63\x6b\x3d\x22\x73\145\x6c\146\x2e\x63\154\157\x73\145\x28\x29\73\42\76\74\57\144\151\x76\x3e";
mo_saml_download_logs($no, $KD);
exit;
rq7:
$e7 = maybe_unserialize($LD["\170\x35\60\71\x5f\143\x65\x72\x74\151\x66\151\x63\x61\x74\x65"]);
$RK = $he . "\57";
if (is_array($e7)) {
goto qOU;
}
$aH = XMLSecurityKey::getRawThumbprint($e7);
$aH = mo_saml_convert_to_windows_iconv($aH, $LD);
$aH = preg_replace("\x2f\x5c\x73\x2b\x2f", '', $aH);
if (empty($pU)) {
goto p2I;
}
$Tc = Utilities::processResponse($RK, $aH, $pU, $Pj, $e7, $il);
p2I:
if (empty($U9)) {
goto C89;
}
$Tc = Utilities::processResponse($RK, $aH, $U9, $Pj, $e7, $il);
C89:
goto kx5;
qOU:
foreach ($e7 as $WW => $KH) {
$aH = XMLSecurityKey::getRawThumbprint(Utilities::sanitize_certificate($KH));
$aH = mo_saml_convert_to_windows_iconv($aH, $LD);
$aH = preg_replace("\57\134\163\x2b\57", '', $aH);
if (empty($pU)) {
goto s0b;
}
$Tc = Utilities::processResponse($RK, $aH, $pU, $Pj, $KH, $il);
s0b:
if (empty($U9)) {
goto nvG;
}
$Tc = Utilities::processResponse($RK, $aH, $U9, $Pj, $KH, $il);
nvG:
if (!$Tc) {
goto bih;
}
goto PHs;
bih:
rra:
}
PHs:
kx5:
if (!(empty($U9) && empty($pU))) {
goto PDD;
}
echo "\x4e\x6f\x20\x73\x69\x67\x6e\x61\164\x75\162\145\x20\146\x6f\165\x6e\144\40\151\x6e\x20\x53\101\115\x4c\x20\x52\145\163\160\157\156\x73\x65\x20\x6f\162\x20\x41\163\163\x65\x72\164\151\x6f\x6e\56\40\120\x6c\x65\x61\x73\x65\x20\163\x69\147\156\x20\141\x74\40\154\145\x61\x73\164\x20\x6f\156\145\x20\x6f\x66\40\x74\x68\145\155\x2e";
exit;
PDD:
if ($pU) {
goto mOQ;
}
if ($U9) {
goto wIC;
}
goto G_m;
mOQ:
if (!(count($pU["\x43\x65\162\164\x69\146\x69\x63\x61\164\145\x73"]) > 0)) {
goto K1A;
}
$QW = $pU["\103\x65\162\x74\x69\x66\151\x63\x61\x74\x65\x73"][0];
K1A:
goto G_m;
wIC:
if (!(count($U9["\x43\x65\162\164\x69\146\x69\143\x61\x74\145\163"]) > 0)) {
goto wq9;
}
$QW = $U9["\103\145\162\x74\151\146\x69\143\141\164\145\163"][0];
wq9:
G_m:
if ($Tc) {
goto PTK;
}
if ($il == "\164\x65\x73\164\126\141\154\151\144\x61\x74\145" or $il == "\164\145\163\164\116\145\167\103\145\x72\x74\x69\146\151\x63\x61\x74\145") {
goto MR3;
}
wp_die("\x57\145\40\x63\157\165\154\x64\40\x6e\x6f\x74\x20\x73\x69\x67\156\x20\171\x6f\165\40\x69\x6e\56\x20\120\154\145\x61\x73\145\x20\143\157\x6e\x74\x61\x63\x74\x20\x61\x64\x6d\x69\156\x69\x73\164\x72\x61\164\x6f\x72", "\x45\x72\x72\x6f\162\x3a\x20\x49\x6e\x76\141\x6c\151\x64\x20\123\x41\115\114\x20\122\x65\163\x70\157\156\163\145");
goto yqJ;
MR3:
$no = mo_options_error_constants::Error_wrong_certificate;
$KD = mo_options_error_constants::Cause_wrong_certificate;
$ZK = "\x2d\x2d\x2d\55\x2d\x42\x45\x47\x49\116\x20\103\105\122\124\111\106\111\x43\101\124\x45\x2d\x2d\x2d\x2d\55\x3c\142\x72\76" . chunk_split($QW, 64) . "\74\x62\x72\76\x2d\55\x2d\x2d\x2d\x45\116\x44\40\103\x45\x52\x54\x49\106\x49\103\x41\x54\105\x2d\x2d\55\x2d\x2d";
echo "\x3c\144\151\x76\40\163\x74\171\x6c\x65\75\x22\146\157\156\x74\x2d\146\141\x6d\x69\154\x79\x3a\103\x61\x6c\151\x62\x72\151\73\x70\141\x64\x64\151\x6e\147\72\x30\40\x33\45\73\x22\76";
echo "\x3c\x64\x69\166\x20\x73\164\171\x6c\145\75\x22\x63\x6f\154\x6f\x72\72\x20\43\x61\x39\64\x34\x34\62\x3b\142\141\143\x6b\147\x72\157\165\x6e\144\x2d\143\157\x6c\x6f\x72\x3a\x20\43\146\x32\144\x65\144\145\x3b\x70\141\x64\144\151\x6e\147\72\40\x31\65\x70\170\x3b\x6d\x61\x72\x67\151\x6e\55\x62\x6f\164\164\157\155\x3a\40\x32\60\x70\x78\x3b\164\145\x78\x74\55\141\154\151\x67\156\x3a\143\x65\156\164\x65\162\x3b\142\157\162\x64\x65\162\x3a\61\x70\x78\x20\163\x6f\x6c\151\x64\40\x23\105\66\102\x33\102\62\73\x66\x6f\156\x74\55\x73\x69\x7a\145\72\61\70\160\164\x3b\42\76\x20\x45\x52\x52\x4f\122\x3c\57\x64\x69\x76\x3e\15\12\x9\11\x9\x3c\x64\x69\166\x20\163\164\x79\154\145\x3d\42\143\157\154\x6f\x72\72\40\x23\x61\71\64\64\x34\x32\73\146\x6f\x6e\164\x2d\x73\151\x7a\145\x3a\61\64\x70\164\73\x20\x6d\x61\162\x67\x69\156\55\x62\157\x74\x74\x6f\x6d\x3a\x32\60\160\170\73\42\x3e\x3c\x70\x3e\74\x73\x74\x72\157\x6e\147\x3e\x45\x72\162\x6f\x72\72\40\x3c\x2f\x73\x74\162\157\x6e\147\x3e\125\156\141\142\x6c\145\40\164\x6f\40\146\151\156\144\40\141\40\x63\145\x72\164\151\x66\151\143\x61\164\145\40\x6d\141\x74\x63\x68\151\x6e\147\40\164\150\x65\40\x63\157\x6e\x66\x69\147\x75\x72\x65\144\x20\146\151\x6e\147\145\162\160\162\x69\156\164\x2e\74\57\160\x3e\xd\xa\x9\11\11\74\x70\76\x50\154\x65\141\163\x65\x20\143\x6f\x6e\164\141\x63\x74\40\171\157\165\x72\x20\x61\144\x6d\151\156\151\x73\164\x72\141\x74\157\x72\x20\x61\x6e\144\x20\162\x65\160\x6f\162\x74\x20\164\150\x65\x20\x66\x6f\x6c\154\x6f\167\x69\x6e\x67\40\x65\x72\162\157\162\72\x3c\x2f\160\76\15\xa\x9\x9\x9\x3c\x70\76\74\163\164\x72\x6f\x6e\147\x3e\120\157\163\x73\151\142\x6c\145\40\103\x61\165\163\x65\x3a\40\74\x2f\x73\x74\162\x6f\x6e\x67\76\47\130\56\65\x30\x39\40\x43\x65\x72\164\x69\146\x69\143\141\x74\145\47\40\146\151\x65\154\x64\40\151\x6e\40\160\x6c\x75\147\151\156\40\x64\157\x65\163\40\x6e\x6f\x74\x20\x6d\x61\x74\x63\x68\40\164\150\x65\x20\143\x65\162\164\151\x66\x69\143\x61\x74\145\x20\146\x6f\165\156\144\x20\x69\156\x20\123\x41\115\x4c\40\122\x65\x73\x70\x6f\156\163\145\x2e\x3c\57\x70\76\15\xa\x9\x9\11\x3c\x70\76\x3c\x73\x74\x72\x6f\x6e\x67\76\x43\145\162\164\x69\146\x69\x63\141\164\x65\x20\x66\x6f\x75\156\x64\x20\x69\x6e\x20\123\x41\115\114\x20\122\145\163\x70\x6f\156\163\x65\72\x20\74\57\163\164\162\157\x6e\x67\x3e\x3c\x66\x6f\x6e\164\x20\146\x61\x63\x65\75\x22\x43\x6f\x75\162\151\145\x72\x20\116\145\x77\x22\x3b\146\157\x6e\164\x2d\x73\151\172\145\72\x31\60\x70\x74\x3e\x3c\142\162\76\74\x62\x72\x3e" . wp_kses($ZK, array("\142\162" => array(), "\165" => array())) . "\74\x2f\160\x3e\74\x2f\146\x6f\x6e\x74\76\xd\xa\40\x20\40\x20\x20\x20\40\40\40\40\x20\40\74\x70\76\74\x73\164\x72\x6f\156\x67\76\123\157\x6c\x75\x74\151\x6f\x6e\72\40\x3c\57\x73\x74\162\x6f\156\x67\76\74\x2f\160\x3e\15\xa\x9\x9\x9\40\x3c\x6f\x6c\x3e\15\12\40\40\40\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\40\74\154\151\x3e\x43\157\x70\171\x20\x70\x61\x73\164\x65\40\164\150\145\x20\x63\145\x72\164\x69\x66\151\x63\141\x74\145\x20\160\x72\x6f\x76\x69\x64\x65\x64\x20\141\142\x6f\166\x65\40\151\156\x20\x58\x35\x30\71\40\x43\x65\162\164\151\x66\x69\143\x61\164\x65\x20\x75\x6e\144\x65\162\x20\123\145\x72\166\x69\x63\x65\40\120\162\x6f\166\x69\144\x65\162\40\123\x65\164\x75\160\x20\x74\x61\x62\x2e\74\57\x6c\151\76\15\12\40\40\x20\40\40\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\x3c\154\151\x3e\x49\x66\x20\x69\163\x73\165\145\x20\160\x65\162\x73\x69\x73\164\163\40\144\x69\x73\x61\x62\154\x65\40\x3c\142\76\103\x68\141\162\x61\143\x74\x65\162\x20\x65\156\x63\157\144\x69\x6e\147\74\x2f\x62\76\40\165\156\144\x65\162\x20\x53\145\x72\x76\x69\143\x65\x20\120\162\x6f\166\x64\x65\162\40\x53\145\x74\165\x70\x20\164\141\142\56\74\57\154\151\76\xd\12\40\x20\40\40\x20\x20\40\40\40\x20\40\x20\40\x3c\57\x6f\154\x3e\40\40\x20\x20\40\40\x20\x20\40\xd\12\x20\40\40\x20\x20\40\x20\40\40\40\x20\40\74\57\144\151\x76\x3e\15\xa\x9\x9\11\x9\11\x3c\x64\x69\166\x20\x73\164\x79\154\145\x3d\x22\155\x61\x72\x67\151\156\x3a\x33\x25\x3b\144\151\163\x70\154\141\x79\72\x62\x6c\x6f\x63\x6b\x3b\x74\x65\x78\164\x2d\x61\154\151\x67\156\x3a\143\x65\x6e\x74\x65\x72\x3b\x22\76\15\xa\x9\x9\x9\11\11\x3c\144\151\x76\x20\163\164\171\x6c\145\75\x22\x6d\141\x72\x67\151\156\72\x33\x25\x3b\144\x69\163\160\x6c\141\171\x3a\x62\x6c\157\143\153\x3b\x74\145\x78\164\x2d\141\x6c\151\x67\x6e\x3a\143\145\x6e\164\145\x72\73\42\76\x3c\151\x6e\160\165\x74\x20\163\x74\x79\154\x65\x3d\42\x70\141\x64\x64\x69\x6e\x67\x3a\61\45\73\x77\151\144\x74\150\x3a\61\x30\x30\x70\x78\x3b\142\141\143\x6b\147\x72\157\165\156\x64\x3a\40\43\x30\60\71\61\x43\x44\x20\156\157\156\x65\40\x72\145\x70\x65\141\164\40\x73\x63\x72\157\x6c\x6c\x20\60\x25\40\60\x25\x3b\143\x75\162\163\157\162\x3a\x20\160\157\151\x6e\164\x65\162\x3b\x66\x6f\x6e\164\55\163\x69\172\x65\72\61\x35\x70\x78\73\142\x6f\162\x64\145\x72\x2d\167\151\144\164\150\x3a\x20\61\160\x78\x3b\142\x6f\162\x64\x65\x72\x2d\x73\x74\x79\154\145\72\x20\x73\157\x6c\x69\144\x3b\142\157\162\x64\x65\162\55\162\141\x64\151\x75\163\72\x20\63\x70\170\x3b\x77\150\x69\x74\x65\55\x73\160\x61\x63\145\x3a\40\x6e\157\x77\162\141\x70\73\142\x6f\x78\x2d\163\151\x7a\x69\x6e\147\72\x20\x62\157\162\x64\145\x72\55\x62\157\x78\x3b\142\157\162\x64\x65\162\55\143\x6f\154\x6f\162\72\40\43\x30\x30\x37\63\101\x41\73\x62\x6f\x78\55\x73\x68\x61\144\157\167\72\x20\60\160\x78\x20\61\160\170\x20\x30\x70\170\40\x72\x67\142\x61\50\x31\x32\x30\54\40\x32\60\60\x2c\40\x32\63\60\x2c\40\x30\56\x36\x29\x20\151\x6e\x73\145\164\x3b\143\x6f\x6c\x6f\162\x3a\x20\43\106\x46\x46\x3b\x22\x74\171\160\145\75\x22\x62\x75\x74\164\x6f\x6e\42\40\x76\141\x6c\x75\145\x3d\42\104\157\156\145\x22\40\157\x6e\x43\154\151\x63\153\x3d\42\163\145\x6c\x66\x2e\x63\154\157\x73\145\x28\51\x3b\x22\x3e\x3c\x2f\144\151\166\x3e";
mo_saml_download_logs($no, $KD, $yD);
exit;
yqJ:
PTK:
$Y1 = get_option("\155\157\137\163\x61\x6d\x6c\x5f\163\x70\x5f\145\x6e\164\151\x74\x79\137\x69\144");
if (!empty($Y1)) {
goto gJR;
}
$Y1 = $he . "\x2f\x77\x70\55\x63\x6f\156\164\145\x6e\164\x2f\x70\x6c\165\147\x69\156\163\57\x6d\151\156\151\157\162\141\156\x67\145\55\163\141\x6d\154\55\x32\60\x2d\x73\151\156\147\154\145\55\x73\x69\147\x6e\x2d\x6f\x6e\x2f";
gJR:
$Y1 = isset($LD["\x73\x61\x6d\x6c\x5f\163\160\x5f\145\x6e\x74\151\164\171\137\151\x64"]) ? $LD["\163\141\155\154\137\x73\160\x5f\145\x6e\x74\x69\x74\171\137\151\x64"] : $Y1;
Utilities::validateIssuerAndAudience($Pj, $Y1, $cC, $il, $yD);
$nF = current(current($Pj->getAssertions())->getNameId());
$w_ = current($Pj->getAssertions())->getAttributes();
$w_["\x4e\141\155\145\x49\x44"] = array("\60" => $nF);
$G6 = current($Pj->getAssertions())->getSessionIndex();
mo_saml_checkMapping($LD, $w_, $il, $G6);
goto mMF;
J9N:
if (!isset($_REQUEST["\x52\145\154\x61\x79\x53\164\141\164\x65"])) {
goto MdQ;
}
$p3 = $_REQUEST["\x52\x65\154\x61\x79\x53\x74\x61\x74\145"];
MdQ:
if (!is_user_logged_in()) {
goto LNA;
}
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user(0);
LNA:
if (!empty($p3)) {
goto ZXn;
}
$p3 = home_url();
ZXn:
header("\x4c\157\x63\141\164\x69\157\156\x3a\40" . $p3);
exit;
mMF:
NR8:
if (!(array_key_exists("\x53\x41\115\x4c\122\145\161\x75\x65\163\x74", $_REQUEST) && !empty($_REQUEST["\x53\x41\115\114\x52\145\161\x75\x65\x73\x74"]))) {
goto eI1;
}
$zz = $_REQUEST["\123\x41\x4d\x4c\122\145\161\165\145\x73\164"];
$il = "\57";
if (!array_key_exists("\x52\145\154\x61\171\123\x74\141\x74\145", $_REQUEST)) {
goto jm4;
}
$il = $_REQUEST["\x52\x65\x6c\141\x79\123\x74\141\164\x65"];
jm4:
$zz = base64_decode($zz);
if (!(array_key_exists("\123\x41\x4d\114\x52\145\161\x75\145\x73\164", $_GET) && !empty($_GET["\123\101\x4d\114\122\x65\x71\x75\x65\x73\164"]))) {
goto pdf;
}
$zz = gzinflate($zz);
pdf:
$Pg = new DOMDocument();
$Pg->loadXML($zz);
$Zl = $Pg->firstChild;
if (!($Zl->localName == "\114\x6f\x67\x6f\165\164\x52\x65\161\x75\145\163\x74")) {
goto xpc;
}
$S5 = new SAML2_LogoutRequest($Zl);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto VTQ;
}
session_start();
VTQ:
$_SESSION["\155\x6f\137\163\141\155\x6c\137\x6c\157\147\x6f\x75\164\x5f\x72\145\x71\165\145\x73\x74"] = $zz;
$_SESSION["\x6d\157\x5f\163\x61\155\x6c\x5f\154\157\147\157\165\164\137\162\x65\x6c\141\x79\137\x73\x74\141\164\x65"] = $il;
wp_logout();
xpc:
eI1:
}
function getIdpNameFromEntityId($an, $RJ)
{
if (!(!empty($an) and is_array($an))) {
goto yPu;
}
foreach ($an as $pi) {
if (!($pi["\151\144\160\x5f\145\x6e\x74\151\164\171\x5f\151\x64"] == $RJ)) {
goto A1m;
}
return $pi["\x69\144\160\137\156\x61\x6d\x65"];
A1m:
OZd:
}
Nj9:
yPu:
return false;
}
function mo_saml_checkMapping($LD, $w_, $il, $G6)
{
try {
$AX = get_option("\x73\x61\155\154\137\x69\x64\160\x5f\x61\164\164\x72\151\142\165\x74\x65\x5f\x6d\141\160\x70\151\x6e\147");
$AX = maybe_unserialize($AX);
$ou = get_option("\x73\x61\155\x6c\137\x69\144\x70\137\x72\x6f\x6c\145\x5f\155\x61\160\160\x69\x6e\147");
$ou = maybe_unserialize($ou);
$Wl = "\x4e\x61\x6d\145\111\x44";
$PI = "\116\x61\155\x65\111\x44";
$pf = '';
$HY = check_if_default_mapping_required(true, $LD["\151\144\160\x5f\156\141\155\145"]);
if ($HY) {
goto maN;
}
$yD = $LD["\x69\144\160\x5f\x6e\141\x6d\x65"];
goto qfd;
maN:
$yD = "\104\x45\106\x41\x55\x4c\124";
qfd:
if (!(!empty($AX) && array_key_exists($yD, $AX))) {
goto ctY;
}
if (empty($AX[$yD])) {
goto CiA;
}
$Wl = $AX[$yD]["\x65\155\141\151\154"];
$PI = $AX[$yD]["\x75\x73\x65\x72\156\x61\x6d\145"];
$m3 = $AX[$yD]["\x66\151\162\x73\x74\137\156\x61\155\145"];
$cy = $AX[$yD]["\154\x61\163\x74\137\156\x61\155\x65"];
$Gf = $AX[$yD]["\x67\162\x6f\165\160\137\156\x61\x6d\x65"];
$pf = $AX[$yD]["\x64\151\x73\x70\x6c\x61\x79\x5f\x6e\141\x6d\145"];
if (!array_key_exists("\x73\x61\x6d\154\x5f\141\x6d\137\141\x63\143\x6f\x75\x6e\164\137\155\141\x74\143\150\x65\x72", $AX[$yD])) {
goto kCr;
}
$Y_ = $AX[$yD]["\163\141\x6d\154\x5f\141\155\137\141\x63\143\x6f\x75\156\x74\137\155\141\164\x63\x68\145\162"];
kCr:
CiA:
ctY:
$HI = '';
$WK = '';
if (empty($w_)) {
goto jm8;
}
if (!empty($m3) && array_key_exists($m3, $w_)) {
goto pPp;
}
$m3 = '';
goto ezJ;
pPp:
$m3 = $w_[$m3][0];
ezJ:
if (!empty($cy) && array_key_exists($cy, $w_)) {
goto xSA;
}
$cy = '';
goto IGs;
xSA:
$cy = $w_[$cy][0];
IGs:
if (!empty($PI) && array_key_exists($PI, $w_)) {
goto W6X;
}
$WK = $w_["\x4e\141\x6d\x65\111\x44"][0];
goto FJA;
W6X:
$WK = $w_[$PI][0];
FJA:
if (!empty($Wl) && array_key_exists($Wl, $w_)) {
goto a9W;
}
$HI = $w_["\x4e\141\155\145\x49\104"][0];
goto xhG;
a9W:
$HI = $w_[$Wl][0];
xhG:
if (!empty($Gf) && array_key_exists($Gf, $w_)) {
goto tgy;
}
$Gf = array();
goto JVp;
tgy:
$Gf = $w_[$Gf];
JVp:
if (!empty($Y_)) {
goto Xvp;
}
$Y_ = "\145\x6d\x61\x69\154";
Xvp:
jm8:
if ($il == "\x74\x65\163\x74\126\141\x6c\x69\x64\x61\x74\x65" || $il == "\x74\145\x73\164\116\x65\167\x43\145\x72\x74\151\146\x69\x63\x61\164\x65") {
goto Dbt;
}
mo_saml_login_user($HI, $m3, $cy, $WK, $Gf, $il, $Y_, $LD, $G6, $w_["\x4e\x61\155\145\x49\x44"][0], $pf, $w_);
goto pMB;
Dbt:
$an = get_option("\x73\141\155\x6c\137\x69\144\x65\x6e\x74\x69\x74\171\137\x70\162\x6f\x76\x69\144\x65\x72\x73");
$an = maybe_unserialize($an);
$yt = $LD["\151\144\x70\137\x6e\x61\x6d\x65"];
$JF = array("\164\x65\163\x74\x5f\x73\164\141\x74\165\163" => "\x54\x65\x73\x74\x20\163\165\143\x63\145\163\x73\x66\165\154");
if (empty($yt)) {
goto je2;
}
$an[$yt] = array_merge($an[$yt], $JF);
$an = array_filter($an, "\x66\151\x6c\164\x65\x72\x5f\x65\155\x70\164\171\137\x76\141\x6c\x75\145\163");
update_option("\163\141\x6d\x6c\137\x69\144\145\x6e\x74\151\x74\171\137\x70\x72\157\166\151\x64\x65\162\163", $an);
je2:
mo_saml_show_test_result($m3, $cy, $HI, $Gf, $w_, $LD);
pMB:
} catch (Exception $dF) {
echo sprintf("\x41\x6e\x20\x65\162\x72\x6f\162\40\x6f\x63\143\165\x72\162\x65\x64\40\x77\150\151\x6c\145\40\x70\162\157\x63\145\x73\163\151\156\x67\x20\x74\150\145\40\123\101\115\114\x20\x52\145\x73\x70\x6f\156\163\x65\56");
exit;
}
}
function check_if_default_mapping_required($Kv, $yD)
{
$AX = get_option("\163\x61\155\154\x5f\x69\x64\160\x5f\141\164\164\x72\x69\142\x75\x74\145\x5f\155\141\x70\160\151\156\147");
$AX = maybe_unserialize($AX);
if (!empty($AX)) {
goto Z0p;
}
$AX = array();
Z0p:
$ou = get_option("\163\x61\x6d\x6c\x5f\151\x64\x70\x5f\x72\x6f\x6c\145\137\155\x61\160\160\x69\x6e\x67");
$ou = maybe_unserialize($ou);
if (!empty($ou)) {
goto S2c;
}
$ou = array();
S2c:
if ($Kv) {
goto QmV;
}
if (array_key_exists($yD, $ou)) {
goto UH5;
}
return true;
goto agx;
UH5:
$hR = $ou[$yD];
agx:
foreach ($hR as $sv => $y2) {
if (!($sv == "\x64\145\146\x61\165\154\164\137\x72\157\x6c\x65")) {
goto tKI;
}
if ($y2 != "\x73\x75\142\163\143\x72\151\x62\x65\162") {
goto vdk;
}
goto Cwp;
goto l2T;
vdk:
return false;
l2T:
tKI:
if (!($sv == "\144\157\x6e\164\x5f\x63\162\x65\x61\x74\x65\x5f\165\x73\x65\x72" || $sv == "\144\x6f\x6e\x74\x5f\141\154\154\157\x77\x5f\x75\x6e\154\151\x73\x74\x65\144\137\165\x73\145\x72" || $sv == "\153\145\x65\160\x5f\x65\170\151\x73\164\151\x6e\x67\x5f\x75\x73\145\x72\163\137\162\157\154\145" || $sv == "\x64\x6f\x6e\x74\x5f\141\x6c\154\157\167\137\165\x73\x65\162\x5f\164\157\154\157\147\x69\x6e\137\143\162\x65\141\x74\145\x5f\x77\x69\164\x68\137\x67\x69\x76\145\x6e\x5f\x67\x72\x6f\x75\160\163")) {
goto RZH;
}
if ($y2 != "\165\x6e\x63\150\x65\143\153\145\x64") {
goto g0a;
}
goto Cwp;
goto Fsp;
g0a:
return false;
Fsp:
RZH:
if (empty($y2)) {
goto h80;
}
return false;
h80:
Cwp:
}
asV:
return true;
goto oAT;
QmV:
if (array_key_exists($yD, $AX)) {
goto HTi;
}
return true;
goto qkn;
HTi:
$Vm = $AX[$yD];
qkn:
$pJ = get_option("\x6d\157\137\163\141\x6d\x6c\x5f\143\165\x73\164\157\155\x5f\141\x74\164\x72\x73\137\x6d\x61\x70\x70\x69\156\147");
$pJ = maybe_unserialize($pJ);
$uM = array();
if (!array_key_exists($yD, $pJ)) {
goto SYa;
}
$uM = $pJ[$yD];
SYa:
if (empty($uM)) {
goto KG3;
}
$Vm = array_merge($Vm, $uM);
KG3:
foreach ($Vm as $sv => $y2) {
if (!($sv == "\165\x73\x65\x72\156\141\155\x65" || $sv == "\145\x6d\141\x69\x6c")) {
goto WqI;
}
if ($y2 != "\116\141\155\x65\x49\x44") {
goto k7U;
}
goto MQN;
goto n7W;
k7U:
return false;
n7W:
WqI:
if (!($sv == "\x64\151\x73\160\154\141\x79\137\x6e\x61\155\145")) {
goto EoV;
}
if ($y2 != "\x55\123\x45\122\116\101\115\105") {
goto bRY;
}
goto MQN;
goto gjc;
bRY:
return false;
gjc:
EoV:
if (empty($y2)) {
goto WnW;
}
return false;
WnW:
MQN:
}
Gtf:
return true;
oAT:
}
function mo_saml_show_test_result($m3, $cy, $HI, $Gf, $w_, $LD)
{
ob_end_clean();
echo "\74\x64\x69\x76\x20\163\164\171\154\x65\75\42\146\x6f\x6e\164\x2d\x66\x61\x6d\151\x6c\171\x3a\x43\x61\x6c\x69\142\x72\151\x3b\x70\x61\144\144\151\x6e\x67\x3a\x30\x20\63\x25\73\42\76";
$yt = $LD["\151\144\x70\137\156\141\x6d\x65"];
if (!empty($HI)) {
goto v_2;
}
echo "\x3c\x64\151\x76\x20\163\164\171\154\x65\75\42\143\x6f\154\x6f\162\72\40\x23\141\71\64\64\x34\62\73\x62\x61\x63\x6b\x67\162\x6f\165\156\x64\55\143\157\x6c\x6f\x72\72\x20\43\x66\x32\x64\x65\144\145\x3b\x70\141\144\144\151\156\x67\x3a\x20\61\65\160\170\73\x6d\141\162\147\151\156\55\x62\157\x74\164\157\x6d\x3a\40\x32\x30\160\170\x3b\x74\x65\x78\164\x2d\141\154\151\147\156\x3a\143\x65\156\x74\x65\x72\x3b\x62\157\162\144\145\162\72\x31\160\170\40\163\157\154\x69\144\x20\x23\105\66\102\x33\x42\x32\73\146\x6f\156\x74\x2d\163\x69\x7a\x65\72\x31\x38\160\x74\x3b\x22\x3e\124\x45\123\x54\40\x46\x41\111\114\x45\x44\74\x2f\x64\151\x76\76\xd\xa\x9\11\11\x9\x3c\x64\x69\x76\x20\163\164\171\x6c\145\75\x22\x63\157\x6c\x6f\162\72\x20\x23\141\x39\64\64\64\x32\73\x66\157\156\164\x2d\x73\151\172\145\72\61\64\x70\164\73\40\x6d\141\x72\x67\x69\156\55\x62\157\164\x74\157\x6d\x3a\62\60\160\x78\x3b\x22\76\x57\101\x52\116\x49\116\x47\72\x20\x53\x6f\x6d\145\x20\x41\x74\164\162\151\142\165\x74\145\163\40\104\x69\x64\40\x4e\157\x74\40\115\141\x74\x63\x68\x2e\x3c\57\x64\x69\166\x3e\15\12\x9\11\11\11\x3c\x64\151\166\x20\163\164\171\154\x65\75\x22\x64\x69\x73\x70\154\x61\x79\x3a\x62\x6c\157\143\x6b\73\x74\x65\x78\164\55\x61\154\x69\x67\156\72\143\145\x6e\164\145\x72\x3b\x6d\x61\x72\x67\x69\x6e\x2d\x62\157\x74\164\157\x6d\72\x34\45\73\42\76\x3c\151\x6d\x67\x20\x73\164\171\x6c\145\75\x22\x77\x69\x64\164\150\72\61\65\45\x3b\42\163\x72\143\x3d\42" . plugin_dir_url(__FILE__) . "\151\x6d\x61\x67\x65\x73\x2f\x77\162\x6f\156\147\x2e\x70\156\x67\x22\76\x3c\57\x64\151\166\76";
goto n6h;
v_2:
$TT = maybe_unserialize(get_option("\x6d\157\x5f\163\x61\155\154\137\x74\x65\163\x74\137\143\x6f\x6e\146\151\x67\x5f\141\x74\164\x72\163"));
if (!empty($TT)) {
goto nXh;
}
$TT = array();
nXh:
if (empty($LD)) {
goto udE;
}
$Wk = array($yt => $w_);
$TT = array_merge($TT, $Wk);
update_option("\x6d\157\137\163\x61\155\x6c\137\x74\x65\163\x74\137\143\157\156\146\x69\147\137\x61\164\x74\162\x73", $TT);
udE:
echo "\74\144\151\166\40\x73\x74\171\154\145\75\42\x63\x6f\154\x6f\x72\72\x20\43\x33\x63\x37\66\63\144\x3b\15\12\40\40\40\x20\40\x20\40\40\40\40\40\x20\40\40\x20\x20\142\x61\x63\x6b\147\x72\x6f\x75\x6e\144\55\143\157\154\x6f\x72\x3a\x20\43\144\146\x66\x30\x64\70\x3b\x20\x70\141\x64\x64\151\156\x67\x3a\62\45\x3b\x6d\141\x72\x67\x69\x6e\55\142\157\x74\164\157\x6d\72\x32\x30\x70\x78\73\x74\x65\170\164\55\x61\x6c\x69\147\x6e\x3a\x63\145\156\x74\145\162\x3b\40\142\x6f\x72\x64\145\162\x3a\x31\x70\x78\40\163\x6f\154\x69\144\x20\43\101\x45\104\x42\x39\x41\x3b\40\146\x6f\156\164\55\163\151\172\x65\x3a\x31\70\160\164\73\42\x3e\124\105\123\124\40\123\125\x43\x43\105\x53\x53\x46\x55\x4c\74\x2f\x64\151\166\76";
if (!array_key_exists("\116\x61\x6d\x65\111\x44", $w_)) {
goto Wrq;
}
if (!(strlen($w_["\x4e\x61\155\145\x49\x44"][0]) > 60)) {
goto qx9;
}
echo "\x3c\144\x69\166\x20\163\164\x79\x6c\145\75\42\144\151\163\x70\154\141\171\x3a\40\142\154\x6f\143\153\x3b\x63\157\154\157\162\x3a\x20\x23\x65\x39\x32\142\61\64\x3b\x62\141\x63\x6b\147\x72\x6f\165\x6e\144\x2d\x63\157\154\x6f\162\x3a\x20\x23\x66\143\x66\x38\x65\x33\73\x70\x61\x64\144\x69\x6e\147\72\x20\61\60\x70\170\73\142\157\162\x64\145\162\x3a\x20\163\x6f\x6c\151\144\x20\61\160\x78\x20\43\146\141\x65\x62\x63\x63\73\167\151\x64\164\x68\72\71\x36\45\73\x22\76\xd\12\x20\40\40\40\40\40\40\x20\40\x20\x20\x20\40\40\x20\x20\74\163\160\141\156\76\74\x62\76\x4e\x4f\124\x45\40\72\74\x2f\142\76\x20\116\141\x6d\x65\x49\x44\40\x69\x73\x20\x67\162\145\x61\164\x65\162\x20\x74\150\141\x6e\x20\x36\60\40\143\x68\141\x72\141\x63\x74\145\x72\163\x20\x6c\x6f\x6e\x67\56\x20\x55\x73\145\x72\40\143\141\x6e\x6e\x6f\x74\x20\x62\145\x20\143\162\x65\x61\164\145\x64\x20\167\x69\164\x68\40\x74\150\x69\163\x20\116\141\155\x65\111\104\x20\141\163\40\x55\163\145\162\x6e\141\155\145\x2e\x3c\57\x73\x70\x61\156\76\74\57\144\151\x76\76\x3c\142\162\x2f\x3e";
qx9:
Wrq:
echo "\74\144\x69\x76\x20\x73\x74\x79\x6c\145\75\x22\144\151\x73\160\x6c\x61\x79\72\142\154\x6f\x63\x6b\73\164\145\x78\x74\x2d\141\154\151\x67\x6e\x3a\x63\145\156\164\x65\162\73\155\141\162\x67\151\x6e\55\142\157\164\164\157\155\72\64\45\x3b\x22\x3e\74\x69\x6d\147\x20\163\164\x79\x6c\x65\x3d\x22\x77\151\x64\164\150\72\61\x35\45\73\42\x73\x72\x63\75\42" . plugin_dir_url(__FILE__) . "\x69\x6d\141\147\x65\163\x2f\x67\162\x65\145\156\x5f\143\150\x65\x63\153\x2e\x70\156\x67\x22\x3e\74\57\x64\151\x76\x3e";
n6h:
$wf = get_option("\163\141\155\154\137\144\157\x6d\x61\151\156\x5f\162\x65\x73\x74\162\x69\143\164\x69\x6f\x6e");
if (!empty($wf)) {
goto wd7;
}
$wf = array();
wd7:
$wf = maybe_unserialize($wf);
$z1 = $yt;
if (array_key_exists($z1, $wf)) {
goto n79;
}
$z1 = "\x44\x45\x46\101\125\x4c\124";
n79:
if (!isset($wf[$z1])) {
goto Fu7;
}
$XL = $wf[$z1]["\145\x6e\141\142\154\145\x5f\144\157\x6d\141\x69\156\137\162\145\163\164\162\151\x63\x74\151\x6f\x6e"];
Fu7:
if (empty($XL)) {
goto xsa;
}
$IG = $wf[$z1]["\x61\x6c\154\x6f\167\x5f\144\145\x6e\171\137\x6c\157\x67\151\x6e"];
if (!empty($IG) && $IG == "\x64\x65\x6e\171") {
goto mUu;
}
$GF = $wf[$z1]["\x65\x6d\x61\x69\154\x5f\144\157\155\141\151\156\163"];
$YS = explode("\73", $GF);
$bR = explode("\x40", $HI);
$tC = array_key_exists("\61", $bR) ? $bR[1] : '';
if (in_array($tC, $YS)) {
goto XTl;
}
echo "\74\160\x20\163\x74\171\x6c\x65\75\42\143\157\154\157\x72\x3a\162\x65\144\73\x22\x3e\x54\150\151\x73\x20\165\163\x65\x72\40\167\151\x6c\x6c\40\x6e\x6f\x74\40\x62\145\40\x61\154\x6c\157\167\x65\x64\x20\164\157\x20\x6c\157\147\151\x6e\40\x61\163\40\164\x68\145\x20\144\157\155\x61\151\x6e\x20\157\x66\x20\x74\150\145\40\x65\x6d\141\x69\x6c\x20\x69\163\40\x6e\157\x74\40\151\156\x63\x6c\x75\144\x65\144\40\151\x6e\x20\164\x68\x65\40\141\x6c\x6c\x6f\167\x65\x64\40\154\x69\x73\x74\40\157\x66\x20\104\157\155\141\151\156\40\122\x65\x73\164\x72\151\x63\x74\151\157\x6e\x2e\74\57\160\76";
XTl:
goto d7u;
mUu:
$GF = $wf[$z1]["\145\x6d\x61\151\x6c\x5f\x64\157\x6d\141\x69\x6e\x73"];
$YS = explode("\x3b", $GF);
$bR = explode("\100", $HI);
$tC = array_key_exists("\61", $bR) ? $bR[1] : '';
if (!in_array($tC, $YS)) {
goto s_N;
}
echo "\x3c\160\40\163\x74\x79\x6c\x65\x3d\42\143\x6f\x6c\157\x72\72\162\145\144\73\42\x3e\x54\x68\151\x73\x20\x75\163\x65\x72\x20\167\151\x6c\x6c\x20\x6e\157\164\40\x62\x65\40\141\x6c\154\x6f\x77\145\x64\40\x74\x6f\x20\154\157\147\x69\156\x20\141\x73\40\164\x68\x65\x20\144\x6f\155\141\x69\156\40\157\x66\40\164\150\145\x20\x65\155\141\151\154\40\151\163\x20\x69\x6e\143\x6c\165\x64\145\x64\40\151\156\x20\x74\x68\145\x20\144\145\156\151\x65\x64\x20\x6c\x69\x73\164\40\x6f\146\40\x44\157\155\x61\151\x6e\x20\x52\145\163\x74\162\x69\x63\164\151\x6f\156\x2e\74\57\x70\76";
s_N:
d7u:
xsa:
echo "\x3c\163\x70\x61\156\40\163\164\171\154\x65\75\x22\x66\157\x6e\164\x2d\x73\151\172\x65\x3a\x31\64\160\x74\73\x22\76\x3c\x62\x3e\x48\x65\x6c\154\x6f\x3c\x2f\142\x3e\x2c\40" . $HI . "\74\x2f\x73\x70\x61\x6e\x3e\x3c\x62\162\57\76\74\160\x20\x73\164\171\x6c\145\75\x22\146\157\156\x74\x2d\x77\145\151\x67\150\164\72\x62\157\x6c\144\x3b\x66\157\x6e\164\55\x73\151\x7a\145\72\x31\64\x70\x74\x3b\155\141\x72\x67\x69\156\55\x6c\145\146\x74\x3a\x31\x25\x3b\x22\x3e\101\124\124\122\x49\102\x55\x54\x45\123\x20\x52\105\103\x45\111\x56\x45\104\72\74\57\x70\x3e\xd\xa\x9\x9\x9\11\74\x74\x61\142\154\x65\40\x73\164\x79\x6c\145\75\42\x62\x6f\x72\144\145\162\x2d\143\157\154\154\x61\x70\x73\x65\72\x63\x6f\154\x6c\141\160\x73\x65\73\x62\157\x72\144\x65\162\55\x73\160\x61\x63\151\156\147\x3a\60\x3b\x20\167\x69\x64\x74\150\x3a\61\60\x30\x25\73\40\x66\157\x6e\164\x2d\x73\151\172\x65\x3a\61\x34\160\x74\x3b\x62\141\x63\x6b\147\162\x6f\x75\156\144\x2d\x63\157\x6c\x6f\x72\72\43\x45\x44\x45\x44\x45\x44\73\x22\76\xd\xa\x9\x9\x9\x9\x3c\164\x72\x20\163\164\171\x6c\145\75\x22\x74\x65\170\164\x2d\141\x6c\151\x67\156\72\143\x65\156\164\145\162\x3b\42\76\74\164\144\x20\x73\x74\171\154\145\x3d\x22\x66\157\x6e\164\55\167\x65\x69\x67\150\x74\72\x62\x6f\x6c\x64\73\x62\x6f\162\x64\x65\x72\72\x32\160\x78\x20\163\157\x6c\x69\x64\x20\43\x39\x34\x39\60\71\x30\73\160\x61\x64\x64\151\x6e\x67\72\x32\45\x3b\42\x3e\101\x54\124\122\x49\102\125\x54\x45\x20\x4e\101\115\105\x3c\57\164\x64\76\74\164\x64\x20\x73\x74\x79\154\145\75\42\146\x6f\x6e\164\x2d\x77\145\151\x67\x68\x74\72\x62\157\x6c\144\73\160\141\x64\x64\151\156\x67\72\x32\x25\73\142\157\x72\144\x65\162\72\62\160\x78\x20\x73\157\x6c\151\x64\40\x23\71\x34\71\60\71\x30\73\x20\x77\x6f\162\144\x2d\x77\162\x61\x70\72\x62\x72\145\x61\153\x2d\x77\x6f\x72\144\x3b\x22\x3e\101\124\x54\x52\111\102\x55\x54\105\x20\x56\101\x4c\125\105\74\57\x74\x64\76\74\57\x74\x72\x3e";
if (!empty($w_)) {
goto x2M;
}
echo "\116\x6f\40\x41\x74\164\x72\151\x62\x75\164\145\x73\x20\x52\145\x63\145\151\166\145\144\56";
goto Ckq;
x2M:
foreach ($w_ as $sv => $y2) {
echo "\x3c\x74\162\x3e\x3c\164\144\40\163\x74\x79\154\145\x3d\x27\146\x6f\x6e\x74\55\x77\145\x69\147\x68\x74\72\x62\x6f\154\144\x3b\x62\x6f\162\144\x65\x72\x3a\62\160\x78\x20\163\157\154\151\144\40\x23\71\x34\71\60\x39\60\x3b\x70\141\x64\144\151\156\x67\72\62\x25\x3b\x77\x6f\162\144\x2d\167\162\141\160\x3a\x62\162\145\x61\153\55\167\157\x72\144\73\x27\76" . $sv . "\74\57\164\144\x3e\74\x74\x64\40\x73\164\x79\154\145\x3d\x27\x70\141\x64\144\x69\156\x67\x3a\x32\45\x3b\x62\157\162\x64\x65\x72\x3a\x32\x70\x78\40\163\x6f\x6c\x69\x64\40\x23\x39\x34\x39\60\71\60\73\x20\167\157\162\x64\x2d\x77\162\x61\160\72\x62\x72\145\x61\153\55\x77\x6f\162\x64\x3b\47\x3e" . implode("\x3c\x68\162\57\x3e", $y2) . "\74\x2f\164\x64\x3e\x3c\57\x74\x72\76";
ve9:
}
ht8:
Ckq:
echo "\x3c\x2f\x74\x61\x62\x6c\x65\76\x3c\x2f\x64\x69\x76\76";
echo "\x3c\144\151\166\40\163\164\x79\x6c\x65\x3d\x22\x6d\141\162\147\x69\x6e\x3a\x33\x25\73\144\151\163\160\x6c\141\x79\x3a\142\154\x6f\x63\153\x3b\x74\x65\170\164\x2d\x61\154\x69\x67\x6e\72\143\x65\x6e\164\145\x72\73\x22\x3e\74\151\156\x70\165\164\x20\163\164\171\x6c\x65\75\x22\x70\x61\x64\x64\151\x6e\147\x3a\x31\x25\x3b\x77\x69\x64\164\x68\72\x31\60\60\x70\170\x3b\142\x61\x63\153\x67\162\x6f\x75\156\144\72\40\43\x30\60\71\x31\x43\104\x20\156\x6f\156\x65\x20\x72\145\x70\x65\141\164\40\x73\143\x72\157\x6c\154\40\x30\45\x20\60\45\x3b\143\x75\162\163\x6f\162\x3a\x20\160\157\151\x6e\x74\x65\162\x3b\146\157\x6e\x74\55\x73\x69\x7a\x65\72\x31\x35\160\x78\x3b\x62\x6f\162\x64\145\x72\x2d\167\151\144\x74\150\72\x20\x31\160\x78\x3b\142\157\x72\x64\x65\x72\55\x73\x74\x79\154\145\72\x20\163\x6f\154\151\x64\73\142\157\x72\x64\x65\x72\55\x72\x61\144\151\x75\163\x3a\40\63\x70\170\x3b\x77\150\x69\164\145\55\x73\x70\141\x63\x65\x3a\40\156\x6f\167\x72\141\x70\x3b\x62\157\x78\x2d\163\x69\x7a\x69\x6e\147\x3a\x20\142\157\x72\x64\145\x72\55\142\x6f\170\x3b\142\x6f\x72\144\145\162\x2d\143\157\154\x6f\162\x3a\x20\x23\x30\60\x37\63\101\x41\73\142\157\x78\x2d\x73\150\x61\144\x6f\167\72\x20\x30\160\170\x20\61\160\170\x20\60\x70\170\40\162\147\142\x61\50\61\x32\60\54\40\62\x30\x30\54\x20\x32\x33\x30\x2c\x20\x30\56\66\x29\40\151\156\163\145\x74\x3b\143\x6f\154\157\162\72\40\x23\106\x46\106\x3b\x22\x74\x79\160\145\75\42\142\165\164\164\157\156\42\40\x76\141\154\165\x65\75\x22\104\157\156\x65\x22\40\x6f\156\103\154\151\143\153\x3d\42\x73\x65\x6c\x66\x2e\x63\154\157\x73\x65\50\51\x3b\x22\x3e\74\57\x64\x69\x76\x3e";
exit;
}
function mo_saml_convert_to_windows_iconv($aH, $LD)
{
$an = get_option("\x73\141\155\x6c\x5f\151\x64\x65\156\164\x69\x74\171\137\x70\x72\157\x76\x69\144\x65\162\x73");
$an = maybe_unserialize($an);
if (!isset($LD["\x69\x64\x70\137\156\141\155\145"]) || empty($LD["\x69\x64\160\x5f\156\141\x6d\145"])) {
goto yi9;
}
$yt = $LD["\x69\x64\160\x5f\156\141\155\x65"];
goto Cb3;
yi9:
$yt = '';
Cb3:
if (!(!empty($yt) and isset($an[$yt]))) {
goto KMP;
}
$hV = $an[$yt]["\x6d\157\x5f\163\141\x6d\x6c\x5f\x65\x6e\143\x6f\x64\151\156\x67\137\145\156\x61\x62\x6c\145\144"];
if (!($hV === '')) {
goto VLy;
}
return $aH;
VLy:
KMP:
return iconv("\x55\124\106\x2d\x38", "\x43\x50\61\x32\x35\62\x2f\x2f\111\107\116\117\122\x45", $aH);
}
function mo_saml_login_user($HI, $m3, $cy, $WK, $Gf, $il, $Y_, $pi = NULL, $G6 = '', $hn = '', $Ks = '', $w_ = null)
{
$Jc = Utilities::mo_idp_limit_reached();
if (!$Jc) {
goto G0v;
}
wp_die("\x57\145\x20\x63\x6f\165\x6c\144\x20\x6e\x6f\164\x20\163\151\x67\x6e\x20\x79\157\165\40\x69\x6e\56\40\120\154\x65\141\163\145\40\143\x6f\156\x74\141\x63\x74\x20\171\x6f\165\x72\x20\x61\x64\155\151\156\x69\x73\164\162\x61\x74\x6f\x72\56", "\x49\x44\120\x20\114\151\155\x69\x74\40\x52\x65\141\x63\150\x65\x64");
G0v:
$jE = sanitize_user($WK, true);
$et = apply_filters("\x70\162\x65\x5f\x75\x73\x65\162\x5f\154\157\x67\151\156", $jE);
$WK = trim($et);
$yD = $pi["\x69\x64\160\137\156\141\155\145"];
$Lq = $yD;
if (!array_key_exists("\145\x6e\141\142\x6c\x65\x5f\x69\144\x70", $pi)) {
goto XoY;
}
if ($pi["\145\x6e\141\x62\154\145\x5f\x69\144\x70"]) {
goto spJ;
}
wp_die("\x57\x65\40\x63\x6f\x75\x6c\144\40\156\x6f\x74\40\x73\151\147\x6e\x20\x79\157\165\x20\x69\156\x2e\40\x50\154\145\x61\x73\145\x20\143\157\x6e\164\141\143\x74\x20\171\x6f\165\x72\x20\141\x64\155\151\x6e\x69\x73\164\x72\141\x74\157\x72\56", "\111\104\120\40\x44\x69\x73\x61\142\154\145\x64");
spJ:
XoY:
do_action("\x6d\x6f\137\x61\142\162\137\146\x69\x6c\x74\x65\x72\137\154\157\147\x69\x6e", $w_);
check_if_user_allowed_to_login_due_to_role_restriction($Gf, $yD);
$he = get_option("\x6d\x6f\137\163\x61\155\x6c\137\x73\160\x5f\142\141\x73\x65\x5f\x75\x72\154");
if (!empty($he)) {
goto Z24;
}
$he = home_url();
Z24:
$wf = get_option("\163\x61\155\154\137\x64\x6f\155\141\x69\x6e\x5f\x72\x65\163\164\x72\151\x63\x74\x69\157\x6e");
if (!empty($wf)) {
goto Qyv;
}
$wf = array();
Qyv:
$wf = maybe_unserialize($wf);
$z1 = $yD;
if (array_key_exists($z1, $wf)) {
goto SAi;
}
$z1 = "\x44\x45\106\101\125\x4c\124";
SAi:
if (!isset($wf[$z1])) {
goto jTF;
}
$XL = isset($wf[$z1]["\145\x6e\x61\142\154\x65\x5f\x64\157\x6d\141\151\156\137\x72\145\163\164\162\x69\143\x74\x69\x6f\x6e"]) ? $wf[$z1]["\x65\x6e\141\x62\154\x65\137\144\x6f\155\141\x69\156\x5f\162\145\163\164\162\151\x63\x74\151\x6f\156"] : false;
jTF:
if (empty($XL)) {
goto ZPp;
}
$GF = $wf[$z1]["\x65\x6d\x61\x69\154\x5f\x64\157\155\x61\151\156\163"];
$YS = explode("\x3b", $GF);
$bR = explode("\x40", $HI);
$tC = array_key_exists("\61", $bR) ? $bR[1] : '';
$IG = $wf[$z1]["\141\154\x6c\157\167\137\x64\x65\x6e\x79\x5f\x6c\x6f\x67\x69\x6e"];
$BY = get_option("\x6d\x6f\137\x73\141\x6d\154\x5f\x72\x65\x73\x74\x72\x69\x63\x74\x65\x64\x5f\x64\157\x6d\141\x69\x6e\x5f\145\162\162\157\162\137\155\x73\147");
if (!empty($BY)) {
goto HYH;
}
$BY = "\131\x6f\x75\x20\141\162\145\x20\156\157\x74\40\141\154\x6c\157\x77\x65\x64\40\164\157\x20\154\x6f\x67\151\156\56\40\x50\154\x65\x61\163\145\40\143\157\156\164\x61\x63\164\40\x79\x6f\165\x72\40\x41\x64\x6d\x69\x6e\151\x73\164\162\x61\164\x6f\162\x2e";
HYH:
if (!empty($IG) && $IG == "\144\x65\x6e\x79") {
goto dRW;
}
if (in_array($tC, $YS)) {
goto LVY;
}
wp_die($BY, "\120\145\162\x6d\x69\x73\x73\x69\157\x6e\40\104\x65\x6e\x69\x65\144\40\72\x20\116\157\164\40\x61\x20\x57\150\x69\x74\x65\154\151\163\164\145\x64\x20\x75\x73\145\162\56");
LVY:
goto lUU;
dRW:
if (!in_array($tC, $YS)) {
goto lJ2;
}
wp_die($BY, "\120\145\x72\155\x69\163\x73\151\157\156\x20\104\x65\x6e\x69\x65\144\x20\x3a\40\x42\x6c\x61\143\x6b\154\x69\x73\x74\145\x64\x20\x75\163\x65\162\56");
lJ2:
lUU:
ZPp:
$fK = false;
$Xv = null;
if (!is_multisite()) {
goto aBh;
}
if (!username_exists($WK)) {
goto ezo;
}
$user = get_user_by("\154\x6f\147\x69\x6e", $WK);
ezo:
if (!email_exists($HI)) {
goto Eg_;
}
$user = get_user_by("\x65\x6d\141\151\x6c", $HI);
Eg_:
if (empty($user)) {
goto Rlf;
}
$Xv = $user;
$x2 = $user->ID;
$blog_id = get_current_blog_id();
if (is_user_member_of_blog($x2, $blog_id)) {
goto wXT;
}
$fK = true;
wXT:
Rlf:
aBh:
if ($Y_ == "\165\163\x65\x72\x6e\x61\155\145" && username_exists($WK) || username_exists($WK) and !$fK) {
goto CBZ;
}
if (email_exists($HI) and !$fK) {
goto cYI;
}
if (!username_exists($WK) && !email_exists($HI) || $fK) {
goto Ph5;
}
goto DzL;
cYI:
$user = get_user_by("\145\x6d\141\x69\154", $HI);
$x2 = $user->ID;
$yD = $pi["\x69\144\x70\x5f\x6e\x61\x6d\145"];
do_action("\x6d\x6f\137\163\141\x6d\x6c\137\165\160\144\x61\x74\145\x5f\x75\x73\x65\162\x6e\141\x6d\x65", $WK, $yD);
if (empty($m3)) {
goto AWV;
}
wp_update_user(array("\111\x44" => $x2, "\x66\151\162\x73\164\x5f\x6e\x61\x6d\x65" => $m3));
AWV:
if (empty($cy)) {
goto UY9;
}
wp_update_user(array("\111\x44" => $x2, "\x6c\141\163\x74\137\156\x61\155\x65" => $cy));
UY9:
if (is_null($w_)) {
goto uCo;
}
update_user_meta($x2, "\x6d\157\137\163\141\155\x6c\137\165\x73\x65\x72\137\141\x74\x74\x72\x69\142\165\x74\145\163", $w_);
if (empty($Ks)) {
goto EgP;
}
if (strcmp($Ks, "\x55\123\105\122\x4e\101\x4d\x45") == 0) {
goto awu;
}
if (strcmp($Ks, "\x46\x4e\x41\x4d\x45") == 0 && !empty($m3)) {
goto JzS;
}
if (strcmp($Ks, "\x4c\x4e\101\x4d\x45") == 0 && !empty($cy)) {
goto OQ2;
}
if (strcmp($Ks, "\x46\x4e\101\115\105\x5f\114\x4e\x41\x4d\105") == 0 && !empty($cy) && !empty($m3)) {
goto SSX;
}
if (!(strcmp($Ks, "\x4c\116\101\x4d\x45\x5f\106\116\101\x4d\x45") == 0 && !empty($cy) && !empty($m3))) {
goto sBb;
}
wp_update_user(array("\111\104" => $x2, "\x64\x69\163\160\x6c\x61\171\137\156\141\x6d\145" => $cy . "\x20" . $m3));
sBb:
goto iQf;
SSX:
wp_update_user(array("\x49\104" => $x2, "\144\x69\x73\x70\x6c\141\171\x5f\x6e\x61\155\x65" => $m3 . "\x20" . $cy));
iQf:
goto wFw;
OQ2:
wp_update_user(array("\111\104" => $x2, "\x64\x69\163\160\154\x61\x79\x5f\156\x61\155\145" => $cy));
wFw:
goto B1R;
JzS:
wp_update_user(array("\x49\104" => $x2, "\144\x69\163\x70\154\141\x79\137\156\141\x6d\145" => $m3));
B1R:
goto yGv;
awu:
wp_update_user(array("\x49\104" => $x2, "\x64\x69\x73\160\x6c\x61\x79\x5f\x6e\141\155\145" => $user->user_login));
yGv:
EgP:
if (!get_option("\155\x6f\137\163\x61\x6d\x6c\137\143\165\x73\x74\157\x6d\x5f\x61\164\164\162\163\137\x6d\141\x70\160\x69\156\147")) {
goto hNG;
}
$pJ = get_option("\x6d\x6f\x5f\163\x61\155\154\137\x63\165\163\x74\157\155\137\x61\x74\164\162\163\x5f\x6d\x61\160\x70\x69\156\147");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto m_9;
}
$HY = check_if_default_mapping_required(true, $yD);
if (!$HY) {
goto YVx;
}
$yD = "\x44\x45\x46\x41\125\x4c\x54";
YVx:
if (!array_key_exists($yD, $pJ)) {
goto Y9X;
}
foreach ($pJ[$yD] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto GG1;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto T09;
}
$F1 = true;
T09:
if (!$F1) {
goto RHz;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto W_K;
RHz:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
R13:
}
ZVM:
update_user_meta($x2, $sv, $qP);
W_K:
GG1:
SPz:
}
Cpy:
Y9X:
m_9:
hNG:
uCo:
$ou = get_option("\163\141\x6d\x6c\137\x69\x64\x70\x5f\162\x6f\x6c\145\137\x6d\141\160\160\151\x6e\x67");
$ou = maybe_unserialize($ou);
$ty = '';
$wh = get_option("\x6d\157\137\163\141\x6d\x6c\137\162\145\154\141\x79\x5f\x73\x74\x61\164\145");
if (!empty($wh)) {
goto bv3;
}
if (!empty($il)) {
goto LG1;
}
$ty = $he;
goto WgF;
LG1:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto XP4;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto PHj;
}
$ty = $he;
goto X7F;
PHj:
$ty = $il;
X7F:
goto lag;
XP4:
$ty = $il;
lag:
WgF:
goto qz8;
bv3:
$ty = $wh;
qz8:
do_action("\x6d\151\156\x69\157\x72\141\x6e\x67\145\137\x70\157\x73\x74\137\141\x75\164\150\145\156\x74\x69\143\141\164\x65\x5f\x75\163\145\x72\x5f\x6c\x6f\x67\x69\x6e", $user, null, $ty);
$yD = $pi["\x69\144\160\x5f\x6e\141\x6d\x65"];
$nR = $yD;
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto In6;
}
$yD = "\104\105\106\x41\125\x4c\124";
In6:
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto GcA;
}
$nw = $ou[$yD]["\x64\x6f\x6e\x74\137\x61\154\154\157\x77\x5f\165\156\154\x69\x73\164\x65\144\137\165\163\145\x72"];
$D6 = $ou[$yD]["\x64\145\x66\141\x75\x6c\164\x5f\162\x6f\154\145"];
$RD = $ou[$yD]["\144\x6f\156\164\137\x63\162\145\141\164\145\x5f\x75\x73\145\x72"];
$Zc = $ou[$yD]["\x6b\x65\145\160\137\145\x78\x69\163\x74\151\x6e\147\x5f\x75\x73\145\x72\163\137\162\x6f\x6c\145"];
GcA:
if (isset($Zc) && $Zc == "\x63\150\x65\x63\153\x65\x64") {
goto IuP;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto qci;
IuP:
$PB = false;
qci:
if (is_administrator_user($user)) {
goto WhM;
}
if ($PB !== true && !empty($Zc) && $Zc == "\x63\150\145\143\x6b\145\x64") {
goto D8a;
}
if ($PB !== true && !empty($nw) && $nw == "\x63\x68\145\143\153\145\144") {
goto Wa2;
}
if ($PB !== true && !empty($D6)) {
goto z52;
}
if ($PB !== true) {
goto kyb;
}
goto FDK;
D8a:
wp_update_user(array("\x49\104" => $x2));
goto FDK;
Wa2:
wp_update_user(array("\x49\x44" => $x2, "\x72\x6f\x6c\145" => false));
goto FDK;
z52:
wp_update_user(array("\x49\x44" => $x2, "\x72\157\x6c\x65" => $D6));
goto FDK;
kyb:
$mR = get_option("\144\x65\x66\x61\165\x6c\x74\137\162\157\x6c\145");
wp_update_user(array("\x49\104" => $x2, "\x72\157\x6c\x65" => $mR));
FDK:
WhM:
wp_set_current_user($x2);
$oK = false;
$oK = apply_filters("\x6d\157\137\x72\x65\x6d\x65\155\x62\145\x72\x5f\x6d\x65", $oK);
wp_set_auth_cookie($x2, $oK);
$user = get_user_by("\151\x64", $x2);
do_action("\x77\x70\x5f\154\157\x67\151\x6e", $user->user_login, $user);
if (empty($nR)) {
goto TTo;
}
update_user_meta($x2, "\155\x6f\x5f\163\141\x6d\x6c\x5f\154\157\147\147\145\x64\x5f\151\156\137\x77\151\164\150\x5f\151\x64\160", $nR);
TTo:
if (empty($G6)) {
goto gs8;
}
update_user_meta($x2, "\x6d\157\137\x73\141\x6d\x6c\x5f\x73\145\163\x73\x69\x6f\x6e\x5f\x69\x6e\x64\x65\x78", $G6);
gs8:
if (empty($hn)) {
goto OND;
}
update_user_meta($x2, "\x6d\x6f\x5f\163\x61\155\x6c\137\x6e\x61\155\x65\137\x69\144", $hn);
OND:
do_action("\x6d\x6f\137\x73\141\x6d\154\137\141\164\x74\162\x69\142\x75\164\145\163", $WK, $HI, $m3, $cy, $Gf, $Lq);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto T8f;
}
session_start();
T8f:
$_SESSION["\155\157\137\163\x61\x6d\154"]["\x6c\x6f\147\147\145\144\137\151\156\137\x77\x69\164\150\137\x69\144\x70"] = $nR;
if (empty($G6)) {
goto Uvk;
}
$_SESSION["\x6d\x6f\x5f\163\x61\x6d\154"]["\x73\x65\163\x73\151\x6f\156\x49\156\x64\x65\170"] = $G6;
Uvk:
if (empty($hn)) {
goto izm;
}
$_SESSION["\x6d\x6f\137\163\141\x6d\x6c"]["\x6e\141\155\145\x49\144"] = $hn;
izm:
wp_redirect($ty);
exit;
goto DzL;
Ph5:
$ou = get_option("\163\141\x6d\x6c\137\151\x64\160\137\x72\x6f\154\145\137\155\x61\x70\160\x69\x6e\x67");
$ou = maybe_unserialize($ou);
$yD = $pi["\x69\x64\x70\137\156\x61\x6d\x65"];
$WK = apply_filters("\x6d\x6f\x5f\x73\x61\x6d\x6c\137\x66\x69\x6c\164\145\162\137\165\x73\x65\x72\x6e\x61\155\145", $WK, $yD);
$nR = $yD;
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto xkl;
}
$yD = "\x44\105\x46\101\125\x4c\124";
xkl:
$Lo = true;
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto ShT;
}
$nw = $ou[$yD]["\144\157\156\x74\137\x61\154\x6c\157\167\x5f\x75\x6e\154\151\x73\x74\x65\x64\x5f\165\x73\145\162"];
$D6 = $ou[$yD]["\144\x65\x66\x61\165\x6c\x74\137\162\157\154\145"];
$RD = $ou[$yD]["\x64\x6f\x6e\x74\x5f\143\162\145\141\164\145\137\x75\163\145\162"];
ShT:
$Nr = get_saml_roles_to_assign($ou, $yD, $Gf);
if (!(empty($Nr) && !empty($RD) && strcmp($RD, "\143\150\145\143\153\x65\144") == 0)) {
goto T8O;
}
$Lo = FALSE;
T8O:
$x2 = NULL;
if ($Lo) {
goto x7y;
}
$BY = get_option("\x6d\157\137\163\141\155\x6c\x5f\141\143\x63\157\165\156\164\137\143\x72\x65\141\x74\151\x6f\x6e\137\144\151\163\x61\x62\154\145\x64\x5f\155\x73\x67");
if (!empty($BY)) {
goto yxO;
}
$BY = "\127\145\x20\x63\157\165\154\x64\x20\156\157\x74\40\x73\151\x67\156\40\x79\x6f\165\40\x69\156\x2e\40\x50\x6c\x65\x61\x73\145\x20\143\157\156\164\x61\x63\x74\40\171\157\165\x72\40\101\144\155\151\x6e\x69\x73\164\x72\x61\x74\x6f\162\56";
yxO:
wp_die($BY, "\x45\162\162\x6f\x72\x3a\x20\116\157\164\40\x61\40\x57\x6f\x72\x64\x50\x72\x65\x73\163\x20\x4d\x65\155\142\x65\x72");
exit;
goto OV_;
x7y:
$UW = wp_generate_password(10, false);
if (!$fK) {
goto r3w;
}
$x2 = $Xv->ID;
goto UOa;
r3w:
if (!empty($WK)) {
goto zlI;
}
$x2 = wp_create_user($HI, $UW, $HI);
goto eZp;
zlI:
if (!(strlen($WK) > 60)) {
goto UpW;
}
wp_die("\x57\x65\x20\143\x6f\x75\154\144\x6e\47\164\40\163\x69\147\156\x20\x79\157\x75\x20\151\x6e\x2e\x20\x50\x6c\145\141\163\145\x20\143\x6f\156\x74\141\x63\164\40\x79\x6f\x75\x72\x20\x61\144\x6d\151\x6e\x69\x73\x74\162\x61\x74\x6f\162", "\x55\163\x65\162\x6e\x61\x6d\x65\40\x6c\145\x6e\147\164\x68\40\154\151\x6d\151\x74\40\x72\x65\x61\x63\x68\145\144");
UpW:
$x2 = wp_create_user($WK, $UW, $HI);
eZp:
if (!is_wp_error($x2)) {
goto sPJ;
}
wp_die($x2->get_error_message() . "\x3c\x62\162\76\120\x6c\x65\x61\163\x65\x20\143\x6f\156\x74\141\143\x74\40\x79\x6f\165\162\40\101\x64\x6d\x69\156\151\163\x74\x72\141\x74\157\162\x2e\74\142\162\x3e\x3c\x62\76\125\x73\x65\x72\156\x61\x6d\145\74\x2f\x62\76\72\x20" . $HI, "\105\162\162\157\x72\x3a\40\x43\157\165\154\x64\x6e\x27\x74\40\x63\162\145\x61\164\x65\40\165\x73\145\x72");
sPJ:
UOa:
$user = get_user_by("\x69\x64", $x2);
if (isset($Zc) and $Zc == "\x63\150\145\x63\x6b\x65\x64") {
goto l7k;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto eNO;
l7k:
$PB = false;
eNO:
if ($PB !== true && !empty($Zc) && $Zc == "\x63\x68\145\x63\x6b\x65\x64") {
goto hWZ;
}
if ($PB !== true && !empty($nw) && $nw == "\x63\150\x65\143\153\x65\144") {
goto ICw;
}
if ($PB !== true && !empty($D6)) {
goto fnC;
}
if ($PB !== true) {
goto msA;
}
goto A20;
hWZ:
wp_update_user(array("\x49\104" => $x2));
goto A20;
ICw:
wp_update_user(array("\111\x44" => $x2, "\162\x6f\x6c\145" => false));
goto A20;
fnC:
wp_update_user(array("\111\x44" => $x2, "\x72\157\154\145" => $D6));
goto A20;
msA:
$mR = get_option("\x64\145\x66\x61\x75\x6c\x74\x5f\162\157\154\x65");
wp_update_user(array("\x49\x44" => $x2, "\x72\157\154\145" => $mR));
A20:
if (empty($m3)) {
goto JBe;
}
wp_update_user(array("\111\x44" => $x2, "\146\x69\x72\x73\164\137\x6e\141\x6d\145" => $m3));
JBe:
if (empty($cy)) {
goto gKu;
}
wp_update_user(array("\x49\104" => $x2, "\x6c\141\x73\x74\137\x6e\x61\155\x65" => $cy));
gKu:
if (is_null($w_)) {
goto CMx;
}
update_user_meta($x2, "\155\157\x5f\163\141\x6d\154\x5f\165\163\145\x72\137\141\164\x74\x72\x69\142\x75\x74\145\x73", $w_);
if (empty($Ks)) {
goto bBr;
}
if (strcmp($Ks, "\x55\123\105\122\x4e\x41\x4d\105") == 0) {
goto Zez;
}
if (strcmp($Ks, "\106\x4e\101\115\105") == 0 && !empty($m3)) {
goto IVV;
}
if (strcmp($Ks, "\114\116\101\x4d\105") == 0 && !empty($cy)) {
goto gje;
}
if (strcmp($Ks, "\x46\x4e\x41\115\x45\137\114\x4e\101\115\x45") == 0 && !empty($cy) && !empty($m3)) {
goto PeA;
}
if (!(strcmp($Ks, "\114\116\x41\115\105\x5f\x46\x4e\x41\115\x45") == 0 && !empty($cy) && !empty($m3))) {
goto St3;
}
wp_update_user(array("\x49\x44" => $x2, "\x64\151\163\x70\x6c\141\x79\137\x6e\x61\x6d\x65" => $cy . "\x20" . $m3));
St3:
goto mmK;
PeA:
wp_update_user(array("\111\104" => $x2, "\144\151\163\160\x6c\141\171\x5f\x6e\141\155\145" => $m3 . "\x20" . $cy));
mmK:
goto ZN9;
gje:
wp_update_user(array("\111\104" => $x2, "\144\x69\x73\x70\x6c\x61\171\137\x6e\141\155\145" => $cy));
ZN9:
goto h_H;
IVV:
wp_update_user(array("\x49\x44" => $x2, "\x64\151\163\x70\x6c\141\171\x5f\x6e\x61\155\145" => $m3));
h_H:
goto U7j;
Zez:
wp_update_user(array("\x49\104" => $x2, "\x64\151\163\x70\154\x61\x79\137\156\x61\155\x65" => $user->user_login));
U7j:
bBr:
if (!get_option("\155\x6f\137\163\141\155\154\x5f\143\165\163\x74\x6f\155\x5f\141\x74\x74\162\x73\x5f\155\141\x70\160\x69\156\x67")) {
goto pmO;
}
$pJ = get_option("\155\x6f\x5f\163\x61\x6d\154\x5f\x63\x75\163\x74\157\x6d\x5f\x61\x74\164\x72\163\137\155\x61\160\x70\151\x6e\x67");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto Aiw;
}
$HY = check_if_default_mapping_required(true, $nR);
if (!$HY) {
goto i_c;
}
$nR = "\104\x45\106\101\125\114\124";
i_c:
if (!array_key_exists($nR, $pJ)) {
goto hk5;
}
foreach ($pJ[$nR] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto SpL;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto HtZ;
}
$F1 = true;
HtZ:
if (!$F1) {
goto fwM;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto gpd;
fwM:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
cnQ:
}
TjD:
update_user_meta($x2, $sv, $qP);
gpd:
SpL:
Gu8:
}
fcX:
hk5:
Aiw:
pmO:
CMx:
OV_:
$user = get_user_by("\151\144", $x2);
if ($user) {
goto vg7;
}
if (!empty($il)) {
goto XZC;
}
wp_redirect(network_home_url());
goto WeW;
XZC:
wp_redirect($il);
WeW:
exit;
vg7:
$wh = get_option("\155\x6f\x5f\x73\x61\x6d\x6c\x5f\x72\145\154\141\x79\137\163\164\x61\x74\x65");
if (!empty($wh)) {
goto aku;
}
if (!empty($il)) {
goto FfU;
}
$ty = $he;
goto k6K;
FfU:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto x2L;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto OlP;
}
$ty = $he;
goto zOX;
OlP:
$ty = $il;
zOX:
goto MCr;
x2L:
$ty = $il;
MCr:
k6K:
goto PNz;
aku:
$ty = $wh;
PNz:
do_action("\155\151\156\151\157\x72\141\x6e\x67\x65\137\x70\x6f\163\164\x5f\141\165\x74\x68\145\x6e\x74\151\x63\x61\x74\145\x5f\x75\163\145\x72\x5f\154\157\147\151\x6e", $user, null, $ty, true);
wp_set_current_user($user->ID);
$oK = false;
$oK = apply_filters("\155\x6f\x5f\162\x65\x6d\x65\155\142\x65\x72\137\x6d\x65", $oK);
do_action("\165\163\145\162\137\162\x65\147\151\163\164\145\162", $user->ID);
wp_set_auth_cookie($user->ID, $oK);
do_action("\x77\x70\137\x6c\x6f\x67\x69\156", $user->user_login, $user);
if (empty($nR)) {
goto Kvo;
}
update_user_meta($x2, "\155\x6f\x5f\163\141\155\x6c\x5f\x6c\x6f\x67\147\x65\144\137\x69\156\x5f\167\x69\164\150\137\151\x64\160", $nR);
Kvo:
if (empty($G6)) {
goto xE5;
}
update_user_meta($x2, "\155\x6f\137\163\x61\155\154\137\163\x65\x73\x73\151\x6f\x6e\137\151\x6e\x64\x65\x78", $G6);
xE5:
if (empty($hn)) {
goto AkQ;
}
update_user_meta($x2, "\x6d\157\x5f\163\x61\155\154\x5f\x6e\141\155\145\x5f\151\x64", $hn);
AkQ:
do_action("\155\157\x5f\x73\x61\155\x6c\x5f\x61\164\164\x72\151\x62\165\164\x65\x73", $WK, $HI, $m3, $cy, $Gf, $Lq, true);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto hfZ;
}
session_start();
hfZ:
$_SESSION["\155\x6f\x5f\163\x61\155\x6c"]["\154\157\147\x67\x65\x64\x5f\x69\156\137\x77\x69\164\150\x5f\151\144\160"] = $nR;
if (empty($G6)) {
goto vLJ;
}
$_SESSION["\x6d\157\x5f\x73\x61\155\x6c"]["\163\145\x73\x73\x69\x6f\156\111\156\144\145\x78"] = $G6;
vLJ:
if (empty($hn)) {
goto o6v;
}
$_SESSION["\x6d\157\x5f\x73\141\x6d\154"]["\156\141\155\145\x49\x64"] = $hn;
o6v:
wp_redirect($ty);
exit;
DzL:
goto bvL;
CBZ:
if (!(strlen($WK) > 60)) {
goto OIt;
}
wp_die("\x57\x65\40\x63\157\x75\x6c\144\x6e\x27\164\40\x73\151\x67\x6e\40\x79\x6f\165\x20\151\156\56\x20\120\x6c\145\x61\163\x65\40\x63\157\156\164\x61\143\x74\x20\171\x6f\165\x72\40\141\x64\155\x69\x6e\151\163\x74\x72\x61\164\x6f\162", "\125\x73\145\x72\x6e\141\x6d\145\x20\x6c\x65\156\147\164\150\40\154\x69\x6d\151\x74\40\162\x65\141\x63\x68\145\x64");
OIt:
$user = get_user_by("\x6c\x6f\x67\151\156", $WK);
$x2 = $user->ID;
$yD = $pi["\151\x64\160\137\x6e\141\x6d\x65"];
$nR = $yD;
do_action("\x6d\157\137\x73\x61\155\154\137\165\x70\x64\x61\x74\x65\137\165\163\145\162\x6e\x61\155\x65", $WK, $yD);
if (empty($m3)) {
goto xEh;
}
wp_update_user(array("\111\104" => $x2, "\146\x69\162\x73\164\137\156\141\x6d\145" => $m3));
xEh:
if (empty($cy)) {
goto rL9;
}
wp_update_user(array("\x49\104" => $x2, "\x6c\x61\163\164\x5f\x6e\141\x6d\145" => $cy));
rL9:
if (empty($HI)) {
goto sZX;
}
wp_update_user(array("\111\104" => $x2, "\165\x73\145\162\x5f\x65\x6d\141\151\x6c" => $HI));
sZX:
if (!get_option("\155\x6f\x5f\163\141\x6d\x6c\x5f\143\165\x73\164\157\x6d\137\x61\x74\164\x72\x73\137\x6d\x61\160\160\x69\x6e\x67")) {
goto Hro;
}
$pJ = get_option("\x6d\x6f\x5f\163\141\x6d\154\137\x63\165\163\164\x6f\155\x5f\x61\164\164\x72\x73\x5f\155\x61\x70\x70\151\156\147");
$pJ = maybe_unserialize($pJ);
if (empty($pJ)) {
goto hT2;
}
$HY = check_if_default_mapping_required(true, $yD);
if (!$HY) {
goto KoL;
}
$yD = "\x44\105\x46\x41\x55\114\124";
KoL:
if (!array_key_exists($yD, $pJ)) {
goto wfF;
}
foreach ($pJ[$yD] as $sv => $y2) {
if (!array_key_exists($y2, $w_)) {
goto ZQx;
}
$F1 = false;
if (!(count($w_[$y2]) == 1)) {
goto gEv;
}
$F1 = true;
gEv:
if (!$F1) {
goto WBW;
}
update_user_meta($x2, $sv, $w_[$y2][0]);
goto Dab;
WBW:
$qP = array();
foreach ($w_[$y2] as $iB) {
array_push($qP, $iB);
QRm:
}
qHG:
update_user_meta($x2, $sv, $qP);
Dab:
ZQx:
JmZ:
}
t7g:
wfF:
hT2:
Hro:
global $wpdb;
$ou = get_option("\x73\x61\x6d\154\x5f\151\144\x70\x5f\162\x6f\154\145\137\155\x61\160\x70\x69\x6e\x67");
$ou = maybe_unserialize($ou);
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto gZd;
}
$yD = "\104\105\x46\101\x55\114\124";
gZd:
if (!(!empty($ou) && !empty($ou[$yD]))) {
goto wIL;
}
$nw = isset($ou[$yD]["\144\x6f\x6e\x74\x5f\141\154\x6c\157\167\137\x75\156\x6c\x69\x73\164\145\x64\x5f\x75\163\145\x72"]) ? $ou[$yD]["\144\157\156\x74\137\141\x6c\154\157\x77\x5f\x75\x6e\154\x69\x73\164\145\144\137\x75\x73\x65\162"] : '';
$D6 = $ou[$yD]["\144\x65\146\x61\165\154\164\x5f\x72\x6f\x6c\x65"];
$RD = isset($ou[$yD]["\144\157\x6e\164\137\x63\x72\145\141\164\145\x5f\165\163\x65\x72"]) ? $ou[$yD]["\144\x6f\156\x74\x5f\143\x72\x65\x61\164\x65\x5f\165\163\145\x72"] : '';
$Zc = isset($ou[$yD]["\x6b\x65\145\x70\x5f\x65\x78\151\x73\x74\151\x6e\147\137\165\163\145\x72\163\137\x72\157\x6c\x65"]) ? $ou[$yD]["\153\145\x65\160\137\145\x78\x69\163\x74\x69\x6e\147\x5f\165\163\145\x72\x73\137\x72\x6f\154\145"] : '';
wIL:
if (isset($Zc) && $Zc == "\x63\x68\145\x63\x6b\145\144") {
goto X2W;
}
$PB = assign_roles_to_user($user, $ou, $yD, $Gf);
goto mCA;
X2W:
$PB = false;
mCA:
if (is_administrator_user($user)) {
goto ew4;
}
if ($PB !== true && !empty($Zc) && $Zc == "\x63\x68\x65\143\x6b\145\144") {
goto iY9;
}
if ($PB !== true && !empty($nw) && $nw == "\x63\150\x65\143\x6b\x65\144") {
goto Pep;
}
if ($PB !== true && !empty($D6)) {
goto IqI;
}
if ($PB !== true) {
goto xGz;
}
goto QyL;
iY9:
wp_update_user(array("\x49\x44" => $x2));
goto QyL;
Pep:
wp_update_user(array("\111\104" => $x2, "\162\157\x6c\145" => false));
goto QyL;
IqI:
wp_update_user(array("\x49\104" => $x2, "\162\157\154\x65" => $D6));
goto QyL;
xGz:
$mR = get_option("\x64\x65\146\141\x75\154\x74\137\x72\x6f\154\145");
wp_update_user(array("\111\x44" => $x2, "\162\x6f\154\145" => $mR));
QyL:
ew4:
if (is_null($w_)) {
goto dIp;
}
update_user_meta($x2, "\155\x6f\137\163\x61\x6d\x6c\137\x75\x73\x65\162\137\141\x74\x74\x72\x69\x62\165\164\145\163", $w_);
if (empty($Ks)) {
goto xNz;
}
if (strcmp($Ks, "\x55\123\105\122\x4e\x41\115\105") == 0) {
goto huz;
}
if (strcmp($Ks, "\x46\x4e\101\115\105") == 0 && !empty($m3)) {
goto ESz;
}
if (strcmp($Ks, "\x4c\x4e\101\x4d\x45") == 0 && !empty($cy)) {
goto c18;
}
if (strcmp($Ks, "\106\116\101\115\105\137\114\x4e\101\x4d\x45") == 0 && !empty($cy) && !empty($m3)) {
goto EzE;
}
if (!(strcmp($Ks, "\114\x4e\x41\115\105\x5f\x46\116\101\x4d\x45") == 0 && !empty($cy) && !empty($m3))) {
goto JeQ;
}
wp_update_user(array("\x49\104" => $x2, "\x64\151\x73\x70\154\x61\x79\137\x6e\141\x6d\145" => $cy . "\x20" . $m3));
JeQ:
goto lTb;
EzE:
wp_update_user(array("\x49\104" => $x2, "\x64\x69\x73\160\154\141\x79\137\x6e\x61\155\145" => $m3 . "\40" . $cy));
lTb:
goto Jr3;
c18:
wp_update_user(array("\x49\104" => $x2, "\144\151\163\160\154\141\x79\x5f\x6e\141\x6d\x65" => $cy));
Jr3:
goto f63;
ESz:
wp_update_user(array("\111\x44" => $x2, "\144\x69\163\160\x6c\141\x79\137\156\x61\x6d\x65" => $m3));
f63:
goto QUL;
huz:
wp_update_user(array("\111\x44" => $x2, "\144\x69\163\160\x6c\x61\171\137\156\141\155\x65" => $user->user_login));
QUL:
xNz:
dIp:
$ty = '';
$wh = get_option("\155\x6f\x5f\x73\x61\x6d\154\x5f\x72\145\154\141\171\x5f\163\164\x61\164\145");
if (!empty($wh)) {
goto Ojy;
}
if (!empty($il)) {
goto O2v;
}
$ty = $he;
goto pdg;
O2v:
if (!filter_var($il, FILTER_VALIDATE_URL)) {
goto hcJ;
}
if (parse_url(home_url(), PHP_URL_HOST) === parse_url($il, PHP_URL_HOST)) {
goto dZa;
}
$ty = $he;
goto ot1;
dZa:
$ty = $il;
ot1:
goto NSL;
hcJ:
$ty = $il;
NSL:
pdg:
goto QwA;
Ojy:
$ty = $wh;
QwA:
do_action("\155\151\x6e\151\x6f\x72\141\156\x67\145\137\160\x6f\163\x74\x5f\141\165\164\150\145\156\x74\x69\x63\x61\x74\x65\x5f\165\x73\145\162\x5f\x6c\157\x67\151\x6e", $user, null, $ty, true);
wp_set_current_user($x2);
$oK = false;
$oK = apply_filters("\155\157\137\x72\145\155\x65\155\142\x65\x72\x5f\x6d\145", $oK);
wp_set_auth_cookie($x2, $oK);
$user = get_user_by("\151\144", $x2);
do_action("\x77\160\x5f\154\x6f\147\x69\x6e", $user->user_login, $user);
if (empty($nR)) {
goto aCU;
}
update_user_meta($x2, "\155\157\x5f\x73\x61\x6d\x6c\x5f\154\x6f\147\147\x65\x64\137\x69\156\137\167\x69\164\150\x5f\151\144\160", $nR);
aCU:
if (empty($G6)) {
goto uoB;
}
update_user_meta($x2, "\x6d\157\x5f\x73\141\x6d\154\x5f\163\x65\163\163\151\x6f\x6e\x5f\x69\x6e\144\x65\170", $G6);
uoB:
if (empty($hn)) {
goto l9Q;
}
update_user_meta($x2, "\x6d\157\137\163\x61\155\154\x5f\x6e\x61\155\145\137\x69\x64", $hn);
l9Q:
do_action("\x6d\x6f\x5f\163\141\x6d\154\137\x61\164\164\x72\x69\142\165\164\x65\163", $WK, $HI, $m3, $cy, $Gf, $Lq);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto nbt;
}
session_start();
nbt:
$_SESSION["\x6d\157\137\163\x61\155\x6c"]["\x6c\x6f\147\x67\145\144\137\151\156\x5f\x77\151\164\150\137\x69\x64\160"] = $nR;
if (empty($G6)) {
goto nvi;
}
$_SESSION["\155\157\137\x73\141\155\154"]["\163\x65\x73\x73\151\157\x6e\x49\x6e\144\x65\x78"] = $G6;
nvi:
if (empty($hn)) {
goto Zaj;
}
$_SESSION["\155\157\x5f\163\x61\155\x6c"]["\x6e\x61\155\x65\x49\144"] = $hn;
Zaj:
wp_redirect($ty);
exit;
bvL:
}
function check_if_user_allowed_to_login_due_to_role_restriction($Gf, $yD)
{
$ou = get_option("\163\141\x6d\154\137\151\x64\160\x5f\x72\x6f\x6c\x65\137\155\141\x70\x70\151\156\x67");
$ou = maybe_unserialize($ou);
$HY = check_if_default_mapping_required(false, $yD);
if (!$HY) {
goto N0c;
}
$yD = "\x44\x45\106\x41\x55\114\x54";
N0c:
if (!(!empty($ou) && array_key_exists($yD, $ou))) {
goto M2w;
}
$jz = isset($ou[$yD]["\x64\157\156\164\x5f\x61\154\154\157\x77\137\x75\163\145\x72\x5f\x74\x6f\154\157\x67\151\156\x5f\x63\x72\x65\141\164\x65\x5f\x77\151\x74\150\137\147\151\166\145\156\137\x67\162\157\165\x70\x73"]) ? $ou[$yD]["\144\157\x6e\164\x5f\x61\154\154\157\x77\x5f\165\x73\145\x72\x5f\164\x6f\154\157\147\x69\156\x5f\x63\x72\x65\x61\164\x65\137\167\151\x74\150\137\x67\x69\x76\x65\156\137\x67\162\157\165\x70\x73"] : '';
if (!($jz == "\143\x68\145\143\153\x65\x64")) {
goto Cdb;
}
if (empty($Gf)) {
goto Nu3;
}
$CK = $ou[$yD]["\155\x6f\x5f\163\141\155\x6c\x5f\162\145\x73\164\x72\x69\143\164\x5f\x75\x73\145\x72\x73\137\x77\151\164\x68\137\147\162\157\165\160\163"];
$LZ = explode("\x3b", $CK);
foreach ($LZ as $MV) {
foreach ($Gf as $Nx) {
$Nx = trim($Nx);
if (!(!empty($Nx) && $Nx == $MV)) {
goto TUn;
}
wp_die("\131\157\165\40\x61\162\145\x20\x6e\x6f\164\40\141\x75\x74\x68\157\x72\151\172\145\144\40\x74\157\x20\154\x6f\147\151\156\56\40\120\x6c\145\x61\x73\x65\40\143\157\156\164\141\x63\164\x20\x79\157\165\x72\x20\x61\x64\155\151\x6e\x69\x73\x74\x72\x61\x74\x6f\162\56", "\105\x72\162\157\x72");
TUn:
V9p:
}
Vn7:
qc0:
}
voD:
Nu3:
Cdb:
M2w:
}
function assign_roles_to_user($user, $ou, $yD, $Gf)
{
$PB = false;
if (!(!empty($Gf) && !empty($ou) && !is_administrator_user($user) && !empty($ou[$yD]))) {
goto iPA;
}
$user->set_role(false);
$G0 = '';
$kO = false;
$cF = $ou[$yD];
unset($cF["\144\x65\146\x61\165\x6c\164\x5f\162\x6f\x6c\x65"]);
unset($cF["\x64\157\x6e\164\137\143\162\145\141\164\x65\137\x75\163\145\x72"]);
unset($cF["\144\157\156\164\x5f\141\x6c\154\x6f\167\x5f\x75\x6e\154\151\x73\164\145\x64\137\165\x73\x65\x72"]);
unset($cF["\155\x6f\x5f\163\141\x6d\154\137\x72\145\x73\164\162\151\143\164\137\x75\163\x65\162\x73\x5f\167\151\x74\150\x5f\147\162\157\x75\160\163"]);
unset($cF["\x6b\x65\x65\x70\x5f\145\x78\x69\x73\x74\x69\x6e\147\137\x75\x73\145\162\x73\137\x72\x6f\x6c\145"]);
unset($cF["\x64\157\156\164\137\141\x6c\x6c\x6f\167\x5f\x75\163\145\x72\x5f\x74\x6f\x6c\157\x67\x69\156\x5f\143\162\145\141\164\145\x5f\x77\151\164\150\x5f\x67\151\166\145\x6e\137\x67\x72\x6f\165\160\x73"]);
foreach ($cF as $G3 => $BG) {
$LZ = explode("\x3b", $BG);
foreach ($LZ as $MV) {
if (!(!empty($MV) and in_array($MV, $Gf))) {
goto r24;
}
$PB = true;
$user->add_role($G3);
r24:
H2h:
}
c02:
hQB:
}
xyI:
iPA:
return $PB;
}
function get_saml_roles_to_assign($ou, $yD, $Gf)
{
$Nr = array();
if (!(!empty($Gf) && !empty($ou) && !empty($ou[$yD]))) {
goto kwp;
}
unset($ou[$yD]["\144\x65\146\x61\x75\x6c\164\137\162\157\x6c\145"]);
unset($ou[$yD]["\144\157\156\x74\137\x63\x72\x65\141\164\145\137\x75\x73\145\x72"]);
unset($ou[$yD]["\144\157\x6e\164\137\141\154\154\x6f\167\x5f\165\156\154\151\x73\164\145\144\137\165\x73\x65\162"]);
unset($ou[$yD]["\155\x6f\137\163\x61\x6d\154\x5f\162\145\163\x74\162\x69\x63\164\137\x75\x73\x65\162\x73\137\x77\151\x74\150\137\147\162\157\x75\160\x73"]);
unset($ou[$yD]["\153\145\x65\160\x5f\x65\170\x69\x73\x74\x69\156\147\x5f\165\x73\x65\162\x73\137\x72\157\x6c\x65"]);
unset($ou[$yD]["\144\x6f\156\x74\137\x61\x6c\x6c\157\167\x5f\165\x73\x65\x72\x5f\164\157\154\x6f\147\151\x6e\137\143\x72\145\141\164\x65\137\167\151\x74\150\x5f\x67\151\166\x65\x6e\x5f\x67\162\157\x75\160\163"]);
foreach ($ou[$yD] as $G3 => $BG) {
$LZ = explode("\73", $BG);
foreach ($LZ as $MV) {
if (!(!empty($MV) && in_array($MV, $Gf))) {
goto Vkf;
}
array_push($Nr, $G3);
Vkf:
CCE:
}
Yle:
mfX:
}
kEj:
kwp:
return $Nr;
}
function show_status_error($Ot, $il, $U1, $LD)
{
if ($il == "\x74\x65\x73\x74\x56\x61\154\x69\x64\141\x74\145") {
goto a43;
}
if ($Ot == "\x52\x65\163\x70\x6f\156\x64\145\x72" || $Ot == "\x52\145\161\165\145\163\164\x65\162") {
goto Y3r;
}
wp_die("\127\x65\40\x63\x6f\x75\x6c\144\x20\x6e\157\164\x20\x73\151\147\x6e\40\x79\157\x75\x20\151\x6e\56\x20\120\154\x65\x61\x73\x65\40\x63\157\156\164\x61\x63\x74\40\171\157\165\x72\40\x41\x64\x6d\x69\156\151\x73\x74\162\141\164\x6f\x72\56", "\105\x72\x72\157\162\x3a\40\x49\156\x76\141\x6c\x69\144\40\x53\101\115\x4c\x20\x52\x65\x73\160\x6f\x6e\163\145\40\x53\164\141\x74\165\163");
goto cPS;
Y3r:
mo_saml_handle_azureb2c_cases($il, $U1, $LD);
cPS:
goto COZ;
a43:
if (!($Ot == "\x52\x65\163\160\x6f\156\144\x65\162")) {
goto AEX;
}
mo_saml_handle_azureb2c_cases($il, $U1, $LD);
AEX:
echo "\x3c\144\x69\x76\40\x73\164\x79\154\x65\75\42\146\157\156\164\x2d\146\141\x6d\151\154\x79\x3a\103\x61\154\x69\142\162\x69\x3b\x70\x61\144\x64\x69\x6e\x67\x3a\60\x20\63\x25\x3b\x22\x3e";
echo "\x3c\x64\151\x76\x20\x73\x74\x79\x6c\145\x3d\42\143\157\x6c\x6f\162\72\40\x23\x61\71\x34\64\64\x32\x3b\x62\x61\x63\x6b\147\x72\157\x75\156\x64\x2d\x63\157\x6c\x6f\162\72\x20\43\146\x32\x64\145\x64\145\x3b\160\141\x64\x64\x69\156\x67\72\x20\x31\x35\160\x78\73\x6d\141\162\147\151\156\55\x62\x6f\164\164\x6f\x6d\x3a\x20\62\60\160\170\73\x74\x65\170\x74\x2d\x61\x6c\x69\x67\x6e\72\143\x65\156\x74\x65\162\73\x62\x6f\162\144\145\162\x3a\61\160\x78\40\x73\x6f\x6c\151\144\40\x23\x45\x36\102\63\102\x32\x3b\x66\157\156\164\x2d\163\x69\x7a\x65\x3a\61\70\x70\x74\73\42\76\x20\x45\x52\x52\117\122\74\57\144\x69\166\x3e\xd\12\x20\x20\x20\40\x20\x20\x20\x20\74\144\x69\166\x20\x73\x74\x79\x6c\x65\75\x22\x63\157\154\x6f\162\x3a\40\43\141\71\x34\64\x34\62\x3b\146\157\x6e\164\55\163\151\172\x65\x3a\61\x34\x70\164\73\40\x6d\141\x72\x67\x69\x6e\55\x62\x6f\164\x74\157\x6d\72\x32\60\160\x78\x3b\42\x3e\74\x70\76\74\163\164\162\x6f\156\x67\x3e\x45\x72\162\157\x72\72\x20\74\x2f\x73\164\162\157\x6e\147\x3e\x20\x49\156\x76\x61\154\x69\x64\40\123\x41\x4d\x4c\40\122\145\x73\x70\x6f\156\x73\x65\40\x53\164\x61\x74\165\163\56\x3c\x2f\160\x3e\xd\xa\x20\40\40\40\40\x20\x20\x20\40\x20\40\x20\74\x70\x3e\74\163\164\162\x6f\156\147\76\103\x61\x75\163\x65\x73\74\x2f\163\164\162\157\156\147\x3e\72\40\111\x64\145\x6e\x74\x69\164\171\x20\x50\x72\x6f\166\x69\144\145\x72\x20\150\141\163\x20\x73\145\156\x74\40\x27" . esc_html($Ot) . "\x27\x20\163\164\141\x74\165\163\x20\x63\x6f\x64\145\40\151\x6e\40\x53\101\x4d\114\x20\122\x65\x73\x70\x6f\x6e\163\x65\x2e\40\x3c\x2f\160\76\xd\xa\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\74\160\x3e\74\x73\164\x72\x6f\x6e\147\x3e\x52\145\141\163\157\x6e\74\57\163\x74\x72\157\156\147\76\72\40" . get_status_message(esc_html($Ot)) . "\74\x2f\x70\76\x3c\x62\162\76";
if (empty($U1)) {
goto kFl;
}
echo "\x3c\x70\x3e\74\163\164\x72\157\x6e\x67\x3e\123\164\141\x74\165\163\x20\x4d\145\x73\x73\141\147\x65\x20\151\x6e\40\x74\x68\145\40\x53\x41\x4d\114\40\x52\145\163\x70\157\x6e\x73\145\72\x3c\57\x73\x74\162\157\x6e\x67\76\40\x3c\142\162\57\76" . esc_html($U1) . "\74\x2f\160\76";
kFl:
if (!($U1 == mo_options_plugin_azureb2c_statusmsg::Forgot)) {
goto fmV;
}
echo "\x3c\x70\76\x50\154\145\x61\163\145\x20\163\x65\164\40\164\150\145\x20\160\x61\163\163\x77\157\162\x64\x20\162\x65\x73\x65\x74\x20\x6c\x69\x6e\153\40\x69\156\x20\x79\157\x75\162\x20\141\172\165\x72\x65\40\142\62\x63\40\x69\144\x70\x20\x63\x6f\156\146\x69\x67\165\x72\141\x74\151\x6f\156\40\163\145\x74\164\151\x6e\x67\x73\56\74\x2f\x70\76\40";
fmV:
echo "\15\12\40\40\40\40\40\x20\40\x20\x3c\57\144\151\x76\x3e\15\12\x20\40\x20\x20\40\40\x20\40\40\x20\x20\40\x3c\x64\x69\166\40\x20\x73\x74\171\x6c\x65\x3d\x22\155\141\162\147\x69\x6e\72\40\x33\45\73\40\x64\151\x73\160\154\x61\171\x3a\40\x62\154\x6f\x63\153\73\x20\x74\145\x78\164\x2d\141\154\x69\x67\156\72\x20\x63\145\x6e\x74\x65\162\73\x22\76\xd\xa\x20\x20\x20\x20\x20\40\x20\40\40\40\40\40\x3c\144\151\x76\40\x20\x73\x74\x79\154\x65\75\x22\155\141\162\147\151\156\72\x20\x33\45\x3b\40\x64\x69\163\160\x6c\x61\x79\72\x20\x62\154\157\143\153\73\x20\164\x65\170\164\55\141\154\x69\x67\156\72\x20\143\145\x6e\x74\x65\162\x3b\x22\x3e\x3c\x69\x6e\x70\x75\x74\40\x73\164\171\x6c\x65\75\42\x70\141\144\x64\151\156\x67\x3a\x31\45\73\x77\151\x64\x74\150\72\x31\x30\x30\160\x78\x3b\142\141\x63\153\x67\162\157\x75\156\144\72\x20\x23\x30\60\x39\61\x43\x44\40\x6e\x6f\156\x65\x20\162\x65\160\x65\141\x74\x20\163\143\x72\157\154\154\x20\x30\x25\40\x30\45\x3b\143\165\162\163\x6f\x72\72\40\160\x6f\151\x6e\x74\145\162\73\146\x6f\156\x74\x2d\x73\x69\172\x65\72\61\65\x70\170\73\x62\157\x72\144\x65\x72\55\x77\151\144\164\150\72\40\61\160\x78\73\142\157\x72\144\145\x72\x2d\163\164\171\154\145\72\40\163\157\154\151\144\73\142\157\162\x64\x65\x72\55\162\x61\x64\x69\165\x73\72\40\63\160\170\73\167\x68\x69\x74\145\55\x73\x70\141\x63\x65\x3a\x20\156\x6f\167\162\x61\160\x3b\142\157\x78\x2d\163\x69\x7a\x69\x6e\x67\x3a\x20\142\157\x72\144\145\162\x2d\x62\x6f\x78\x3b\x62\x6f\x72\x64\x65\x72\x2d\143\x6f\x6c\157\162\x3a\x20\x23\60\x30\67\63\x41\101\73\x62\157\170\55\x73\150\141\x64\x6f\167\72\40\x30\x70\170\40\61\160\170\x20\60\x70\x78\40\162\x67\x62\x61\50\x31\x32\x30\x2c\x20\62\x30\60\x2c\x20\x32\x33\60\54\x20\60\56\x36\x29\40\x69\x6e\x73\145\164\73\143\157\x6c\157\x72\x3a\40\x23\106\106\x46\x3b\42\x74\x79\160\145\x3d\42\x62\x75\164\x74\x6f\156\x22\x20\x76\x61\x6c\x75\x65\x3d\42\x44\x6f\156\145\x22\40\x6f\x6e\103\x6c\x69\143\153\x3d\x22\x73\x65\154\146\56\x63\x6c\157\x73\145\x28\x29\x3b\42\76\74\x2f\x64\151\166\76";
exit;
COZ:
}
function mo_saml_handle_azureb2c_cases($il, $U1, $LD)
{
switch ($U1) {
case mo_options_plugin_azureb2c_statusmsg::Forgot:
mo_saml_paswd_reset_url($LD, $il);
goto E_V;
case mo_options_plugin_azureb2c_statusmsg::Cancel:
mo_saml_azureb2c_cancel_msg_case($il);
case mo_options_plugin_azureb2c_statusmsg::Largeurl:
mo_saml_paswd_reset_large_url_case($il);
exit;
default:
if (!($il != "\x74\145\x73\x74\126\x61\154\x69\144\x61\164\x65")) {
goto G19;
}
wp_die("\x57\145\40\x63\x6f\x75\154\x64\40\x6e\x6f\164\x20\163\x69\147\156\40\x79\157\165\x20\151\156\56\x20\x50\x6c\x65\x61\x73\145\x20\x63\157\x6e\x74\141\x63\x74\x20\171\157\165\162\40\101\144\155\151\156\x69\163\164\162\141\164\x6f\162\x2e", "\105\x72\162\x6f\x72\x3a\40\x49\x6e\x76\x61\154\151\144\40\x53\x41\x4d\114\40\x52\145\163\x70\157\156\163\x65\40\123\x74\x61\164\165\x73");
goto E_V;
G19:
}
oUJ:
E_V:
}
function mo_saml_paswd_reset_url($LD, $il)
{
$Up = $LD;
$KY = !empty($Up["\x73\x61\x6d\154\x5f\160\167\x5f\162\145\x73\145\x74\137\165\x72\154"]) ? html_entity_decode($Up["\163\x61\x6d\154\x5f\160\x77\137\162\x65\163\x65\164\137\x75\162\x6c"]) : '';
if (!empty($KY)) {
goto hab;
}
if (!($il != "\164\x65\x73\x74\x56\141\x6c\151\x64\141\x74\145")) {
goto I3m;
}
wp_die("\127\145\x20\x63\x6f\165\154\144\x20\x6e\x6f\x74\40\x73\x69\147\x6e\40\x79\x6f\165\40\151\156\x2e\x20\120\x6c\145\141\x73\145\40\x63\157\156\164\x61\143\x74\x20\171\x6f\165\162\40\101\144\x6d\151\x6e\x69\163\164\162\x61\x74\x6f\x72\56", "\x45\162\162\x6f\162\x3a\x20\120\141\163\163\167\x6f\162\144\40\x72\x65\x73\x65\164\x20\x55\x52\114\40\151\163\x20\156\x6f\164\x20\143\x6f\x6e\x66\151\147\x75\x72\145\144\x20\x69\156\40\101\172\165\x72\145\x42\x32\x43\x20\143\157\x6e\146\x69\x67\x75\162\x61\x74\x69\157\x6e");
I3m:
goto u7s;
hab:
wp_redirect($KY);
exit;
u7s:
}
function mo_saml_paswd_reset_large_url_case($il)
{
if (!($il != "\164\x65\x73\164\x56\141\154\151\x64\141\x74\145")) {
goto Olo;
}
$ng = parse_url($il);
$il = $ng["\x70\x61\164\x68"];
wp_redirect($il);
Olo:
}
function mo_saml_azureb2c_cancel_msg_case($il)
{
if ($il == "\164\x65\x73\164\x56\x61\x6c\151\x64\141\164\x65") {
goto tDc;
}
wp_redirect($il);
exit;
goto Rzm;
tDc:
wp_redirect(home_url());
exit;
Rzm:
}
function addLink($RM, $wR)
{
$mG = "\x3c\141\40\x68\x72\x65\146\x3d\42" . $wR . "\42\76" . $RM . "\x3c\57\x61\x3e";
return $mG;
}
function get_status_message($Ot)
{
switch ($Ot) {
case "\122\145\x71\x75\145\163\x74\x65\162":
return "\x54\x68\x65\40\162\x65\x71\165\145\163\x74\40\143\157\x75\x6c\144\x20\156\x6f\x74\40\x62\145\x20\160\x65\162\x66\157\x72\155\x65\x64\x20\x64\165\x65\40\x74\x6f\40\x61\156\x20\145\162\x72\x6f\162\x20\x6f\x6e\40\164\150\x65\40\x70\141\162\x74\40\x6f\x66\x20\164\x68\145\x20\x72\x65\x71\x75\x65\x73\164\x65\x72\x2e";
goto c7v;
case "\x52\145\x73\160\x6f\x6e\144\145\x72":
return "\124\x68\145\x20\x72\145\161\x75\145\163\164\40\x63\x6f\x75\154\144\40\156\157\164\40\142\145\x20\x70\145\x72\x66\x6f\x72\x6d\x65\144\40\x64\x75\145\x20\164\157\40\141\156\40\x65\162\x72\x6f\162\40\x6f\156\x20\164\x68\145\x20\160\x61\x72\164\x20\x6f\x66\40\164\150\145\40\123\101\115\x4c\40\x72\145\x73\160\157\156\144\145\162\40\x6f\x72\40\x53\x41\x4d\114\40\x61\165\164\x68\157\162\151\x74\171\x2e";
goto c7v;
case "\x56\145\162\x73\x69\x6f\x6e\115\151\163\155\x61\164\143\x68":
return "\124\x68\x65\x20\123\x41\x4d\x4c\x20\162\145\163\x70\x6f\x6e\x64\x65\162\x20\143\157\165\x6c\x64\x20\156\157\164\x20\x70\x72\x6f\143\x65\x73\163\40\164\x68\x65\x20\x72\x65\161\165\145\x73\164\40\142\145\143\x61\165\163\x65\x20\164\x68\x65\x20\166\145\162\163\x69\157\x6e\40\x6f\146\x20\164\150\145\40\162\145\x71\165\x65\163\x74\x20\155\x65\x73\163\141\x67\x65\40\167\x61\163\x20\151\x6e\143\157\x72\162\145\x63\x74\56";
goto c7v;
default:
return "\125\156\x6b\156\x6f\x77\x6e";
}
Sy2:
c7v:
}
function is_administrator_user($user)
{
$xn = $user->roles;
if (!is_null($xn) && in_array("\x61\x64\155\x69\x6e\151\x73\x74\x72\141\164\157\x72", $xn)) {
goto RCV;
}
return false;
goto G5M;
RCV:
return true;
G5M:
}
function mo_saml_is_customer_registered()
{
$jA = get_option("\x6d\157\x5f\163\x61\155\x6c\137\141\144\155\151\156\x5f\x65\x6d\x61\151\154");
$UU = get_option("\x6d\x6f\x5f\x73\141\155\x6c\137\x61\x64\x6d\151\x6e\137\143\165\163\164\x6f\x6d\145\162\x5f\153\145\x79");
if (!$jA || !$UU || !is_numeric(trim($UU))) {
goto Fhn;
}
return 1;
goto vv1;
Fhn:
return 0;
vv1:
}
function saml_get_referer_page_url()
{
if (!(isset($_SERVER["\x48\124\124\120\137\x52\x45\106\x45\x52\x45\122"]) && !empty($_SERVER["\110\x54\x54\x50\x5f\122\105\x46\105\x52\105\122"]) && $_SERVER["\110\x54\x54\120\x5f\x52\x45\106\x45\122\105\122"] !== "\57")) {
goto Zyv;
}
return $_SERVER["\x48\124\124\120\x5f\x52\105\106\x45\122\x45\x52"];
Zyv:
}
function saml_get_current_page_url()
{
$bd = $_SERVER["\110\124\x54\x50\137\110\x4f\123\124"];
if (!(substr($bd, -1) == "\57")) {
goto LRB;
}
$bd = substr($bd, 0, -1);
LRB:
$BA = $_SERVER["\122\105\x51\x55\x45\123\x54\x5f\125\122\111"];
if (!(substr($BA, 0, 1) == "\57")) {
goto C7X;
}
$BA = substr($BA, 1);
C7X:
$if = isset($_SERVER["\x48\124\x54\x50\123"]) && strcasecmp($_SERVER["\x48\124\x54\x50\123"], "\157\156") == 0;
$p3 = "\150\164\164\x70" . ($if ? "\163" : '') . "\x3a\57\57" . $bd . "\x2f" . $BA;
return $p3;
}
add_action("\167\151\x64\147\x65\x74\x73\137\151\156\x69\164", function () {
register_widget("\x4d\x6f\137\x53\101\x4d\x4c\137\x4c\157\147\x69\156\x5f\x57\151\144\x67\145\164");
});
add_action("\167\160\137\145\x6e\x71\x75\x65\165\145\137\x73\143\162\151\160\164\163", "\160\154\165\147\151\156\x5f\163\x65\x74\x74\151\156\x67\x73\x5f\163\x74\171\x6c\145\x5f\x77\151\x64\x67\x65\x74");
add_action("\x77\x70\x5f\x65\x6e\x71\165\145\x75\x65\137\x73\x63\x72\151\x70\164\x73", "\x70\x6c\165\147\151\x6e\x5f\x73\145\x74\x74\151\156\x67\163\x5f\163\143\x72\151\160\x74\x5f\167\151\144\x67\x65\164");
add_action("\x69\156\x69\164", "\155\157\137\154\x6f\x67\x69\156\x5f\x76\141\x6c\151\x64\141\x74\145");
Function Calls
None |
Stats
MD5 | 4e2c0267ff8de34bbac8092ca491af99 |
Eval Count | 0 |
Decode Time | 152 ms |