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__) . "\57\125\x74\151\154\151\164\x69\x65\x73\56\16..
Decoded Output download
<?php
include_once dirname(__FILE__) . "/Utilities.php";
include_once dirname(__FILE__) . "/Response.php";
include_once dirname(__FILE__) . "/LogoutRequest.php";
require_once dirname(__FILE__) . "/includes/lib/encryption.php";
class mo_login_wid extends WP_Widget
{
public function __construct()
{
$Zi = get_site_option("saml_identity_name");
parent::__construct("Saml_Login_Widget", "Login with " . $Zi, array("description" => __("This is a miniOrange SAML login widget.", "mosaml"), "customize_selective_refresh" => true));
}
public function widget($uv, $Ij)
{
extract($uv);
$LM = apply_filters("widget_title", $Ij["wid_title"]);
echo $uv["before_widget"];
if (empty($LM)) {
goto rb;
}
echo $uv["before_title"] . $LM . $uv["after_title"];
rb:
$this->loginForm();
echo $uv["after_widget"];
}
public function update($oF, $sg)
{
$Ij = array();
$Ij["wid_title"] = strip_tags($oF["wid_title"]);
return $Ij;
}
public function form($Ij)
{
$LM = '';
if (!array_key_exists("wid_title", $Ij)) {
goto qs;
}
$LM = $Ij["wid_title"];
qs:
echo "
<p><label for="" . $this->get_field_id("wid_title") . " ">" . _e("Title:") . " </label>
\x9 <input class="widefat" id="" . $this->get_field_id("wid_title") . "" name="" . $this->get_field_name("wid_title") . "" type="text" value="" . $LM . "" />
</p>";
}
public function loginForm()
{
global $Bu;
if (!is_user_logged_in()) {
goto pt;
}
$current_user = wp_get_current_user();
$Vf = "Hello," . $current_user->display_name;
echo $Vf . " | <a href="" . wp_logout_url(site_url()) . "" title="logout" >Logout</a></li>";
goto yp;
pt:
echo "\xa\x9\x9<script>
\x9\x9function submitSamlForm(){ document.getElementById("login").submit(); }\xa </script>\xa <form name="login" id="login" method="post" action="">
\x9<input type="hidden" name="option" value="saml_user_login" />
\xa\x9\x9<font size="+1" style="vertical-align:top;"> </font>";
$cK = get_site_option("saml_identity_name");
if (!empty($cK)) {
goto iv;
}
echo "Please configure the miniOrange SAML Plugin first.";
goto U7;
iv:
if (get_site_option("mo_saml_enable_cloud_broker") == "false") {
goto vx;
}
echo "<a href="" . get_site_option("mo_saml_host_name") . "/moas/rest/saml/request?id=" . get_site_option("mo_saml_admin_customer_key") . "&returnurl= " . urlencode(site_url() . "/?option=readsamllogin") . "">Login with " . $cK . "</a>";
goto A5;
vx:
echo "<a href="#" onClick="submitSamlForm()">Login with " . $cK . "</a></form>";
A5:
U7:
if ($this->mo_saml_check_empty_or_null_val(get_site_option("mo_saml_redirect_error_code"))) {
goto AV;
}
echo "<div></div><div title="Login Error"><font color="red">We could not sign you in. Please contact your Administrator.</font></div>";
delete_site_option("mo_saml_redirect_error_code");
delete_site_option("mo_saml_redirect_error_reason");
AV:
echo "<a href="http://miniorange.com/wordpress-ldap-login" style="display:none">Login to WordPress using LDAP</a>\xa \x9<a href="http://miniorange.com/cloud-identity-broker-service" style="display:none">Cloud Identity broker service</a>
\x9<a href="http://miniorange.com/strong_auth" style="display:none;"></a>
\x9\x9<a href="http://miniorange.com/single-sign-on-sso" style="display:none;"></a>
\x9 <a href="http://miniorange.com/fraud" style="display:none;"></a>\xa\x9
\x9\x9\x9</ul>
\x9\x9</form>";
yp:
}
public function mo_saml_check_empty_or_null_val($D7)
{
if (!(!isset($D7) || empty($D7))) {
goto kY;
}
return true;
kY:
return false;
}
function mo_saml_logout()
{
if (!is_user_logged_in()) {
goto sT;
}
$bN = get_site_option("saml_logout_url");
$PA = get_site_option("saml_logout_binding_type");
if (empty($bN)) {
goto y9;
}
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto Il;
}
session_start();
Il:
if (isset($_SESSION["mo_saml_logout_request"])) {
goto pb;
}
if (isset($_SESSION["mo_saml"]["logged_in_with_idp"])) {
goto Dz;
}
goto k6;
pb:
self::createLogoutResponseAndRedirect($bN, $PA);
die;
goto k6;
Dz:
unset($_SESSION["mo_saml"]);
$current_user = wp_get_current_user();
$jj = get_user_meta($current_user->ID, "mo_saml_name_id");
$FZ = get_user_meta($current_user->ID, "mo_saml_session_index");
$mC = get_site_option("mo_saml_sp_base_url");
if (!empty($mC)) {
goto Wh;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "/")) {
goto I5;
}
$mC = substr($mC, 0, -1);
I5:
Wh:
$WE = get_site_option("mo_saml_sp_entity_id");
if (!empty($WE)) {
goto zQ;
}
$WE = $mC . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
zQ:
$UU = $bN;
$Ua = site_url() . "/";
$uA = Utilities::createLogoutRequest($jj, $FZ, $WE, $UU, $PA);
if (empty($PA) || $PA == "HttpRedirect") {
goto lm;
}
$lH = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$OK = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
$Rx = Utilities::signXML($uA, $OK, $lH, "NameID");
Utilities::postSAMLRequest($bN, $Rx, $Ua);
goto FT;
lm:
$uA = "SAMLRequest=" . $uA . "&RelayState=" . urlencode($Ua) . "&SigAlg=" . urlencode(XMLSecurityKey::RSA_SHA256);
$sA = array("type" => "private");
$OE = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $sA);
$VS = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$OE->loadKey($VS, TRUE);
$cv = new XMLSecurityDSig();
$si = $OE->signData($uA);
$si = base64_encode($si);
$fD = $bN;
if (strpos($bN, "?") !== false) {
goto c_;
}
$fD .= "?";
goto Q6;
c_:
$fD .= "&";
Q6:
$fD .= $uA . "&Signature=" . urlencode($si);
header("Location: " . $fD);
die;
FT:
k6:
y9:
sT:
}
function createLogoutResponseAndRedirect($bN, $PA)
{
$mC = get_site_option("mo_saml_sp_base_url");
if (!empty($mC)) {
goto B3;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "/")) {
goto Xe;
}
$mC = substr($mC, 0, -1);
Xe:
B3:
$pP = $_SESSION["mo_saml_logout_request"];
$Dl = $_SESSION["mo_saml_logout_relay_state"];
unset($_SESSION["mo_saml_logout_request"]);
unset($_SESSION["mo_saml_logout_relay_state"]);
$vs = new DOMDocument();
$vs->loadXML($pP);
$pP = $vs->firstChild;
if (!($pP->localName == "LogoutRequest")) {
goto ii;
}
$Aw = new SAML2_LogoutRequest($pP);
$WE = get_site_option("mo_saml_sp_entity_id");
if (!empty($WE)) {
goto C1;
}
$WE = $mC . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
C1:
$UU = $bN;
$iS = Utilities::createLogoutResponse($Aw->getId(), $WE, $UU, $PA);
if (empty($PA) || $PA == "HttpRedirect") {
goto nw;
}
$lH = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$OK = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
$Rx = Utilities::signXML($iS, $OK, $lH, "Status");
Utilities::postSAMLResponse($bN, $Rx, $Dl);
goto X7;
nw:
$fD = $bN;
if (strpos($bN, "?") !== false) {
goto mj;
}
$fD .= "?";
goto tK;
mj:
$fD .= "&";
tK:
$fD .= "SAMLResponse=" . $iS . "&RelayState=" . urlencode($Dl);
header("Location: " . $fD);
die;
X7:
ii:
}
}
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 (!mo_saml_is_customer_license_verified()) {
goto ky;
}
if (!(isset($_REQUEST["option"]) && $_REQUEST["option"] == "saml_user_login" || isset($_REQUEST["option"]) && $_REQUEST["option"] == "testConfig")) {
goto P1;
}
if (!(is_user_logged_in() && $_REQUEST["option"] != "testConfig")) {
goto Na;
}
return;
Na:
if (!mo_saml_is_sp_configured()) {
goto BP;
}
$mC = get_site_option("mo_saml_sp_base_url");
if (!empty($mC)) {
goto Df;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "/")) {
goto ZK;
}
$mC = substr($mC, 0, -1);
ZK:
Df:
if ($_REQUEST["option"] == "testConfig") {
goto fA;
}
if (isset($_REQUEST["redirect_to"])) {
goto HD;
}
$Ua = site_url() . "/";
goto j4;
HD:
$Ua = $_REQUEST["redirect_to"];
j4:
goto DI;
fA:
$Ua = "testValidate";
DI:
$hI = get_site_option("saml_login_url");
$LH = get_site_option("saml_login_binding_type");
$qN = get_site_option("mo_saml_force_authentication");
$iV = $mC . "/";
$WE = get_site_option("mo_saml_sp_entity_id");
if (!empty($WE)) {
goto Y5;
}
$WE = $mC . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
Y5:
$uA = Utilities::createAuthnRequest($iV, $WE, $hI, $qN, $LH);
if (empty($LH) || $LH == "HttpRedirect") {
goto RU;
}
$lH = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$OK = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
$Rx = Utilities::signXML($uA, $OK, $lH, "NameIDPolicy");
Utilities::postSAMLRequest($hI, $Rx, $Ua);
goto Iy;
RU:
$uA = "SAMLRequest=" . $uA . "&RelayState=" . urlencode($Ua) . "&SigAlg=" . urlencode(XMLSecurityKey::RSA_SHA256);
$sA = array("type" => "private");
$OE = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $sA);
$VS = plugin_dir_path(__FILE__) . "resources" . DIRECTORY_SEPARATOR . "sp-key.key";
$OE->loadKey($VS, TRUE);
$cv = new XMLSecurityDSig();
$si = $OE->signData($uA);
$si = base64_encode($si);
$fD = $hI;
if (strpos($hI, "?") !== false) {
goto z5;
}
$fD .= "?";
goto G7;
z5:
$fD .= "&";
G7:
$fD .= $uA . "&Signature=" . urlencode($si);
header("Location: " . $fD);
die;
Iy:
BP:
P1:
if (!(array_key_exists("SAMLResponse", $_REQUEST) && !empty($_REQUEST["SAMLResponse"]))) {
goto Br;
}
$mC = get_site_option("mo_saml_sp_base_url");
if (!empty($mC)) {
goto om;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "/")) {
goto y3;
}
$mC = substr($mC, 0, -1);
y3:
om:
$Nf = $_REQUEST["SAMLResponse"];
$Nf = base64_decode($Nf);
if (!(array_key_exists("SAMLResponse", $_GET) && !empty($_GET["SAMLResponse"]))) {
goto m2;
}
$Nf = gzinflate($Nf);
m2:
$vs = new DOMDocument();
$vs->loadXML($Nf);
$Y4 = $vs->firstChild;
if ($Y4->localName == "LogoutResponse") {
goto pz;
}
if (array_key_exists("RelayState", $_POST) && !empty($_POST["RelayState"]) && $_POST["RelayState"] != "/") {
goto DB;
}
$yW = '';
goto ek;
DB:
$yW = $_POST["RelayState"];
ek:
$Me = get_site_option("saml_x509_certificate");
$p8 = XMLSecurityKey::getRawThumbprint($Me);
$iV = $mC . "/";
$Nf = new SAML2_Response($Y4);
$AS = $Nf->getSignatureData();
$KE = current($Nf->getAssertions())->getSignatureData();
$p8 = iconv("UTF-8", "CP1252//IGNORE", $p8);
$p8 = preg_replace("/\s+/", '', $p8);
if (empty($AS)) {
goto tR;
}
$ay = Utilities::processResponse($iV, $p8, $AS, $Nf);
if (!($ay === FALSE)) {
goto kE;
}
echo "Invalid signature in the SAML Response.";
die;
kE:
tR:
if (empty($KE)) {
goto Sb;
}
$ay = Utilities::processResponse($iV, $p8, $KE, $Nf);
if (!($ay === FALSE)) {
goto Rk;
}
echo "Invalid signature in the SAML Assertion.";
die;
Rk:
Sb:
if (!(empty($KE) && empty($AS))) {
goto fC;
}
echo "No signature found in SAML Response or Assertion. Please sign at least one of them.";
die;
fC:
$xJ = get_site_option("saml_issuer");
$WE = get_site_option("mo_saml_sp_entity_id");
if (!empty($WE)) {
goto Yb;
}
$WE = $mC . "/wp-content/plugins/miniorange-saml-20-single-sign-on/";
Yb:
Utilities::validateIssuerAndAudience($Nf, $WE, $xJ);
$Z2 = current(current($Nf->getAssertions())->getNameId());
$Qz = current($Nf->getAssertions())->getAttributes();
$Qz["NameID"] = array("0" => $Z2);
$FZ = current($Nf->getAssertions())->getSessionIndex();
mo_saml_checkMapping($Qz, $yW, $FZ);
goto Lt;
pz:
wp_logout();
header("Location: " . network_site_url());
die;
Lt:
Br:
if (!(array_key_exists("SAMLRequest", $_REQUEST) && !empty($_REQUEST["SAMLRequest"]))) {
goto v1;
}
$uA = $_REQUEST["SAMLRequest"];
$yW = "/";
if (!array_key_exists("RelayState", $_REQUEST)) {
goto yw;
}
$yW = $_REQUEST["RelayState"];
yw:
$uA = base64_decode($uA);
if (!(array_key_exists("SAMLRequest", $_GET) && !empty($_GET["SAMLRequest"]))) {
goto E8;
}
$uA = gzinflate($uA);
E8:
$vs = new DOMDocument();
$vs->loadXML($uA);
$F3 = $vs->firstChild;
if (!($F3->localName == "LogoutRequest")) {
goto Mw;
}
$Aw = new SAML2_LogoutRequest($F3);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto x5;
}
session_start();
x5:
$_SESSION["mo_saml_logout_request"] = $uA;
$_SESSION["mo_saml_logout_relay_state"] = $yW;
wp_logout();
Mw:
v1:
if (!(isset($_REQUEST["option"]) and strpos($_REQUEST["option"], "readsamllogin") !== false)) {
goto iq;
}
require_once dirname(__FILE__) . "/includes/lib/encryption.php";
if (isset($_POST["STATUS"]) && $_POST["STATUS"] == "ERROR") {
goto cb;
}
if (!(isset($_POST["STATUS"]) && $_POST["STATUS"] == "SUCCESS")) {
goto no;
}
$Qu = '';
if (!(isset($_REQUEST["redirect_to"]) && !empty($_REQUEST["redirect_to"]) && $_REQUEST["redirect_to"] != "/")) {
goto up;
}
$Qu = $_REQUEST["redirect_to"];
up:
delete_site_option("mo_saml_redirect_error_code");
delete_site_option("mo_saml_redirect_error_reason");
try {
$sd = get_site_option("saml_am_email");
$e2 = get_site_option("saml_am_username");
$sa = get_site_option("saml_am_first_name");
$zH = get_site_option("saml_am_last_name");
$Ig = get_site_option("saml_am_group_name");
$oM = get_site_option("saml_am_default_user_role");
$QS = get_site_option("saml_am_dont_allow_unlisted_user_role");
$X8 = get_site_option("saml_am_account_matcher");
$bL = '';
$EY = '';
$sa = str_replace(".", "_", $sa);
$sa = str_replace(" ", "_", $sa);
if (!(!empty($sa) && array_key_exists($sa, $_POST))) {
goto Kz;
}
$sa = $_POST[$sa];
Kz:
$zH = str_replace(".", "_", $zH);
$zH = str_replace(" ", "_", $zH);
if (!(!empty($zH) && array_key_exists($zH, $_POST))) {
goto XK;
}
$zH = $_POST[$zH];
XK:
$e2 = str_replace(".", "_", $e2);
$e2 = str_replace(" ", "_", $e2);
if (!empty($e2) && array_key_exists($e2, $_POST)) {
goto pO;
}
$EY = $_POST["NameID"];
goto Xt;
pO:
$EY = $_POST[$e2];
Xt:
$bL = str_replace(".", "_", $sd);
$bL = str_replace(" ", "_", $sd);
if (!empty($sd) && array_key_exists($sd, $_POST)) {
goto Un;
}
$bL = $_POST["NameID"];
goto gd;
Un:
$bL = $_POST[$sd];
gd:
$Ig = str_replace(".", "_", $Ig);
$Ig = str_replace(" ", "_", $Ig);
if (!(!empty($Ig) && array_key_exists($Ig, $_POST))) {
goto FW;
}
$Ig = $_POST[$Ig];
FW:
if (!empty($X8)) {
goto EF;
}
$X8 = "email";
EF:
$OE = get_site_option("mo_saml_customer_token");
if (!(isset($OE) || trim($OE) != '')) {
goto dK;
}
$Wk = AESEncryption::decrypt_data($bL, $OE);
$bL = $Wk;
dK:
if (!(!empty($sa) && !empty($OE))) {
goto ld;
}
$DO = AESEncryption::decrypt_data($sa, $OE);
$sa = $DO;
ld:
if (!(!empty($zH) && !empty($OE))) {
goto Sv;
}
$P6 = AESEncryption::decrypt_data($zH, $OE);
$zH = $P6;
Sv:
if (!(!empty($EY) && !empty($OE))) {
goto gx;
}
$AZ = AESEncryption::decrypt_data($EY, $OE);
$EY = $AZ;
gx:
if (!(!empty($Ig) && !empty($OE))) {
goto vH;
}
$zT = AESEncryption::decrypt_data($Ig, $OE);
$Ig = $zT;
vH:
} catch (Exception $YJ) {
echo sprintf("An error occurred while processing the SAML Response.");
die;
}
$Ow = array($Ig);
mo_saml_login_user($bL, $sa, $zH, $EY, $Ow, $QS, $oM, $Qu, $X8);
no:
goto ty;
cb:
update_site_option("mo_saml_redirect_error_code", $_POST["ERROR_REASON"]);
update_site_option("mo_saml_redirect_error_reason", $_POST["ERROR_MESSAGE"]);
ty:
iq:
ky:
}
function mo_saml_checkMapping($Qz, $yW, $FZ)
{
try {
$sd = get_site_option("saml_am_email");
$e2 = get_site_option("saml_am_username");
$sa = get_site_option("saml_am_first_name");
$zH = get_site_option("saml_am_last_name");
$Ig = get_site_option("saml_am_group_name");
$aP = array();
$aP = get_site_option("saml_am_role_mapping");
$X8 = get_site_option("saml_am_account_matcher");
$bL = '';
$EY = '';
if (empty($Qz)) {
goto fY;
}
if (!empty($sa) && array_key_exists($sa, $Qz)) {
goto T9;
}
$sa = '';
goto Z3;
T9:
$sa = $Qz[$sa][0];
Z3:
if (!empty($zH) && array_key_exists($zH, $Qz)) {
goto ti;
}
$zH = '';
goto B5;
ti:
$zH = $Qz[$zH][0];
B5:
if (!empty($e2) && array_key_exists($e2, $Qz)) {
goto sM;
}
$EY = $Qz["NameID"][0];
goto jw;
sM:
$EY = $Qz[$e2][0];
jw:
if (!empty($sd) && array_key_exists($sd, $Qz)) {
goto FD;
}
$bL = $Qz["NameID"][0];
goto du;
FD:
$bL = $Qz[$sd][0];
du:
if (!empty($Ig) && array_key_exists($Ig, $Qz)) {
goto jd;
}
$Ig = array();
goto on;
jd:
$Ig = $Qz[$Ig];
on:
if (!empty($X8)) {
goto zU;
}
$X8 = "email";
zU:
fY:
if ($yW == "testValidate") {
goto V9;
}
mo_saml_login_user($bL, $sa, $zH, $EY, $Ig, $aP, $yW, $X8, $FZ, $Qz["NameID"][0], $Qz);
goto Aw;
V9:
mo_saml_show_test_result($sa, $zH, $bL, $Ig, $Qz);
Aw:
} catch (Exception $YJ) {
echo sprintf("An error occurred while processing the SAML Response.");
die;
}
}
function mo_saml_show_test_result($sa, $zH, $bL, $Ig, $Qz)
{
echo "<div style="font-family:Calibri;padding:0 3%;">";
if (!empty($bL)) {
goto Dp;
}
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>
\x9\x9<div style="color: #a94442;font-size:14pt; margin-bottom:20px;">WARNING: Some Attributes Did Not Match.</div>
\x9\x9\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 Jg;
Dp:
echo "<div style="color: #3c763d;
\x9\x9 background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>\xa \x9\x9<div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="" . plugin_dir_url(__FILE__) . "images/green_check.png"></div>";
Jg:
echo "<span style="font-size:14pt;"><b>Hello</b>, " . $bL . "</span><br/><p style="font-weight:bold;font-size:14pt;margin-left:1%;">ATTRIBUTES RECEIVED:</p>
\x9 \x9<table style="border-collapse:collapse;border-spacing:0; display:table;width:100%; font-size:14pt;background-color:#EDEDED;">
<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($Qz)) {
goto wE;
}
echo "No Attributes Received.";
goto GR;
wE:
foreach ($Qz as $OE => $D7) {
echo "<tr><td style='font-weight:bold;border:2px solid #949090;padding:2%;'>" . $OE . "</td><td style='padding:2%;border:2px solid #949090; word-wrap:break-word;'>" . implode("<hr/>", $D7) . "</td></tr>";
Wo:
}
IJ:
GR:
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>";
die;
}
function mo_saml_login_user($bL, $sa, $zH, $EY, $Ig, $aP, $yW, $X8, $FZ = '', $jj = '', $Qz = null)
{
$mC = get_site_option("mo_saml_sp_base_url");
global $wpdb;
$l9 = get_current_blog_id();
$v0 = "unchecked";
if (!empty($mC)) {
goto AF;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "/")) {
goto y8;
}
$mC = substr($mC, 0, -1);
y8:
AF:
if ($X8 == "username" && username_exists($EY)) {
goto be;
}
if (email_exists($bL)) {
goto iI;
}
if (!username_exists($EY) && !email_exists($bL)) {
goto Sz;
}
goto kX;
be:
$user = get_user_by("login", $EY);
$jY = $user->ID;
if (empty($sa)) {
goto Dg;
}
$jY = wp_update_user(array("ID" => $jY, "first_name" => $sa));
Dg:
if (empty($zH)) {
goto oW;
}
$jY = wp_update_user(array("ID" => $jY, "last_name" => $zH));
oW:
if (empty($bL)) {
goto n9;
}
$jY = wp_update_user(array("ID" => $jY, "user_email" => $bL));
n9:
$wk = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
foreach ($wk as $blog_id) {
switch_to_blog($blog_id);
$user = get_user_by("id", $jY);
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto Kb;
}
$oM = $aP[$blog_id]["default_role"];
$QS = $aP[$blog_id]["dont_allow_unlisted_user"];
$v0 = $aP[$blog_id]["dont_create_user"];
Kb:
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if (!(!is_administrator_user($user) && !empty($v0) && $v0 == "unchecked")) {
goto XP;
}
if ($PK !== true && !empty($QS) && $QS == "checked") {
goto JE;
}
if ($PK !== true && !empty($oM) && $oM !== "false") {
goto Co;
}
if ($PK !== true && is_user_member_of_blog($jY, $blog_id)) {
goto YP;
}
goto ls;
JE:
$jY = wp_update_user(array("ID" => $jY, "role" => false));
goto ls;
Co:
$jY = wp_update_user(array("ID" => $jY, "role" => $oM));
goto ls;
YP:
$wU = get_option("default_role");
$jY = wp_update_user(array("ID" => $jY, "role" => $wU));
ls:
XP:
Hp:
}
D0:
switch_to_blog($l9);
if (is_null($Qz)) {
goto oG;
}
update_user_meta($jY, "mo_saml_user_attributes", $Qz);
$Y0 = get_site_option("saml_am_display_name");
if (empty($Y0)) {
goto wp;
}
if (strcmp($Y0, "USERNAME") == 0) {
goto f9;
}
if (strcmp($Y0, "FNAME") == 0 && !empty($sa)) {
goto o_;
}
if (strcmp($Y0, "LNAME") == 0 && !empty($zH)) {
goto pM;
}
if (strcmp($Y0, "FNAME_LNAME") == 0 && !empty($zH) && !empty($sa)) {
goto wl;
}
if (!(strcmp($Y0, "LNAME_FNAME") == 0 && !empty($zH) && !empty($sa))) {
goto J0;
}
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH . " " . $sa));
J0:
goto p3;
wl:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa . " " . $zH));
p3:
goto XG;
pM:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH));
XG:
goto vE;
o_:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa));
vE:
goto cN;
f9:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $user->user_login));
cN:
wp:
oG:
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto GP;
}
update_user_meta($jY, "mo_saml_session_index", $FZ);
GP:
if (empty($jj)) {
goto d7;
}
update_user_meta($jY, "mo_saml_name_id", $jj);
d7:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto OG;
}
session_start();
OG:
$_SESSION["mo_saml"]["logged_in_with_idp"] = TRUE;
$Va = get_site_option("mo_saml_relay_state");
if (!empty($Va)) {
goto lB;
}
if (!empty($yW)) {
goto Eq;
}
wp_redirect($mC);
goto tN;
lB:
wp_redirect($Va);
goto tN;
Eq:
wp_redirect($yW);
tN:
die;
goto kX;
iI:
$user = get_user_by("email", $bL);
$jY = $user->ID;
if (empty($sa)) {
goto Z2;
}
$jY = wp_update_user(array("ID" => $jY, "first_name" => $sa));
Z2:
if (empty($zH)) {
goto Ps;
}
$jY = wp_update_user(array("ID" => $jY, "last_name" => $zH));
Ps:
$wk = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
foreach ($wk as $blog_id) {
switch_to_blog($blog_id);
$user = get_user_by("id", $jY);
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto QI;
}
$oM = $aP[$blog_id]["default_role"];
$QS = $aP[$blog_id]["dont_allow_unlisted_user"];
$v0 = $aP[$blog_id]["dont_create_user"];
QI:
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if (!(!is_administrator_user($user) && !empty($v0) && $v0 == "unchecked")) {
goto Hg;
}
if ($PK !== true && !empty($QS) && $QS == "checked") {
goto Q5;
}
if ($PK !== true && !empty($oM) && $oM !== "false") {
goto Mp;
}
if ($PK !== true && is_user_member_of_blog($jY, $blog_id)) {
goto Ur;
}
goto tV;
Q5:
$jY = wp_update_user(array("ID" => $jY, "role" => false));
goto tV;
Mp:
$jY = wp_update_user(array("ID" => $jY, "role" => $oM));
goto tV;
Ur:
$wU = get_option("default_role");
$jY = wp_update_user(array("ID" => $jY, "role" => $wU));
tV:
Hg:
ML:
}
Z_:
switch_to_blog($l9);
if (is_null($Qz)) {
goto I1;
}
update_user_meta($jY, "mo_saml_user_attributes", $Qz);
$Y0 = get_site_option("saml_am_display_name");
if (empty($Y0)) {
goto FY;
}
if (strcmp($Y0, "USERNAME") == 0) {
goto VM;
}
if (strcmp($Y0, "FNAME") == 0 && !empty($sa)) {
goto TS;
}
if (strcmp($Y0, "LNAME") == 0 && !empty($zH)) {
goto Ux;
}
if (strcmp($Y0, "FNAME_LNAME") == 0 && !empty($zH) && !empty($sa)) {
goto TB;
}
if (!(strcmp($Y0, "LNAME_FNAME") == 0 && !empty($zH) && !empty($sa))) {
goto t1;
}
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH . " " . $sa));
t1:
goto zv;
TB:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa . " " . $zH));
zv:
goto qk;
Ux:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH));
qk:
goto sV;
TS:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa));
sV:
goto EN;
VM:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $user->user_login));
EN:
FY:
I1:
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto E1;
}
update_user_meta($jY, "mo_saml_session_index", $FZ);
E1:
if (empty($jj)) {
goto zK;
}
update_user_meta($jY, "mo_saml_name_id", $jj);
zK:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto Cb;
}
session_start();
Cb:
$_SESSION["mo_saml"]["logged_in_with_idp"] = TRUE;
$Va = get_site_option("mo_saml_relay_state");
if (!empty($Va)) {
goto YG;
}
if (!empty($yW)) {
goto X8;
}
wp_redirect($mC);
goto CG;
YG:
wp_redirect($Va);
goto CG;
X8:
wp_redirect($yW);
CG:
die;
goto kX;
Sz:
$wk = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
foreach ($wk as $blog_id) {
$Kw = TRUE;
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto pJ;
}
$oM = $aP[$blog_id]["default_role"];
$QS = $aP[$blog_id]["dont_allow_unlisted_user"];
pJ:
if (!(!empty($aP) && array_key_exists($blog_id, $aP))) {
goto w0;
}
$Bk = get_saml_roles_to_assign($aP, $blog_id, $Ig);
if (!(empty($Bk) && strcmp($aP[$blog_id]["dont_create_user"], "checked") == 0)) {
goto Nd;
}
$Kw = FALSE;
Nd:
w0:
$Jk = get_site_option("enable_saml_sso_for_sites");
if (!(!empty($Jk) && !in_array($blog_id, $Jk))) {
goto Hd;
}
$Kw = FALSE;
Hd:
if (!$Kw) {
goto mr;
}
$jY = NULL;
switch_to_blog($blog_id);
if (email_exists($bL)) {
goto u9;
}
$yB = wp_generate_password(10, false);
if (!empty($EY)) {
goto Gr;
}
$jY = wp_create_user($bL, $yB, $bL);
goto lS;
Gr:
$jY = wp_create_user($EY, $yB, $bL);
lS:
goto NF;
u9:
$user = get_user_by("email", $bL);
$jY = $user->ID;
add_user_to_blog($blog_id, $jY, false);
NF:
$user = get_user_by("id", $jY);
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if ($PK !== true && !empty($QS) && $QS == "checked") {
goto aB;
}
if ($PK !== true && !empty($oM) && $oM !== "false") {
goto eO;
}
if ($PK !== true) {
goto Lv;
}
goto rD;
aB:
$jY = wp_update_user(array("ID" => $jY, "role" => false));
goto rD;
eO:
$jY = wp_update_user(array("ID" => $jY, "role" => $oM));
goto rD;
Lv:
$wU = get_option("default_role");
$jY = wp_update_user(array("ID" => $jY, "role" => $wU));
rD:
$Qx = $user->{$wpdb->prefix . "capabilities"};
if (isset($Y6)) {
goto qz;
}
$Y6 = new WP_Roles();
qz:
if (empty($sa)) {
goto De;
}
$jY = wp_update_user(array("ID" => $jY, "first_name" => $sa));
De:
if (empty($zH)) {
goto W6;
}
$jY = wp_update_user(array("ID" => $jY, "last_name" => $zH));
W6:
if (is_null($Qz)) {
goto wW;
}
update_user_meta($jY, "mo_saml_user_attributes", $Qz);
$Y0 = get_site_option("saml_am_display_name");
if (empty($Y0)) {
goto Rx;
}
if (strcmp($Y0, "USERNAME") == 0) {
goto Wy;
}
if (strcmp($Y0, "FNAME") == 0 && !empty($sa)) {
goto J2;
}
if (strcmp($Y0, "LNAME") == 0 && !empty($zH)) {
goto Sk;
}
if (strcmp($Y0, "FNAME_LNAME") == 0 && !empty($zH) && !empty($sa)) {
goto XJ;
}
if (!(strcmp($Y0, "LNAME_FNAME") == 0 && !empty($zH) && !empty($sa))) {
goto WU;
}
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH . " " . $sa));
WU:
goto Bz;
XJ:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa . " " . $zH));
Bz:
goto F1;
Sk:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $zH));
F1:
goto mu;
J2:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $sa));
mu:
goto ix;
Wy:
$jY = wp_update_user(array("ID" => $jY, "display_name" => $user->user_login));
ix:
Rx:
wW:
mr:
jB:
}
nd:
switch_to_blog($l9);
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto yH;
}
update_user_meta($jY, "mo_saml_session_index", $FZ);
yH:
if (empty($jj)) {
goto tr;
}
update_user_meta($jY, "mo_saml_name_id", $jj);
tr:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto PN;
}
session_start();
PN:
$_SESSION["mo_saml"]["logged_in_with_idp"] = TRUE;
$Va = get_site_option("mo_saml_relay_state");
if (!empty($Va)) {
goto Q9;
}
if (!empty($yW)) {
goto eD;
}
wp_redirect($mC);
goto jn;
Q9:
wp_redirect($Va);
goto jn;
eD:
wp_redirect($yW);
jn:
die;
kX:
}
function check_if_user_allowed_to_login($user, $mC)
{
$jY = $user->ID;
global $wpdb;
if (get_user_meta($jY, "mo_saml_user_type", true)) {
goto Fk;
}
if (get_site_option("mo_saml_usr_lmt")) {
goto LR;
}
update_user_meta($jY, "mo_saml_user_type", "sso_user");
goto x8;
LR:
$OE = get_site_option("mo_saml_customer_token");
$GR = AESEncryption::decrypt_data(get_site_option("mo_saml_usr_lmt"), $OE);
$JA = "SELECT COUNT(*) FROM " . $wpdb->prefix . "usermeta WHERE meta_key='mo_saml_user_type'";
$To = $wpdb->get_var($JA);
if ($To >= $GR) {
goto GE;
}
update_user_meta($jY, "mo_saml_user_type", "sso_user");
goto wV;
GE:
if (get_site_option("user_alert_email_sent")) {
goto BI;
}
$FR = new Customersaml();
$FR->mo_saml_send_user_exceeded_alert_email($GR);
BI:
if (is_administrator_user($user)) {
goto M8;
}
wp_redirect($mC);
die;
goto ya;
M8:
update_user_meta($jY, "mo_saml_user_type", "sso_user");
ya:
wV:
x8:
Fk:
}
function assign_roles_to_user($user, $aP, $blog_id, $Ig)
{
$PK = false;
if (!(!empty($Ig) && !empty($aP) && !is_administrator_user($user) && !empty($aP[$blog_id]) && is_user_member_of_blog($user->ID, $blog_id))) {
goto kW;
}
$user->set_role(false);
$nv = '';
$Sd = false;
unset($aP[$blog_id]["default_role"]);
unset($aP[$blog_id]["dont_create_user"]);
unset($aP[$blog_id]["dont_allow_unlisted_user"]);
foreach ($aP[$blog_id] as $Lr => $oc) {
$KA = explode(";", $oc);
foreach ($KA as $Vm) {
if (!in_array($Vm, $Ig)) {
goto IU;
}
$PK = true;
$user->add_role($Lr);
IU:
Ih:
}
VR:
V4:
}
Q1:
kW:
return $PK;
}
function get_saml_roles_to_assign($aP, $blog_id, $Ig)
{
$Bk = array();
if (!(!empty($Ig) && !empty($aP) && !empty($aP[$blog_id]))) {
goto Cm;
}
unset($aP[$blog_id]["default_role"]);
unset($aP[$blog_id]["dont_create_user"]);
unset($aP[$blog_id]["dont_allow_unlisted_user"]);
foreach ($aP[$blog_id] as $Lr => $oc) {
$KA = explode(";", $oc);
foreach ($KA as $Vm) {
if (!in_array($Vm, $Ig)) {
goto Fu;
}
array_push($Bk, $Lr);
Fu:
lN:
}
Wv:
Wm:
}
Vq:
Cm:
return $Bk;
}
function is_administrator_user($user)
{
$hC = $user->roles;
if (!is_null($hC) && in_array("administrator", $hC)) {
goto n7;
}
return false;
goto gm;
n7:
return true;
gm:
}
function mo_saml_is_customer_registered()
{
$Dv = get_site_option("mo_saml_admin_email");
$Pk = get_site_option("mo_saml_admin_customer_key");
if (!$Dv || !$Pk || !is_numeric(trim($Pk))) {
goto LJ;
}
return 1;
goto r4;
LJ:
return 0;
r4:
}
function mo_saml_is_customer_license_verified()
{
$OE = get_site_option("mo_saml_customer_token");
$pT = AESEncryption::decrypt_data(get_site_option("t_site_status"), $OE);
$w0 = get_site_option("sml_lk");
$Dv = get_site_option("mo_saml_admin_email");
$Pk = get_site_option("mo_saml_admin_customer_key");
$y3 = AESEncryption::decrypt_data(get_site_option("no_sbs"), $OE);
$ID = false;
if (!get_site_option("no_sbs")) {
goto Pq;
}
$Bh = Utilities::get_sites();
$ID = $y3 < count($Bh);
Pq:
if ($pT != "true" && !$w0 || !$Dv || !$Pk || !is_numeric(trim($Pk)) || $ID) {
goto JO;
}
return 1;
goto UW;
JO:
return 0;
UW:
}
add_action("widgets_init", create_function('', "register_widget( "mo_login_wid" );"));
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__) . "\57\125\x74\151\154\151\164\x69\x65\x73\56\160\150\160";
include_once dirname(__FILE__) . "\57\x52\x65\x73\160\157\x6e\x73\x65\x2e\160\150\x70";
include_once dirname(__FILE__) . "\57\x4c\157\147\x6f\x75\x74\122\145\161\165\145\163\164\56\160\x68\160";
require_once dirname(__FILE__) . "\x2f\x69\x6e\143\154\x75\x64\x65\163\57\154\151\x62\57\x65\156\143\162\x79\x70\164\x69\x6f\156\x2e\x70\x68\160";
class mo_login_wid extends WP_Widget
{
public function __construct()
{
$Zi = get_site_option("\x73\x61\155\154\x5f\x69\x64\x65\x6e\164\151\x74\x79\137\x6e\x61\x6d\145");
parent::__construct("\123\x61\x6d\154\x5f\114\x6f\x67\151\156\137\x57\x69\x64\147\145\x74", "\x4c\x6f\x67\x69\x6e\x20\x77\151\164\x68\40" . $Zi, array("\x64\145\163\143\x72\x69\160\164\x69\x6f\x6e" => __("\124\150\x69\x73\x20\x69\163\40\141\40\155\x69\156\x69\x4f\162\x61\156\147\145\x20\x53\101\115\114\40\x6c\157\x67\x69\x6e\x20\167\151\x64\147\x65\164\56", "\x6d\x6f\x73\x61\x6d\154"), "\x63\x75\x73\164\157\155\151\x7a\145\x5f\163\145\154\145\143\164\x69\x76\x65\x5f\162\145\146\162\145\163\150" => true));
}
public function widget($uv, $Ij)
{
extract($uv);
$LM = apply_filters("\167\151\144\x67\145\x74\x5f\164\151\164\x6c\x65", $Ij["\x77\x69\x64\137\x74\x69\x74\x6c\145"]);
echo $uv["\142\x65\x66\x6f\x72\145\x5f\167\x69\x64\x67\x65\164"];
if (empty($LM)) {
goto rb;
}
echo $uv["\142\145\146\157\x72\x65\137\164\x69\164\154\x65"] . $LM . $uv["\x61\146\x74\145\162\137\x74\x69\164\x6c\x65"];
rb:
$this->loginForm();
echo $uv["\x61\x66\x74\x65\162\137\x77\151\x64\147\x65\164"];
}
public function update($oF, $sg)
{
$Ij = array();
$Ij["\167\151\144\x5f\164\x69\x74\x6c\x65"] = strip_tags($oF["\167\x69\144\137\x74\x69\164\154\145"]);
return $Ij;
}
public function form($Ij)
{
$LM = '';
if (!array_key_exists("\167\151\144\x5f\x74\x69\164\154\145", $Ij)) {
goto qs;
}
$LM = $Ij["\x77\151\144\x5f\164\151\x74\x6c\145"];
qs:
echo "\12\11\11\x3c\160\76\x3c\154\x61\x62\x65\x6c\40\146\157\x72\x3d\x22" . $this->get_field_id("\167\x69\144\137\x74\151\164\154\145") . "\40\42\x3e" . _e("\x54\x69\164\154\145\72") . "\x20\74\57\x6c\x61\142\x65\x6c\x3e\12\x9\11\74\151\156\x70\165\164\40\x63\154\141\x73\163\75\x22\x77\x69\144\x65\x66\x61\164\42\x20\151\x64\75\42" . $this->get_field_id("\167\x69\144\x5f\164\x69\x74\x6c\x65") . "\42\x20\156\x61\155\x65\75\x22" . $this->get_field_name("\x77\x69\144\137\164\151\164\x6c\x65") . "\42\40\164\171\160\145\75\x22\164\145\170\164\42\40\166\141\154\165\x65\75\x22" . $LM . "\42\40\57\x3e\12\11\11\x3c\x2f\x70\76";
}
public function loginForm()
{
global $Bu;
if (!is_user_logged_in()) {
goto pt;
}
$current_user = wp_get_current_user();
$Vf = "\110\145\154\154\157\x2c" . $current_user->display_name;
echo $Vf . "\40\x7c\40\x3c\x61\x20\150\162\145\146\75\42" . wp_logout_url(site_url()) . "\42\40\164\x69\164\x6c\145\x3d\42\154\157\147\x6f\x75\164\x22\x20\x3e\x4c\157\x67\157\x75\164\74\x2f\141\76\74\x2f\x6c\151\76";
goto yp;
pt:
echo "\xa\x9\x9\74\163\143\x72\x69\160\x74\x3e\12\x9\x9\x66\x75\x6e\x63\164\x69\157\x6e\x20\x73\x75\x62\155\x69\x74\x53\x61\155\154\x46\157\x72\x6d\50\x29\x7b\x20\144\x6f\143\x75\x6d\145\x6e\x74\56\147\x65\164\105\x6c\145\155\145\156\164\x42\x79\x49\x64\50\x22\154\x6f\147\151\x6e\42\51\x2e\163\165\x62\155\151\x74\50\x29\73\x20\175\xa\11\11\74\x2f\x73\143\162\x69\160\164\76\xa\11\11\74\x66\157\x72\x6d\40\x6e\x61\x6d\x65\x3d\x22\154\x6f\x67\151\x6e\x22\40\x69\144\x3d\x22\154\157\147\x69\x6e\x22\x20\155\x65\164\150\157\144\75\42\160\157\163\164\42\40\x61\143\164\x69\x6f\156\x3d\42\x22\76\12\11\x9\74\151\x6e\x70\x75\x74\x20\x74\x79\x70\x65\x3d\x22\150\x69\144\x64\x65\x6e\42\40\x6e\141\x6d\145\x3d\42\x6f\x70\x74\x69\x6f\156\42\40\x76\141\154\165\x65\x3d\42\163\x61\155\154\137\165\x73\145\162\x5f\x6c\x6f\x67\x69\x6e\x22\x20\57\x3e\12\xa\x9\x9\74\146\x6f\156\164\40\x73\151\x7a\x65\x3d\42\x2b\x31\x22\x20\x73\164\x79\x6c\x65\x3d\x22\166\145\x72\x74\151\x63\141\154\55\x61\x6c\151\147\x6e\x3a\x74\157\x70\73\42\x3e\x20\74\57\x66\157\x6e\x74\76";
$cK = get_site_option("\x73\141\155\154\x5f\x69\144\x65\x6e\164\x69\x74\x79\x5f\156\141\x6d\x65");
if (!empty($cK)) {
goto iv;
}
echo "\120\154\x65\141\x73\x65\40\143\157\156\x66\x69\147\165\162\x65\x20\164\150\145\x20\155\x69\x6e\151\x4f\x72\x61\x6e\x67\x65\40\x53\101\x4d\114\x20\120\154\x75\x67\151\156\40\x66\151\162\163\x74\x2e";
goto U7;
iv:
if (get_site_option("\x6d\x6f\x5f\x73\x61\x6d\x6c\137\145\156\141\x62\154\x65\137\143\x6c\x6f\165\144\137\142\x72\x6f\x6b\x65\x72") == "\x66\141\x6c\163\x65") {
goto vx;
}
echo "\74\x61\40\x68\x72\x65\x66\x3d\x22" . get_site_option("\155\x6f\x5f\163\x61\155\154\137\x68\157\x73\x74\x5f\156\141\155\145") . "\57\155\x6f\x61\x73\x2f\x72\x65\163\x74\x2f\163\x61\155\154\x2f\162\145\161\165\145\163\164\x3f\x69\x64\75" . get_site_option("\x6d\157\x5f\163\141\155\154\x5f\141\144\x6d\151\x6e\x5f\143\x75\x73\x74\x6f\155\145\x72\137\x6b\x65\x79") . "\46\x72\145\x74\165\162\156\165\x72\x6c\75\x20" . urlencode(site_url() . "\57\x3f\x6f\160\164\151\x6f\x6e\75\162\x65\x61\x64\x73\x61\155\154\x6c\157\x67\151\x6e") . "\x22\x3e\114\157\147\151\156\40\167\151\164\x68\40" . $cK . "\x3c\x2f\141\x3e";
goto A5;
vx:
echo "\74\141\x20\150\x72\145\146\x3d\42\43\x22\40\x6f\x6e\103\x6c\x69\x63\x6b\75\x22\x73\x75\x62\x6d\151\x74\123\x61\155\x6c\106\157\x72\155\50\51\42\76\x4c\x6f\147\x69\156\x20\x77\x69\x74\150\x20" . $cK . "\74\57\x61\76\74\57\x66\157\x72\x6d\76";
A5:
U7:
if ($this->mo_saml_check_empty_or_null_val(get_site_option("\155\157\x5f\163\141\x6d\154\137\x72\x65\144\x69\x72\145\143\x74\x5f\145\162\162\157\x72\x5f\143\157\x64\145"))) {
goto AV;
}
echo "\x3c\x64\x69\x76\x3e\74\x2f\x64\151\x76\x3e\x3c\144\x69\166\40\x74\x69\164\x6c\x65\x3d\x22\x4c\x6f\147\x69\156\x20\x45\162\x72\157\162\x22\76\x3c\146\x6f\156\x74\40\143\x6f\x6c\157\162\x3d\42\x72\x65\x64\x22\76\x57\145\40\x63\x6f\x75\x6c\144\x20\x6e\157\x74\40\163\x69\x67\x6e\x20\x79\157\x75\40\151\x6e\x2e\40\120\x6c\145\x61\163\145\x20\x63\157\x6e\x74\x61\143\164\x20\171\x6f\x75\x72\x20\101\144\155\151\x6e\151\163\x74\162\141\x74\x6f\162\56\x3c\57\146\157\x6e\x74\76\74\57\144\151\x76\x3e";
delete_site_option("\155\157\x5f\163\141\155\x6c\137\x72\145\144\151\x72\x65\143\164\x5f\145\x72\x72\x6f\162\137\x63\157\x64\x65");
delete_site_option("\x6d\157\137\x73\x61\155\154\x5f\x72\x65\144\x69\x72\145\143\x74\137\145\162\x72\157\162\x5f\x72\x65\141\163\157\x6e");
AV:
echo "\x3c\x61\x20\150\x72\x65\x66\x3d\x22\150\164\x74\160\x3a\57\57\155\151\x6e\151\x6f\x72\141\156\x67\x65\x2e\143\157\x6d\57\x77\157\x72\144\160\162\x65\x73\x73\55\x6c\x64\x61\160\55\x6c\157\x67\x69\156\x22\40\163\x74\171\x6c\x65\75\x22\144\151\x73\160\x6c\x61\x79\x3a\156\157\x6e\x65\x22\76\114\157\x67\151\x6e\x20\x74\x6f\x20\127\157\x72\x64\x50\x72\145\x73\x73\40\165\x73\x69\156\x67\x20\114\104\x41\120\74\57\x61\x3e\xa\11\x9\74\141\40\x68\162\145\x66\x3d\42\150\164\164\160\x3a\57\57\x6d\151\x6e\x69\x6f\162\141\x6e\x67\145\56\143\x6f\155\x2f\143\154\157\165\x64\x2d\x69\144\x65\156\164\151\x74\x79\x2d\x62\162\157\x6b\x65\162\x2d\x73\x65\162\166\151\x63\x65\x22\x20\163\x74\x79\x6c\145\x3d\42\144\x69\163\x70\x6c\141\171\x3a\x6e\157\156\x65\x22\76\103\x6c\x6f\x75\144\x20\111\144\x65\x6e\164\151\164\171\40\142\162\x6f\x6b\145\x72\x20\x73\145\x72\166\151\x63\x65\74\57\x61\x3e\12\11\x9\x3c\141\x20\150\x72\x65\146\75\42\x68\164\164\x70\72\57\x2f\x6d\151\156\x69\x6f\162\x61\x6e\147\145\x2e\x63\x6f\155\57\x73\x74\x72\x6f\156\x67\137\x61\165\164\150\x22\x20\163\x74\x79\x6c\x65\75\x22\x64\151\163\160\x6c\141\x79\x3a\x6e\157\x6e\x65\x3b\42\x3e\x3c\x2f\141\x3e\12\x9\x9\74\141\40\x68\162\x65\x66\75\42\150\x74\164\160\x3a\x2f\57\155\x69\156\151\x6f\x72\x61\156\x67\145\56\x63\157\155\x2f\x73\151\x6e\147\154\x65\55\163\x69\x67\156\55\157\x6e\55\x73\163\x6f\x22\x20\163\x74\x79\154\x65\75\x22\144\151\163\160\154\x61\x79\x3a\156\x6f\x6e\x65\x3b\x22\76\74\x2f\141\x3e\12\x9\11\74\141\40\150\x72\x65\146\x3d\x22\x68\164\x74\160\x3a\x2f\57\155\x69\x6e\x69\157\162\x61\156\147\x65\x2e\x63\x6f\155\x2f\146\x72\141\165\x64\42\40\163\164\171\x6c\145\75\42\x64\151\163\160\154\141\171\x3a\156\x6f\x6e\x65\73\x22\76\x3c\57\141\76\xa\x9\11\12\x9\x9\x9\74\57\165\154\x3e\12\x9\x9\x3c\57\x66\157\x72\155\76";
yp:
}
public function mo_saml_check_empty_or_null_val($D7)
{
if (!(!isset($D7) || empty($D7))) {
goto kY;
}
return true;
kY:
return false;
}
function mo_saml_logout()
{
if (!is_user_logged_in()) {
goto sT;
}
$bN = get_site_option("\x73\141\155\154\x5f\x6c\157\x67\157\x75\164\x5f\x75\162\x6c");
$PA = get_site_option("\163\141\155\154\137\154\x6f\x67\157\x75\164\x5f\x62\x69\x6e\144\x69\x6e\147\137\x74\x79\160\145");
if (empty($bN)) {
goto y9;
}
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto Il;
}
session_start();
Il:
if (isset($_SESSION["\155\x6f\x5f\x73\x61\x6d\154\137\x6c\x6f\147\157\165\164\x5f\x72\x65\x71\x75\145\x73\x74"])) {
goto pb;
}
if (isset($_SESSION["\x6d\x6f\137\163\x61\155\x6c"]["\x6c\x6f\x67\x67\145\x64\x5f\x69\156\137\x77\x69\x74\x68\x5f\x69\144\160"])) {
goto Dz;
}
goto k6;
pb:
self::createLogoutResponseAndRedirect($bN, $PA);
die;
goto k6;
Dz:
unset($_SESSION["\x6d\157\137\163\x61\155\154"]);
$current_user = wp_get_current_user();
$jj = get_user_meta($current_user->ID, "\x6d\x6f\137\x73\x61\155\x6c\x5f\x6e\141\x6d\145\137\x69\144");
$FZ = get_user_meta($current_user->ID, "\x6d\x6f\137\x73\x61\155\x6c\x5f\x73\145\x73\x73\151\157\156\137\151\156\x64\x65\x78");
$mC = get_site_option("\x6d\x6f\x5f\163\x61\x6d\154\137\163\x70\x5f\x62\141\x73\145\137\x75\x72\154");
if (!empty($mC)) {
goto Wh;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "\x2f")) {
goto I5;
}
$mC = substr($mC, 0, -1);
I5:
Wh:
$WE = get_site_option("\x6d\x6f\x5f\163\x61\x6d\x6c\137\163\160\x5f\145\x6e\164\151\164\x79\x5f\151\144");
if (!empty($WE)) {
goto zQ;
}
$WE = $mC . "\57\x77\160\x2d\143\157\x6e\x74\x65\x6e\164\x2f\160\x6c\x75\147\x69\x6e\x73\x2f\x6d\x69\156\151\157\162\141\156\x67\x65\55\x73\x61\x6d\x6c\55\x32\x30\x2d\163\x69\156\147\x6c\x65\55\x73\x69\x67\x6e\x2d\x6f\156\57";
zQ:
$UU = $bN;
$Ua = site_url() . "\57";
$uA = Utilities::createLogoutRequest($jj, $FZ, $WE, $UU, $PA);
if (empty($PA) || $PA == "\110\x74\x74\x70\x52\145\144\x69\162\x65\x63\164") {
goto lm;
}
$lH = plugin_dir_path(__FILE__) . "\162\x65\163\157\165\x72\143\145\x73" . DIRECTORY_SEPARATOR . "\x73\160\55\x6b\145\171\56\x6b\145\171";
$OK = plugin_dir_path(__FILE__) . "\x72\x65\x73\157\x75\x72\x63\x65\163" . DIRECTORY_SEPARATOR . "\x73\160\x2d\x63\145\162\164\151\146\151\143\x61\164\x65\x2e\x63\162\x74";
$Rx = Utilities::signXML($uA, $OK, $lH, "\x4e\x61\x6d\x65\111\104");
Utilities::postSAMLRequest($bN, $Rx, $Ua);
goto FT;
lm:
$uA = "\x53\101\x4d\x4c\x52\x65\161\x75\x65\x73\164\x3d" . $uA . "\x26\122\x65\x6c\141\171\123\x74\x61\164\x65\x3d" . urlencode($Ua) . "\46\x53\151\x67\101\x6c\147\75" . urlencode(XMLSecurityKey::RSA_SHA256);
$sA = array("\164\x79\x70\145" => "\160\162\x69\x76\x61\164\x65");
$OE = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $sA);
$VS = plugin_dir_path(__FILE__) . "\162\x65\x73\x6f\165\162\143\145\x73" . DIRECTORY_SEPARATOR . "\163\160\55\153\x65\171\x2e\x6b\145\171";
$OE->loadKey($VS, TRUE);
$cv = new XMLSecurityDSig();
$si = $OE->signData($uA);
$si = base64_encode($si);
$fD = $bN;
if (strpos($bN, "\77") !== false) {
goto c_;
}
$fD .= "\77";
goto Q6;
c_:
$fD .= "\46";
Q6:
$fD .= $uA . "\46\123\x69\x67\x6e\141\164\165\x72\145\x3d" . urlencode($si);
header("\114\157\x63\141\164\151\157\x6e\x3a\x20" . $fD);
die;
FT:
k6:
y9:
sT:
}
function createLogoutResponseAndRedirect($bN, $PA)
{
$mC = get_site_option("\155\x6f\x5f\163\x61\x6d\154\137\x73\160\x5f\x62\141\x73\145\x5f\165\x72\x6c");
if (!empty($mC)) {
goto B3;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "\x2f")) {
goto Xe;
}
$mC = substr($mC, 0, -1);
Xe:
B3:
$pP = $_SESSION["\155\x6f\x5f\x73\x61\155\x6c\137\x6c\x6f\x67\157\165\x74\137\162\145\x71\x75\x65\x73\164"];
$Dl = $_SESSION["\x6d\157\x5f\163\141\x6d\x6c\x5f\154\x6f\x67\x6f\x75\164\137\162\x65\154\x61\171\137\x73\164\x61\x74\x65"];
unset($_SESSION["\x6d\157\137\x73\141\155\154\x5f\x6c\157\147\157\x75\x74\137\162\145\161\x75\145\x73\164"]);
unset($_SESSION["\x6d\x6f\x5f\x73\141\155\x6c\x5f\x6c\157\x67\157\165\164\x5f\x72\145\x6c\141\x79\x5f\x73\x74\x61\x74\145"]);
$vs = new DOMDocument();
$vs->loadXML($pP);
$pP = $vs->firstChild;
if (!($pP->localName == "\114\157\x67\x6f\x75\x74\122\x65\x71\x75\145\x73\x74")) {
goto ii;
}
$Aw = new SAML2_LogoutRequest($pP);
$WE = get_site_option("\x6d\x6f\137\163\141\155\154\137\163\160\137\x65\x6e\x74\x69\x74\171\137\x69\144");
if (!empty($WE)) {
goto C1;
}
$WE = $mC . "\x2f\x77\x70\x2d\x63\157\156\x74\145\156\x74\57\160\154\165\147\x69\156\x73\x2f\x6d\x69\156\151\x6f\x72\141\x6e\x67\145\55\x73\x61\155\x6c\x2d\62\60\x2d\x73\151\x6e\x67\x6c\145\55\163\151\x67\x6e\x2d\x6f\x6e\57";
C1:
$UU = $bN;
$iS = Utilities::createLogoutResponse($Aw->getId(), $WE, $UU, $PA);
if (empty($PA) || $PA == "\x48\x74\164\x70\122\145\144\151\x72\x65\x63\164") {
goto nw;
}
$lH = plugin_dir_path(__FILE__) . "\162\x65\x73\x6f\x75\162\x63\x65\163" . DIRECTORY_SEPARATOR . "\x73\160\55\x6b\145\171\x2e\x6b\x65\171";
$OK = plugin_dir_path(__FILE__) . "\162\x65\x73\157\165\162\143\145\x73" . DIRECTORY_SEPARATOR . "\x73\x70\55\143\145\x72\164\151\x66\x69\x63\x61\x74\145\56\x63\x72\x74";
$Rx = Utilities::signXML($iS, $OK, $lH, "\123\x74\141\164\165\x73");
Utilities::postSAMLResponse($bN, $Rx, $Dl);
goto X7;
nw:
$fD = $bN;
if (strpos($bN, "\x3f") !== false) {
goto mj;
}
$fD .= "\x3f";
goto tK;
mj:
$fD .= "\x26";
tK:
$fD .= "\x53\x41\x4d\114\122\145\163\x70\157\156\163\145\75" . $iS . "\x26\x52\x65\x6c\141\x79\123\x74\x61\164\145\x3d" . urlencode($Dl);
header("\114\x6f\x63\x61\164\x69\157\x6e\x3a\40" . $fD);
die;
X7:
ii:
}
}
function plugin_settings_script_widget()
{
wp_enqueue_script("\x6a\161\165\x65\162\171");
wp_enqueue_script("\x6d\157\x5f\163\141\155\x6c\137\141\x64\x6d\151\x6e\137\163\145\164\164\151\156\147\x73\x5f\163\x63\162\151\x70\x74\137\167\x69\144\147\145\x74", plugins_url("\151\x6e\143\x6c\165\144\145\163\x2f\x6a\163\57\x73\x65\164\x74\x69\156\x67\163\x2e\x6a\163", __FILE__));
}
function plugin_settings_style_widget()
{
wp_enqueue_style("\x6d\x6f\x5f\163\x61\155\154\x5f\x61\x64\155\151\156\137\x73\145\x74\x74\151\156\x67\x73\x5f\163\x74\x79\x6c\x65", plugins_url("\x69\156\143\x6c\x75\144\145\163\57\x63\163\163\x2f\152\161\165\x65\x72\x79\56\165\151\x2e\143\163\x73", __FILE__));
}
function mo_login_validate()
{
if (!mo_saml_is_customer_license_verified()) {
goto ky;
}
if (!(isset($_REQUEST["\157\x70\x74\151\157\156"]) && $_REQUEST["\157\160\164\151\x6f\x6e"] == "\163\x61\x6d\154\137\165\x73\145\162\x5f\x6c\157\147\151\156" || isset($_REQUEST["\x6f\160\x74\x69\157\x6e"]) && $_REQUEST["\x6f\160\x74\151\x6f\156"] == "\x74\x65\163\164\x43\x6f\x6e\x66\151\147")) {
goto P1;
}
if (!(is_user_logged_in() && $_REQUEST["\x6f\x70\164\x69\157\156"] != "\164\145\163\164\103\x6f\x6e\146\151\x67")) {
goto Na;
}
return;
Na:
if (!mo_saml_is_sp_configured()) {
goto BP;
}
$mC = get_site_option("\x6d\157\137\x73\141\155\154\137\163\x70\x5f\142\141\x73\145\137\x75\162\154");
if (!empty($mC)) {
goto Df;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "\57")) {
goto ZK;
}
$mC = substr($mC, 0, -1);
ZK:
Df:
if ($_REQUEST["\157\160\x74\151\x6f\x6e"] == "\164\145\x73\164\103\x6f\x6e\x66\x69\x67") {
goto fA;
}
if (isset($_REQUEST["\x72\x65\144\151\162\x65\x63\164\137\164\x6f"])) {
goto HD;
}
$Ua = site_url() . "\x2f";
goto j4;
HD:
$Ua = $_REQUEST["\x72\145\144\151\x72\145\143\x74\137\x74\x6f"];
j4:
goto DI;
fA:
$Ua = "\164\x65\163\164\x56\141\154\x69\x64\x61\164\x65";
DI:
$hI = get_site_option("\163\141\x6d\x6c\x5f\154\x6f\x67\x69\156\x5f\x75\x72\154");
$LH = get_site_option("\163\141\x6d\154\137\x6c\x6f\x67\x69\156\137\142\151\x6e\x64\151\156\x67\137\x74\x79\x70\145");
$qN = get_site_option("\155\x6f\x5f\163\x61\155\154\x5f\x66\157\162\x63\145\x5f\141\165\x74\150\x65\156\x74\x69\143\141\x74\151\x6f\156");
$iV = $mC . "\x2f";
$WE = get_site_option("\155\x6f\137\x73\x61\155\x6c\x5f\163\160\x5f\145\x6e\x74\151\x74\x79\137\x69\144");
if (!empty($WE)) {
goto Y5;
}
$WE = $mC . "\57\167\160\55\143\x6f\x6e\164\145\x6e\x74\x2f\x70\x6c\x75\x67\151\x6e\163\x2f\x6d\x69\x6e\x69\157\162\141\156\x67\145\x2d\x73\x61\155\x6c\x2d\x32\60\55\163\x69\x6e\x67\x6c\145\x2d\x73\x69\147\x6e\x2d\157\156\57";
Y5:
$uA = Utilities::createAuthnRequest($iV, $WE, $hI, $qN, $LH);
if (empty($LH) || $LH == "\110\164\x74\160\x52\145\144\x69\162\x65\x63\x74") {
goto RU;
}
$lH = plugin_dir_path(__FILE__) . "\x72\145\x73\157\x75\x72\143\145\163" . DIRECTORY_SEPARATOR . "\163\x70\x2d\x6b\145\171\x2e\x6b\x65\171";
$OK = plugin_dir_path(__FILE__) . "\162\145\x73\157\x75\x72\143\x65\x73" . DIRECTORY_SEPARATOR . "\163\x70\55\143\145\162\164\151\146\151\143\141\x74\145\x2e\143\162\x74";
$Rx = Utilities::signXML($uA, $OK, $lH, "\116\x61\155\145\111\x44\x50\157\154\x69\x63\x79");
Utilities::postSAMLRequest($hI, $Rx, $Ua);
goto Iy;
RU:
$uA = "\x53\x41\115\114\122\145\x71\165\145\163\x74\75" . $uA . "\x26\x52\145\154\x61\171\x53\x74\x61\164\145\75" . urlencode($Ua) . "\x26\x53\x69\147\x41\x6c\147\x3d" . urlencode(XMLSecurityKey::RSA_SHA256);
$sA = array("\x74\x79\160\x65" => "\160\x72\x69\166\141\x74\x65");
$OE = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, $sA);
$VS = plugin_dir_path(__FILE__) . "\x72\145\x73\157\x75\x72\143\145\x73" . DIRECTORY_SEPARATOR . "\163\x70\x2d\x6b\x65\171\x2e\x6b\145\x79";
$OE->loadKey($VS, TRUE);
$cv = new XMLSecurityDSig();
$si = $OE->signData($uA);
$si = base64_encode($si);
$fD = $hI;
if (strpos($hI, "\x3f") !== false) {
goto z5;
}
$fD .= "\x3f";
goto G7;
z5:
$fD .= "\x26";
G7:
$fD .= $uA . "\x26\x53\151\x67\156\141\x74\x75\162\x65\x3d" . urlencode($si);
header("\x4c\157\x63\x61\164\151\x6f\156\72\x20" . $fD);
die;
Iy:
BP:
P1:
if (!(array_key_exists("\x53\x41\115\x4c\x52\145\163\160\157\x6e\163\x65", $_REQUEST) && !empty($_REQUEST["\x53\x41\x4d\x4c\122\145\163\x70\157\x6e\163\145"]))) {
goto Br;
}
$mC = get_site_option("\155\x6f\x5f\x73\x61\155\x6c\137\x73\160\137\142\141\x73\x65\137\165\x72\x6c");
if (!empty($mC)) {
goto om;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "\57")) {
goto y3;
}
$mC = substr($mC, 0, -1);
y3:
om:
$Nf = $_REQUEST["\x53\101\x4d\x4c\122\145\163\x70\x6f\x6e\x73\x65"];
$Nf = base64_decode($Nf);
if (!(array_key_exists("\x53\101\x4d\114\x52\x65\x73\x70\157\156\163\145", $_GET) && !empty($_GET["\123\x41\115\114\122\x65\x73\160\157\156\163\145"]))) {
goto m2;
}
$Nf = gzinflate($Nf);
m2:
$vs = new DOMDocument();
$vs->loadXML($Nf);
$Y4 = $vs->firstChild;
if ($Y4->localName == "\x4c\157\x67\x6f\165\164\x52\x65\163\x70\x6f\x6e\x73\x65") {
goto pz;
}
if (array_key_exists("\122\x65\154\141\171\x53\164\141\x74\145", $_POST) && !empty($_POST["\x52\x65\x6c\141\171\x53\164\x61\x74\145"]) && $_POST["\x52\x65\x6c\141\x79\x53\x74\141\x74\145"] != "\x2f") {
goto DB;
}
$yW = '';
goto ek;
DB:
$yW = $_POST["\x52\145\154\x61\x79\x53\x74\x61\x74\145"];
ek:
$Me = get_site_option("\x73\141\155\x6c\137\170\65\60\71\137\143\x65\162\x74\151\146\x69\143\141\x74\x65");
$p8 = XMLSecurityKey::getRawThumbprint($Me);
$iV = $mC . "\57";
$Nf = new SAML2_Response($Y4);
$AS = $Nf->getSignatureData();
$KE = current($Nf->getAssertions())->getSignatureData();
$p8 = iconv("\125\124\x46\x2d\x38", "\103\x50\61\62\x35\62\x2f\x2f\x49\x47\116\117\x52\x45", $p8);
$p8 = preg_replace("\57\x5c\x73\53\57", '', $p8);
if (empty($AS)) {
goto tR;
}
$ay = Utilities::processResponse($iV, $p8, $AS, $Nf);
if (!($ay === FALSE)) {
goto kE;
}
echo "\111\x6e\x76\x61\x6c\x69\x64\x20\163\x69\x67\156\x61\164\x75\162\x65\x20\x69\x6e\40\164\x68\145\x20\123\101\115\114\x20\122\x65\x73\160\157\156\163\x65\56";
die;
kE:
tR:
if (empty($KE)) {
goto Sb;
}
$ay = Utilities::processResponse($iV, $p8, $KE, $Nf);
if (!($ay === FALSE)) {
goto Rk;
}
echo "\x49\156\x76\x61\x6c\x69\144\x20\x73\151\x67\156\x61\164\x75\162\x65\40\151\156\x20\164\x68\x65\40\123\101\115\114\x20\101\x73\163\145\162\x74\151\157\x6e\x2e";
die;
Rk:
Sb:
if (!(empty($KE) && empty($AS))) {
goto fC;
}
echo "\x4e\x6f\x20\x73\x69\147\x6e\141\164\165\x72\x65\40\146\157\x75\156\144\40\151\156\x20\x53\x41\x4d\x4c\x20\x52\x65\163\x70\x6f\156\163\x65\x20\157\x72\40\101\163\163\x65\162\164\x69\x6f\x6e\56\x20\x50\x6c\145\x61\163\145\40\x73\151\x67\x6e\x20\x61\164\40\x6c\145\x61\x73\x74\x20\x6f\x6e\x65\40\x6f\146\40\164\150\145\x6d\x2e";
die;
fC:
$xJ = get_site_option("\163\141\155\154\137\151\163\x73\165\145\162");
$WE = get_site_option("\155\x6f\137\163\x61\x6d\x6c\137\163\x70\x5f\x65\156\164\x69\x74\171\137\151\x64");
if (!empty($WE)) {
goto Yb;
}
$WE = $mC . "\x2f\167\160\x2d\143\157\x6e\x74\x65\156\164\57\160\x6c\x75\x67\151\x6e\x73\x2f\x6d\x69\156\151\x6f\162\x61\156\x67\x65\x2d\x73\141\155\x6c\55\62\x30\55\x73\151\156\x67\154\145\x2d\163\x69\x67\156\x2d\157\156\57";
Yb:
Utilities::validateIssuerAndAudience($Nf, $WE, $xJ);
$Z2 = current(current($Nf->getAssertions())->getNameId());
$Qz = current($Nf->getAssertions())->getAttributes();
$Qz["\116\x61\x6d\145\111\104"] = array("\x30" => $Z2);
$FZ = current($Nf->getAssertions())->getSessionIndex();
mo_saml_checkMapping($Qz, $yW, $FZ);
goto Lt;
pz:
wp_logout();
header("\x4c\x6f\x63\x61\164\151\x6f\x6e\x3a\x20" . network_site_url());
die;
Lt:
Br:
if (!(array_key_exists("\123\x41\115\x4c\x52\x65\x71\165\145\x73\164", $_REQUEST) && !empty($_REQUEST["\x53\x41\x4d\114\122\x65\161\x75\x65\163\x74"]))) {
goto v1;
}
$uA = $_REQUEST["\x53\x41\x4d\114\122\x65\161\x75\x65\x73\x74"];
$yW = "\57";
if (!array_key_exists("\x52\145\x6c\x61\171\123\164\x61\x74\145", $_REQUEST)) {
goto yw;
}
$yW = $_REQUEST["\x52\x65\154\141\171\123\x74\x61\164\145"];
yw:
$uA = base64_decode($uA);
if (!(array_key_exists("\x53\101\x4d\114\x52\145\161\x75\145\x73\164", $_GET) && !empty($_GET["\123\x41\115\114\122\x65\161\x75\145\x73\x74"]))) {
goto E8;
}
$uA = gzinflate($uA);
E8:
$vs = new DOMDocument();
$vs->loadXML($uA);
$F3 = $vs->firstChild;
if (!($F3->localName == "\114\157\x67\157\x75\x74\x52\x65\161\x75\x65\x73\x74")) {
goto Mw;
}
$Aw = new SAML2_LogoutRequest($F3);
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto x5;
}
session_start();
x5:
$_SESSION["\155\x6f\x5f\x73\x61\155\x6c\137\x6c\x6f\x67\x6f\x75\164\137\x72\145\x71\165\145\163\x74"] = $uA;
$_SESSION["\x6d\x6f\x5f\163\141\155\x6c\137\154\x6f\147\157\x75\x74\x5f\162\145\154\x61\171\137\x73\164\x61\x74\145"] = $yW;
wp_logout();
Mw:
v1:
if (!(isset($_REQUEST["\157\x70\x74\151\157\x6e"]) and strpos($_REQUEST["\x6f\x70\164\x69\x6f\x6e"], "\x72\x65\x61\144\x73\141\155\x6c\154\157\147\151\156") !== false)) {
goto iq;
}
require_once dirname(__FILE__) . "\x2f\151\x6e\143\x6c\x75\x64\x65\x73\57\x6c\x69\x62\57\145\x6e\143\x72\171\160\164\151\x6f\x6e\56\160\150\160";
if (isset($_POST["\x53\x54\101\x54\x55\x53"]) && $_POST["\x53\124\x41\124\125\123"] == "\105\122\x52\x4f\x52") {
goto cb;
}
if (!(isset($_POST["\123\124\101\124\x55\x53"]) && $_POST["\x53\124\101\x54\x55\123"] == "\x53\x55\x43\x43\105\x53\123")) {
goto no;
}
$Qu = '';
if (!(isset($_REQUEST["\162\x65\x64\x69\x72\145\143\x74\137\x74\157"]) && !empty($_REQUEST["\162\x65\144\x69\x72\145\143\x74\x5f\x74\x6f"]) && $_REQUEST["\162\145\x64\x69\162\x65\143\164\137\164\157"] != "\57")) {
goto up;
}
$Qu = $_REQUEST["\162\145\144\x69\x72\145\143\x74\137\x74\157"];
up:
delete_site_option("\x6d\x6f\137\163\141\x6d\x6c\137\162\145\144\x69\162\145\143\164\x5f\x65\x72\162\x6f\x72\x5f\143\x6f\x64\x65");
delete_site_option("\x6d\157\x5f\163\141\x6d\x6c\x5f\x72\x65\x64\151\162\145\x63\x74\x5f\x65\x72\x72\x6f\162\x5f\162\145\141\x73\157\156");
try {
$sd = get_site_option("\x73\141\x6d\x6c\137\141\155\x5f\145\x6d\141\x69\154");
$e2 = get_site_option("\163\141\x6d\x6c\137\141\x6d\x5f\165\x73\x65\x72\156\x61\155\145");
$sa = get_site_option("\x73\141\155\154\x5f\141\x6d\137\146\x69\162\x73\164\x5f\156\x61\155\x65");
$zH = get_site_option("\163\141\155\154\137\141\x6d\137\x6c\x61\163\x74\x5f\156\x61\x6d\145");
$Ig = get_site_option("\x73\141\155\x6c\137\141\x6d\137\x67\162\157\165\x70\137\x6e\141\x6d\x65");
$oM = get_site_option("\163\x61\x6d\x6c\137\141\x6d\137\x64\145\146\x61\165\x6c\164\137\x75\163\145\x72\137\162\157\x6c\x65");
$QS = get_site_option("\163\x61\x6d\154\137\141\x6d\x5f\x64\x6f\156\x74\x5f\x61\x6c\154\157\167\137\x75\156\x6c\x69\163\x74\x65\144\x5f\x75\x73\x65\x72\x5f\162\x6f\154\145");
$X8 = get_site_option("\x73\x61\155\x6c\137\x61\155\137\x61\143\143\x6f\165\156\x74\137\x6d\x61\164\143\x68\145\x72");
$bL = '';
$EY = '';
$sa = str_replace("\x2e", "\x5f", $sa);
$sa = str_replace("\40", "\137", $sa);
if (!(!empty($sa) && array_key_exists($sa, $_POST))) {
goto Kz;
}
$sa = $_POST[$sa];
Kz:
$zH = str_replace("\x2e", "\x5f", $zH);
$zH = str_replace("\40", "\x5f", $zH);
if (!(!empty($zH) && array_key_exists($zH, $_POST))) {
goto XK;
}
$zH = $_POST[$zH];
XK:
$e2 = str_replace("\56", "\137", $e2);
$e2 = str_replace("\40", "\x5f", $e2);
if (!empty($e2) && array_key_exists($e2, $_POST)) {
goto pO;
}
$EY = $_POST["\116\x61\x6d\x65\111\104"];
goto Xt;
pO:
$EY = $_POST[$e2];
Xt:
$bL = str_replace("\56", "\x5f", $sd);
$bL = str_replace("\40", "\137", $sd);
if (!empty($sd) && array_key_exists($sd, $_POST)) {
goto Un;
}
$bL = $_POST["\x4e\141\155\x65\x49\x44"];
goto gd;
Un:
$bL = $_POST[$sd];
gd:
$Ig = str_replace("\x2e", "\x5f", $Ig);
$Ig = str_replace("\40", "\x5f", $Ig);
if (!(!empty($Ig) && array_key_exists($Ig, $_POST))) {
goto FW;
}
$Ig = $_POST[$Ig];
FW:
if (!empty($X8)) {
goto EF;
}
$X8 = "\145\x6d\x61\151\x6c";
EF:
$OE = get_site_option("\x6d\x6f\137\x73\x61\155\x6c\137\143\x75\x73\164\157\155\x65\x72\x5f\x74\157\153\145\x6e");
if (!(isset($OE) || trim($OE) != '')) {
goto dK;
}
$Wk = AESEncryption::decrypt_data($bL, $OE);
$bL = $Wk;
dK:
if (!(!empty($sa) && !empty($OE))) {
goto ld;
}
$DO = AESEncryption::decrypt_data($sa, $OE);
$sa = $DO;
ld:
if (!(!empty($zH) && !empty($OE))) {
goto Sv;
}
$P6 = AESEncryption::decrypt_data($zH, $OE);
$zH = $P6;
Sv:
if (!(!empty($EY) && !empty($OE))) {
goto gx;
}
$AZ = AESEncryption::decrypt_data($EY, $OE);
$EY = $AZ;
gx:
if (!(!empty($Ig) && !empty($OE))) {
goto vH;
}
$zT = AESEncryption::decrypt_data($Ig, $OE);
$Ig = $zT;
vH:
} catch (Exception $YJ) {
echo sprintf("\x41\156\40\x65\x72\x72\157\x72\x20\157\x63\x63\165\x72\x72\145\x64\x20\167\x68\151\154\x65\40\x70\x72\x6f\143\145\x73\163\151\x6e\147\40\x74\150\x65\x20\123\101\115\114\40\x52\145\163\160\157\156\163\145\56");
die;
}
$Ow = array($Ig);
mo_saml_login_user($bL, $sa, $zH, $EY, $Ow, $QS, $oM, $Qu, $X8);
no:
goto ty;
cb:
update_site_option("\x6d\x6f\x5f\x73\141\x6d\154\x5f\x72\x65\144\x69\162\145\x63\x74\137\145\162\162\x6f\162\137\x63\x6f\x64\x65", $_POST["\x45\x52\x52\117\122\137\122\105\x41\x53\x4f\116"]);
update_site_option("\155\157\x5f\x73\x61\x6d\x6c\x5f\162\145\144\x69\162\x65\x63\164\x5f\x65\x72\162\x6f\162\137\162\x65\x61\x73\157\156", $_POST["\105\x52\122\117\122\137\x4d\105\x53\x53\x41\x47\105"]);
ty:
iq:
ky:
}
function mo_saml_checkMapping($Qz, $yW, $FZ)
{
try {
$sd = get_site_option("\x73\141\155\154\137\x61\155\x5f\145\155\x61\151\154");
$e2 = get_site_option("\163\x61\155\x6c\x5f\141\x6d\x5f\165\163\x65\162\156\141\155\145");
$sa = get_site_option("\163\x61\155\x6c\137\141\x6d\137\x66\x69\162\163\164\137\x6e\x61\x6d\145");
$zH = get_site_option("\163\x61\x6d\x6c\137\x61\x6d\137\154\141\x73\x74\137\156\141\x6d\145");
$Ig = get_site_option("\x73\141\x6d\x6c\137\x61\x6d\x5f\147\162\x6f\165\x70\x5f\x6e\x61\x6d\x65");
$aP = array();
$aP = get_site_option("\x73\141\x6d\x6c\137\141\x6d\137\x72\157\154\x65\137\x6d\x61\x70\x70\x69\x6e\x67");
$X8 = get_site_option("\163\x61\x6d\x6c\137\x61\x6d\137\141\x63\143\157\x75\156\x74\137\155\x61\164\143\150\145\x72");
$bL = '';
$EY = '';
if (empty($Qz)) {
goto fY;
}
if (!empty($sa) && array_key_exists($sa, $Qz)) {
goto T9;
}
$sa = '';
goto Z3;
T9:
$sa = $Qz[$sa][0];
Z3:
if (!empty($zH) && array_key_exists($zH, $Qz)) {
goto ti;
}
$zH = '';
goto B5;
ti:
$zH = $Qz[$zH][0];
B5:
if (!empty($e2) && array_key_exists($e2, $Qz)) {
goto sM;
}
$EY = $Qz["\116\x61\155\145\111\104"][0];
goto jw;
sM:
$EY = $Qz[$e2][0];
jw:
if (!empty($sd) && array_key_exists($sd, $Qz)) {
goto FD;
}
$bL = $Qz["\x4e\x61\155\x65\x49\x44"][0];
goto du;
FD:
$bL = $Qz[$sd][0];
du:
if (!empty($Ig) && array_key_exists($Ig, $Qz)) {
goto jd;
}
$Ig = array();
goto on;
jd:
$Ig = $Qz[$Ig];
on:
if (!empty($X8)) {
goto zU;
}
$X8 = "\145\155\x61\x69\154";
zU:
fY:
if ($yW == "\x74\145\163\x74\126\141\154\x69\144\141\x74\145") {
goto V9;
}
mo_saml_login_user($bL, $sa, $zH, $EY, $Ig, $aP, $yW, $X8, $FZ, $Qz["\x4e\x61\x6d\145\111\104"][0], $Qz);
goto Aw;
V9:
mo_saml_show_test_result($sa, $zH, $bL, $Ig, $Qz);
Aw:
} catch (Exception $YJ) {
echo sprintf("\x41\156\x20\x65\x72\x72\157\162\x20\157\143\143\x75\162\x72\145\144\40\167\150\151\x6c\x65\40\160\x72\157\143\x65\x73\163\x69\x6e\x67\x20\164\150\145\40\x53\x41\x4d\x4c\x20\122\x65\x73\x70\157\156\x73\x65\56");
die;
}
}
function mo_saml_show_test_result($sa, $zH, $bL, $Ig, $Qz)
{
echo "\x3c\x64\151\x76\40\x73\x74\x79\154\145\x3d\42\x66\x6f\x6e\164\x2d\x66\141\x6d\151\x6c\x79\x3a\x43\x61\x6c\x69\142\x72\x69\x3b\160\x61\144\x64\x69\x6e\x67\72\x30\x20\x33\x25\73\x22\76";
if (!empty($bL)) {
goto Dp;
}
echo "\x3c\144\151\x76\40\x73\x74\171\154\x65\x3d\42\x63\157\154\x6f\162\72\40\x23\x61\71\64\x34\64\62\x3b\x62\141\143\153\147\x72\157\x75\156\x64\x2d\143\x6f\x6c\157\x72\72\x20\x23\146\62\x64\145\144\x65\x3b\160\141\144\144\x69\156\x67\x3a\40\61\x35\x70\170\73\x6d\141\162\147\x69\156\55\x62\157\x74\x74\157\155\72\x20\62\60\160\x78\x3b\x74\x65\170\x74\x2d\x61\x6c\151\147\x6e\x3a\143\x65\x6e\164\145\162\73\x62\x6f\162\x64\x65\x72\72\x31\x70\170\40\163\157\x6c\151\x64\x20\x23\x45\66\x42\63\x42\62\x3b\x66\x6f\x6e\x74\55\x73\151\x7a\x65\x3a\61\70\x70\164\x3b\x22\76\x54\105\x53\124\40\106\x41\111\x4c\x45\x44\74\x2f\x64\151\x76\76\12\11\11\x9\x9\x3c\x64\x69\166\40\x73\164\x79\154\x65\75\42\143\x6f\x6c\157\x72\x3a\40\43\141\71\x34\x34\64\62\73\x66\x6f\x6e\164\x2d\x73\151\x7a\145\72\x31\x34\x70\x74\73\40\x6d\x61\x72\147\x69\x6e\x2d\142\157\164\164\x6f\155\x3a\62\x30\160\x78\x3b\x22\76\127\x41\122\116\111\116\107\x3a\40\x53\x6f\x6d\145\x20\101\164\164\162\x69\142\x75\x74\x65\x73\40\104\x69\x64\40\x4e\157\164\x20\x4d\x61\x74\143\x68\56\74\x2f\x64\151\166\76\12\11\x9\x9\x9\74\x64\x69\166\x20\x73\164\171\x6c\145\x3d\42\144\x69\163\x70\154\141\171\x3a\x62\x6c\x6f\143\153\x3b\164\145\170\x74\x2d\141\154\x69\147\156\72\x63\145\156\164\145\162\x3b\x6d\141\x72\x67\x69\x6e\55\x62\x6f\164\164\x6f\x6d\x3a\64\x25\x3b\42\x3e\74\x69\155\147\x20\x73\x74\x79\154\x65\x3d\42\x77\x69\144\164\150\72\x31\x35\x25\x3b\42\163\162\x63\75\x22" . plugin_dir_url(__FILE__) . "\151\x6d\x61\x67\145\x73\x2f\x77\x72\x6f\156\x67\56\x70\x6e\x67\42\76\74\57\x64\x69\166\76";
goto Jg;
Dp:
echo "\x3c\144\151\x76\x20\x73\164\171\154\x65\75\42\143\157\x6c\157\x72\x3a\40\x23\x33\x63\67\66\63\144\x3b\12\11\x9\x9\11\x62\x61\x63\x6b\x67\162\157\165\156\x64\x2d\x63\157\154\157\162\x3a\x20\x23\x64\x66\x66\60\144\x38\x3b\40\160\141\144\144\151\x6e\x67\72\62\45\x3b\x6d\141\x72\x67\x69\156\55\142\x6f\x74\164\157\155\72\62\60\160\170\x3b\164\145\x78\x74\55\141\x6c\x69\147\x6e\x3a\x63\x65\x6e\x74\145\x72\73\x20\x62\x6f\162\x64\x65\162\x3a\61\160\170\x20\x73\157\154\151\x64\x20\x23\x41\105\104\102\71\x41\x3b\x20\146\x6f\156\x74\55\x73\151\172\145\x3a\x31\x38\x70\164\73\x22\x3e\x54\105\123\x54\x20\x53\125\103\x43\105\123\123\106\x55\114\74\57\144\151\x76\x3e\xa\11\11\x9\x9\74\x64\151\x76\x20\163\164\x79\154\145\75\x22\x64\151\x73\160\x6c\x61\171\x3a\142\154\157\143\x6b\73\164\x65\x78\164\x2d\141\x6c\x69\147\156\72\143\145\x6e\164\x65\x72\73\155\x61\162\147\151\x6e\x2d\142\x6f\x74\x74\157\155\72\64\45\x3b\42\x3e\x3c\151\155\147\40\x73\164\x79\154\x65\x3d\42\x77\151\x64\164\150\x3a\x31\65\x25\x3b\x22\163\x72\143\75\42" . plugin_dir_url(__FILE__) . "\x69\155\x61\x67\145\163\57\147\162\145\145\156\x5f\x63\x68\145\x63\153\56\x70\x6e\x67\x22\76\x3c\57\144\x69\x76\x3e";
Jg:
echo "\74\x73\160\141\x6e\x20\163\164\171\x6c\x65\75\x22\x66\157\x6e\164\x2d\x73\x69\x7a\145\72\61\x34\160\164\73\42\76\74\x62\76\x48\145\154\154\157\74\x2f\142\x3e\54\x20" . $bL . "\74\x2f\163\160\141\x6e\76\x3c\142\x72\57\x3e\x3c\160\40\163\164\171\154\x65\75\x22\x66\157\x6e\164\x2d\167\x65\x69\x67\150\x74\x3a\142\157\x6c\x64\x3b\146\157\x6e\x74\x2d\x73\x69\172\145\72\61\x34\x70\x74\x3b\x6d\141\x72\147\151\x6e\55\x6c\145\x66\164\72\x31\45\73\42\76\101\124\124\122\x49\102\x55\x54\105\123\x20\122\x45\x43\x45\111\x56\105\x44\72\x3c\57\160\x3e\12\x9\11\11\x9\74\x74\x61\x62\x6c\145\x20\x73\164\171\x6c\145\75\x22\x62\x6f\x72\144\x65\x72\55\x63\157\154\154\x61\x70\x73\145\x3a\x63\x6f\x6c\154\x61\x70\x73\145\x3b\142\157\x72\x64\x65\162\x2d\x73\160\141\143\151\156\x67\x3a\x30\x3b\x20\144\151\x73\160\154\141\171\72\164\x61\x62\x6c\x65\73\x77\x69\x64\164\x68\72\61\60\60\x25\x3b\40\146\x6f\x6e\164\55\163\x69\x7a\145\x3a\61\64\160\164\x3b\142\x61\x63\x6b\x67\162\157\165\x6e\144\x2d\x63\157\x6c\157\x72\72\x23\x45\104\105\x44\105\104\73\42\76\12\11\11\11\11\x3c\164\162\x20\163\x74\171\x6c\145\x3d\x22\x74\x65\x78\164\x2d\141\154\151\x67\x6e\72\143\x65\x6e\x74\x65\162\73\42\76\74\164\144\x20\x73\164\171\x6c\x65\x3d\42\146\x6f\x6e\164\55\167\145\151\147\150\164\x3a\x62\157\x6c\144\73\142\x6f\162\144\145\x72\72\x32\160\x78\x20\163\x6f\x6c\x69\144\x20\x23\x39\64\71\x30\71\60\x3b\x70\x61\144\144\151\x6e\147\x3a\62\x25\73\x22\x3e\x41\x54\x54\x52\111\x42\125\x54\x45\x20\x4e\x41\115\105\74\x2f\164\144\76\x3c\x74\144\40\163\x74\x79\x6c\145\x3d\42\x66\157\x6e\x74\x2d\x77\145\151\147\x68\x74\72\142\157\154\144\x3b\160\x61\x64\x64\151\156\147\x3a\62\x25\x3b\142\x6f\x72\x64\145\x72\x3a\x32\160\170\x20\x73\157\154\x69\x64\x20\43\71\x34\71\x30\x39\x30\x3b\40\x77\157\x72\x64\x2d\167\x72\141\160\72\142\x72\145\x61\153\55\167\x6f\x72\144\x3b\x22\76\101\x54\x54\122\x49\102\x55\x54\x45\x20\126\101\x4c\x55\x45\74\57\164\144\76\74\57\x74\x72\76";
if (!empty($Qz)) {
goto wE;
}
echo "\116\x6f\x20\x41\x74\x74\162\x69\142\165\x74\x65\163\x20\122\145\143\145\151\x76\x65\x64\56";
goto GR;
wE:
foreach ($Qz as $OE => $D7) {
echo "\74\164\162\76\74\164\x64\40\x73\164\171\x6c\145\75\x27\x66\157\156\164\55\x77\145\x69\x67\150\x74\72\x62\157\x6c\144\73\142\157\162\x64\145\x72\x3a\62\160\170\x20\x73\x6f\x6c\x69\144\40\x23\x39\x34\x39\60\71\60\73\160\x61\x64\x64\x69\156\147\72\x32\x25\73\x27\x3e" . $OE . "\74\x2f\164\x64\x3e\74\164\x64\x20\x73\164\x79\154\x65\x3d\x27\160\x61\x64\144\151\x6e\x67\x3a\62\x25\73\142\x6f\162\x64\x65\162\72\x32\x70\170\x20\x73\157\x6c\151\144\40\43\71\64\71\x30\x39\x30\x3b\x20\x77\157\x72\144\x2d\167\x72\x61\160\x3a\x62\x72\145\x61\153\55\x77\157\x72\144\x3b\x27\x3e" . implode("\x3c\x68\x72\x2f\x3e", $D7) . "\x3c\x2f\164\x64\76\x3c\x2f\164\162\x3e";
Wo:
}
IJ:
GR:
echo "\74\57\164\x61\142\154\x65\76\x3c\57\144\x69\x76\76";
echo "\x3c\144\x69\166\x20\x73\164\171\154\x65\75\42\155\141\162\147\x69\x6e\72\x33\45\x3b\144\x69\x73\x70\154\x61\x79\x3a\142\x6c\157\143\153\x3b\x74\145\170\164\55\x61\x6c\151\x67\x6e\x3a\143\x65\156\164\145\x72\73\42\x3e\74\151\x6e\160\165\x74\x20\163\x74\x79\x6c\x65\75\x22\160\x61\x64\144\x69\156\x67\72\61\45\73\167\151\x64\x74\150\x3a\x31\x30\x30\x70\170\x3b\x62\141\x63\153\x67\x72\157\165\156\144\x3a\40\43\x30\60\71\61\103\x44\x20\x6e\157\156\145\x20\162\145\x70\145\x61\x74\x20\163\143\x72\x6f\x6c\x6c\40\x30\x25\x20\60\45\73\143\165\162\x73\157\x72\72\x20\x70\x6f\x69\156\164\145\x72\x3b\146\157\156\x74\x2d\x73\151\172\x65\x3a\x31\x35\x70\170\x3b\142\157\x72\144\145\162\55\x77\151\x64\x74\150\x3a\40\x31\160\170\73\x62\157\x72\x64\145\x72\55\x73\164\171\x6c\145\72\40\x73\157\x6c\x69\x64\73\142\157\x72\144\145\x72\55\x72\141\144\151\x75\x73\72\x20\63\160\170\x3b\167\x68\151\164\x65\55\163\x70\141\x63\x65\72\40\x6e\157\x77\162\141\x70\73\142\x6f\170\x2d\163\x69\x7a\151\x6e\147\x3a\40\142\x6f\162\x64\145\x72\55\x62\157\170\73\x62\157\x72\144\145\x72\55\x63\157\154\x6f\162\72\40\43\x30\60\67\63\x41\101\x3b\142\157\170\55\x73\150\x61\144\x6f\167\x3a\40\60\x70\x78\40\x31\160\x78\x20\60\x70\170\40\162\147\x62\x61\50\61\62\60\54\x20\x32\60\x30\x2c\40\x32\63\x30\54\x20\60\x2e\x36\x29\x20\151\156\163\145\164\x3b\143\157\x6c\x6f\162\x3a\40\43\106\106\106\x3b\x22\164\x79\160\x65\x3d\42\x62\165\x74\164\157\x6e\x22\40\166\x61\x6c\165\x65\75\x22\104\x6f\x6e\x65\42\40\157\x6e\x43\154\151\143\x6b\75\42\163\145\x6c\x66\x2e\143\154\x6f\x73\145\x28\x29\73\42\76\74\x2f\144\151\166\76";
die;
}
function mo_saml_login_user($bL, $sa, $zH, $EY, $Ig, $aP, $yW, $X8, $FZ = '', $jj = '', $Qz = null)
{
$mC = get_site_option("\155\157\137\163\141\x6d\154\x5f\163\160\x5f\x62\141\x73\145\x5f\x75\162\x6c");
global $wpdb;
$l9 = get_current_blog_id();
$v0 = "\x75\x6e\143\x68\x65\143\x6b\x65\144";
if (!empty($mC)) {
goto AF;
}
$mC = network_site_url();
if (!(substr($mC, -1) == "\57")) {
goto y8;
}
$mC = substr($mC, 0, -1);
y8:
AF:
if ($X8 == "\165\163\145\162\x6e\141\x6d\145" && username_exists($EY)) {
goto be;
}
if (email_exists($bL)) {
goto iI;
}
if (!username_exists($EY) && !email_exists($bL)) {
goto Sz;
}
goto kX;
be:
$user = get_user_by("\x6c\157\x67\151\x6e", $EY);
$jY = $user->ID;
if (empty($sa)) {
goto Dg;
}
$jY = wp_update_user(array("\111\x44" => $jY, "\x66\151\x72\163\x74\x5f\156\x61\155\x65" => $sa));
Dg:
if (empty($zH)) {
goto oW;
}
$jY = wp_update_user(array("\111\104" => $jY, "\x6c\141\x73\x74\x5f\156\x61\155\x65" => $zH));
oW:
if (empty($bL)) {
goto n9;
}
$jY = wp_update_user(array("\x49\104" => $jY, "\x75\x73\145\162\x5f\x65\x6d\141\151\154" => $bL));
n9:
$wk = $wpdb->get_col("\x53\x45\x4c\x45\103\124\x20\142\x6c\157\x67\137\151\144\x20\x46\x52\x4f\x4d\40{$wpdb->blogs}");
foreach ($wk as $blog_id) {
switch_to_blog($blog_id);
$user = get_user_by("\x69\x64", $jY);
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto Kb;
}
$oM = $aP[$blog_id]["\x64\145\x66\141\165\154\164\x5f\162\x6f\x6c\x65"];
$QS = $aP[$blog_id]["\144\157\156\x74\137\x61\154\154\157\x77\x5f\165\x6e\x6c\x69\x73\164\145\x64\x5f\165\163\x65\162"];
$v0 = $aP[$blog_id]["\x64\x6f\x6e\164\x5f\x63\162\x65\141\164\145\137\165\x73\x65\162"];
Kb:
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if (!(!is_administrator_user($user) && !empty($v0) && $v0 == "\x75\156\143\150\145\x63\153\x65\x64")) {
goto XP;
}
if ($PK !== true && !empty($QS) && $QS == "\143\150\145\x63\x6b\145\x64") {
goto JE;
}
if ($PK !== true && !empty($oM) && $oM !== "\x66\141\154\163\x65") {
goto Co;
}
if ($PK !== true && is_user_member_of_blog($jY, $blog_id)) {
goto YP;
}
goto ls;
JE:
$jY = wp_update_user(array("\111\x44" => $jY, "\162\x6f\x6c\145" => false));
goto ls;
Co:
$jY = wp_update_user(array("\x49\104" => $jY, "\162\x6f\154\145" => $oM));
goto ls;
YP:
$wU = get_option("\x64\x65\x66\x61\165\154\164\x5f\162\x6f\x6c\145");
$jY = wp_update_user(array("\111\x44" => $jY, "\x72\157\154\x65" => $wU));
ls:
XP:
Hp:
}
D0:
switch_to_blog($l9);
if (is_null($Qz)) {
goto oG;
}
update_user_meta($jY, "\155\157\137\x73\x61\155\x6c\137\165\163\x65\162\137\x61\164\164\x72\x69\142\165\164\145\x73", $Qz);
$Y0 = get_site_option("\163\141\x6d\154\x5f\x61\x6d\x5f\x64\151\x73\x70\154\x61\171\137\156\141\155\145");
if (empty($Y0)) {
goto wp;
}
if (strcmp($Y0, "\125\123\x45\x52\116\101\x4d\105") == 0) {
goto f9;
}
if (strcmp($Y0, "\106\x4e\x41\x4d\105") == 0 && !empty($sa)) {
goto o_;
}
if (strcmp($Y0, "\x4c\x4e\x41\x4d\105") == 0 && !empty($zH)) {
goto pM;
}
if (strcmp($Y0, "\x46\116\101\x4d\x45\137\x4c\116\x41\115\105") == 0 && !empty($zH) && !empty($sa)) {
goto wl;
}
if (!(strcmp($Y0, "\114\x4e\x41\115\105\x5f\106\x4e\101\115\x45") == 0 && !empty($zH) && !empty($sa))) {
goto J0;
}
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\151\163\x70\154\141\171\137\x6e\x61\155\145" => $zH . "\x20" . $sa));
J0:
goto p3;
wl:
$jY = wp_update_user(array("\x49\104" => $jY, "\144\x69\x73\160\x6c\x61\171\x5f\x6e\141\155\x65" => $sa . "\x20" . $zH));
p3:
goto XG;
pM:
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\151\163\160\x6c\141\x79\x5f\156\x61\155\x65" => $zH));
XG:
goto vE;
o_:
$jY = wp_update_user(array("\x49\104" => $jY, "\144\151\x73\x70\x6c\x61\171\x5f\x6e\x61\x6d\145" => $sa));
vE:
goto cN;
f9:
$jY = wp_update_user(array("\x49\104" => $jY, "\144\151\163\160\x6c\141\171\x5f\156\x61\155\x65" => $user->user_login));
cN:
wp:
oG:
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto GP;
}
update_user_meta($jY, "\x6d\157\x5f\x73\141\155\154\137\163\145\x73\x73\151\157\156\x5f\151\156\144\145\170", $FZ);
GP:
if (empty($jj)) {
goto d7;
}
update_user_meta($jY, "\x6d\157\x5f\163\141\155\x6c\x5f\156\141\x6d\145\137\x69\144", $jj);
d7:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto OG;
}
session_start();
OG:
$_SESSION["\155\157\137\x73\141\x6d\x6c"]["\154\157\x67\147\x65\144\137\x69\156\x5f\167\x69\164\x68\137\151\x64\160"] = TRUE;
$Va = get_site_option("\x6d\x6f\137\x73\x61\x6d\x6c\137\162\x65\x6c\x61\x79\137\x73\164\141\164\145");
if (!empty($Va)) {
goto lB;
}
if (!empty($yW)) {
goto Eq;
}
wp_redirect($mC);
goto tN;
lB:
wp_redirect($Va);
goto tN;
Eq:
wp_redirect($yW);
tN:
die;
goto kX;
iI:
$user = get_user_by("\x65\x6d\141\x69\x6c", $bL);
$jY = $user->ID;
if (empty($sa)) {
goto Z2;
}
$jY = wp_update_user(array("\x49\104" => $jY, "\x66\151\x72\163\x74\137\156\141\x6d\145" => $sa));
Z2:
if (empty($zH)) {
goto Ps;
}
$jY = wp_update_user(array("\111\104" => $jY, "\154\x61\163\x74\137\156\141\x6d\x65" => $zH));
Ps:
$wk = $wpdb->get_col("\x53\x45\114\105\x43\x54\x20\x62\x6c\x6f\147\137\151\x64\40\x46\x52\x4f\x4d\40{$wpdb->blogs}");
foreach ($wk as $blog_id) {
switch_to_blog($blog_id);
$user = get_user_by("\151\x64", $jY);
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto QI;
}
$oM = $aP[$blog_id]["\x64\x65\146\x61\x75\x6c\x74\x5f\162\x6f\x6c\145"];
$QS = $aP[$blog_id]["\x64\x6f\156\164\137\x61\154\154\157\x77\137\165\x6e\154\151\163\x74\x65\144\x5f\x75\163\145\x72"];
$v0 = $aP[$blog_id]["\x64\x6f\156\164\x5f\143\162\x65\x61\164\145\x5f\x75\163\145\x72"];
QI:
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if (!(!is_administrator_user($user) && !empty($v0) && $v0 == "\x75\x6e\143\x68\x65\x63\153\145\144")) {
goto Hg;
}
if ($PK !== true && !empty($QS) && $QS == "\x63\x68\145\143\x6b\145\x64") {
goto Q5;
}
if ($PK !== true && !empty($oM) && $oM !== "\x66\x61\x6c\163\145") {
goto Mp;
}
if ($PK !== true && is_user_member_of_blog($jY, $blog_id)) {
goto Ur;
}
goto tV;
Q5:
$jY = wp_update_user(array("\111\104" => $jY, "\162\157\154\145" => false));
goto tV;
Mp:
$jY = wp_update_user(array("\111\104" => $jY, "\162\157\154\145" => $oM));
goto tV;
Ur:
$wU = get_option("\144\x65\146\141\x75\x6c\164\137\x72\157\x6c\145");
$jY = wp_update_user(array("\x49\104" => $jY, "\x72\157\154\145" => $wU));
tV:
Hg:
ML:
}
Z_:
switch_to_blog($l9);
if (is_null($Qz)) {
goto I1;
}
update_user_meta($jY, "\155\x6f\x5f\163\141\x6d\154\137\165\163\x65\162\x5f\141\164\164\162\151\x62\165\x74\145\x73", $Qz);
$Y0 = get_site_option("\163\x61\x6d\154\137\x61\155\137\144\151\163\160\x6c\141\x79\137\x6e\141\x6d\x65");
if (empty($Y0)) {
goto FY;
}
if (strcmp($Y0, "\x55\123\x45\x52\116\x41\x4d\105") == 0) {
goto VM;
}
if (strcmp($Y0, "\106\x4e\x41\x4d\105") == 0 && !empty($sa)) {
goto TS;
}
if (strcmp($Y0, "\114\116\x41\x4d\x45") == 0 && !empty($zH)) {
goto Ux;
}
if (strcmp($Y0, "\106\x4e\x41\115\x45\x5f\114\116\101\x4d\105") == 0 && !empty($zH) && !empty($sa)) {
goto TB;
}
if (!(strcmp($Y0, "\x4c\116\101\115\x45\137\106\116\x41\x4d\105") == 0 && !empty($zH) && !empty($sa))) {
goto t1;
}
$jY = wp_update_user(array("\111\x44" => $jY, "\144\x69\x73\160\154\141\x79\137\156\141\x6d\x65" => $zH . "\x20" . $sa));
t1:
goto zv;
TB:
$jY = wp_update_user(array("\111\104" => $jY, "\144\151\x73\x70\x6c\x61\x79\x5f\156\141\155\x65" => $sa . "\x20" . $zH));
zv:
goto qk;
Ux:
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\x69\x73\x70\154\141\x79\x5f\x6e\x61\155\x65" => $zH));
qk:
goto sV;
TS:
$jY = wp_update_user(array("\x49\x44" => $jY, "\144\151\x73\x70\154\141\171\x5f\156\x61\x6d\145" => $sa));
sV:
goto EN;
VM:
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\x69\x73\x70\154\141\171\x5f\x6e\x61\155\x65" => $user->user_login));
EN:
FY:
I1:
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto E1;
}
update_user_meta($jY, "\155\157\x5f\163\141\155\154\137\x73\145\x73\x73\x69\x6f\156\x5f\151\x6e\x64\145\x78", $FZ);
E1:
if (empty($jj)) {
goto zK;
}
update_user_meta($jY, "\155\x6f\137\x73\141\x6d\154\x5f\x6e\141\155\145\137\x69\x64", $jj);
zK:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto Cb;
}
session_start();
Cb:
$_SESSION["\x6d\157\137\x73\141\x6d\x6c"]["\154\x6f\147\147\145\x64\137\x69\x6e\137\x77\x69\x74\x68\x5f\151\144\160"] = TRUE;
$Va = get_site_option("\x6d\x6f\137\163\x61\155\x6c\137\162\x65\154\141\171\137\163\164\141\164\145");
if (!empty($Va)) {
goto YG;
}
if (!empty($yW)) {
goto X8;
}
wp_redirect($mC);
goto CG;
YG:
wp_redirect($Va);
goto CG;
X8:
wp_redirect($yW);
CG:
die;
goto kX;
Sz:
$wk = $wpdb->get_col("\x53\x45\114\105\x43\x54\40\142\154\x6f\x67\x5f\x69\144\x20\106\x52\117\x4d\40{$wpdb->blogs}");
foreach ($wk as $blog_id) {
$Kw = TRUE;
if (!(!empty($aP) && !empty($aP[$blog_id]))) {
goto pJ;
}
$oM = $aP[$blog_id]["\144\x65\146\141\165\x6c\164\x5f\162\157\x6c\145"];
$QS = $aP[$blog_id]["\144\157\x6e\x74\137\x61\154\x6c\157\x77\x5f\x75\x6e\x6c\x69\163\x74\145\144\137\165\x73\145\162"];
pJ:
if (!(!empty($aP) && array_key_exists($blog_id, $aP))) {
goto w0;
}
$Bk = get_saml_roles_to_assign($aP, $blog_id, $Ig);
if (!(empty($Bk) && strcmp($aP[$blog_id]["\144\x6f\156\x74\x5f\143\162\x65\141\164\145\x5f\x75\x73\x65\162"], "\x63\x68\145\143\153\145\x64") == 0)) {
goto Nd;
}
$Kw = FALSE;
Nd:
w0:
$Jk = get_site_option("\145\156\x61\x62\154\x65\x5f\x73\x61\155\x6c\137\x73\163\x6f\137\146\x6f\x72\x5f\x73\x69\x74\x65\x73");
if (!(!empty($Jk) && !in_array($blog_id, $Jk))) {
goto Hd;
}
$Kw = FALSE;
Hd:
if (!$Kw) {
goto mr;
}
$jY = NULL;
switch_to_blog($blog_id);
if (email_exists($bL)) {
goto u9;
}
$yB = wp_generate_password(10, false);
if (!empty($EY)) {
goto Gr;
}
$jY = wp_create_user($bL, $yB, $bL);
goto lS;
Gr:
$jY = wp_create_user($EY, $yB, $bL);
lS:
goto NF;
u9:
$user = get_user_by("\145\155\x61\x69\154", $bL);
$jY = $user->ID;
add_user_to_blog($blog_id, $jY, false);
NF:
$user = get_user_by("\x69\x64", $jY);
$PK = assign_roles_to_user($user, $aP, $blog_id, $Ig);
if ($PK !== true && !empty($QS) && $QS == "\143\150\145\143\153\145\144") {
goto aB;
}
if ($PK !== true && !empty($oM) && $oM !== "\x66\x61\x6c\x73\145") {
goto eO;
}
if ($PK !== true) {
goto Lv;
}
goto rD;
aB:
$jY = wp_update_user(array("\x49\104" => $jY, "\162\157\154\145" => false));
goto rD;
eO:
$jY = wp_update_user(array("\111\104" => $jY, "\162\157\x6c\x65" => $oM));
goto rD;
Lv:
$wU = get_option("\x64\x65\x66\x61\165\x6c\x74\x5f\162\x6f\x6c\145");
$jY = wp_update_user(array("\x49\x44" => $jY, "\x72\157\154\145" => $wU));
rD:
$Qx = $user->{$wpdb->prefix . "\143\x61\x70\x61\x62\151\x6c\x69\164\151\x65\x73"};
if (isset($Y6)) {
goto qz;
}
$Y6 = new WP_Roles();
qz:
if (empty($sa)) {
goto De;
}
$jY = wp_update_user(array("\111\104" => $jY, "\146\x69\162\x73\x74\137\x6e\x61\x6d\x65" => $sa));
De:
if (empty($zH)) {
goto W6;
}
$jY = wp_update_user(array("\111\104" => $jY, "\154\x61\163\164\137\156\x61\x6d\145" => $zH));
W6:
if (is_null($Qz)) {
goto wW;
}
update_user_meta($jY, "\x6d\157\x5f\x73\x61\x6d\154\137\165\x73\145\162\x5f\141\164\164\x72\x69\x62\x75\164\x65\163", $Qz);
$Y0 = get_site_option("\x73\141\x6d\154\137\141\x6d\x5f\x64\x69\x73\160\x6c\141\x79\137\156\x61\155\x65");
if (empty($Y0)) {
goto Rx;
}
if (strcmp($Y0, "\125\x53\105\x52\x4e\101\x4d\x45") == 0) {
goto Wy;
}
if (strcmp($Y0, "\x46\x4e\101\115\x45") == 0 && !empty($sa)) {
goto J2;
}
if (strcmp($Y0, "\114\116\x41\115\105") == 0 && !empty($zH)) {
goto Sk;
}
if (strcmp($Y0, "\106\x4e\101\x4d\x45\x5f\114\x4e\x41\115\x45") == 0 && !empty($zH) && !empty($sa)) {
goto XJ;
}
if (!(strcmp($Y0, "\x4c\x4e\x41\x4d\105\137\106\116\x41\x4d\105") == 0 && !empty($zH) && !empty($sa))) {
goto WU;
}
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\x69\163\x70\x6c\x61\171\137\x6e\x61\155\x65" => $zH . "\x20" . $sa));
WU:
goto Bz;
XJ:
$jY = wp_update_user(array("\111\x44" => $jY, "\144\151\163\160\x6c\x61\x79\137\156\x61\x6d\145" => $sa . "\x20" . $zH));
Bz:
goto F1;
Sk:
$jY = wp_update_user(array("\111\x44" => $jY, "\144\x69\163\x70\154\x61\171\x5f\x6e\141\155\145" => $zH));
F1:
goto mu;
J2:
$jY = wp_update_user(array("\111\x44" => $jY, "\x64\151\163\160\154\x61\x79\x5f\156\141\x6d\x65" => $sa));
mu:
goto ix;
Wy:
$jY = wp_update_user(array("\x49\104" => $jY, "\144\151\x73\x70\x6c\141\171\137\156\x61\155\x65" => $user->user_login));
ix:
Rx:
wW:
mr:
jB:
}
nd:
switch_to_blog($l9);
wp_set_current_user($jY);
wp_set_auth_cookie($jY, true);
if (empty($FZ)) {
goto yH;
}
update_user_meta($jY, "\155\157\x5f\163\141\155\154\137\163\x65\163\x73\151\x6f\x6e\x5f\x69\x6e\x64\145\170", $FZ);
yH:
if (empty($jj)) {
goto tr;
}
update_user_meta($jY, "\x6d\157\137\163\141\155\x6c\137\156\x61\x6d\x65\x5f\151\x64", $jj);
tr:
if (!(!session_id() || session_id() == '' || !isset($_SESSION))) {
goto PN;
}
session_start();
PN:
$_SESSION["\155\x6f\137\x73\x61\155\x6c"]["\154\x6f\x67\x67\x65\x64\137\151\156\x5f\x77\x69\x74\150\x5f\151\144\x70"] = TRUE;
$Va = get_site_option("\x6d\157\x5f\x73\x61\155\x6c\137\162\145\x6c\141\x79\x5f\163\x74\x61\164\x65");
if (!empty($Va)) {
goto Q9;
}
if (!empty($yW)) {
goto eD;
}
wp_redirect($mC);
goto jn;
Q9:
wp_redirect($Va);
goto jn;
eD:
wp_redirect($yW);
jn:
die;
kX:
}
function check_if_user_allowed_to_login($user, $mC)
{
$jY = $user->ID;
global $wpdb;
if (get_user_meta($jY, "\x6d\157\137\x73\x61\x6d\154\x5f\165\163\145\162\137\164\x79\x70\145", true)) {
goto Fk;
}
if (get_site_option("\155\x6f\x5f\163\x61\x6d\154\x5f\x75\x73\x72\x5f\154\x6d\x74")) {
goto LR;
}
update_user_meta($jY, "\155\x6f\137\163\141\x6d\x6c\x5f\x75\163\x65\162\x5f\164\x79\x70\145", "\x73\163\x6f\x5f\x75\x73\x65\x72");
goto x8;
LR:
$OE = get_site_option("\155\x6f\137\163\141\x6d\154\137\x63\x75\163\x74\157\x6d\145\x72\137\x74\157\x6b\145\156");
$GR = AESEncryption::decrypt_data(get_site_option("\155\x6f\137\x73\x61\x6d\x6c\x5f\x75\x73\162\x5f\x6c\155\x74"), $OE);
$JA = "\x53\x45\114\105\103\124\40\103\x4f\x55\x4e\124\50\x2a\51\x20\106\122\x4f\x4d\x20" . $wpdb->prefix . "\165\x73\x65\162\155\x65\x74\x61\40\x57\110\x45\122\x45\x20\155\145\x74\141\x5f\x6b\145\171\x3d\x27\155\x6f\137\163\x61\155\154\x5f\x75\163\145\x72\137\x74\171\x70\x65\47";
$To = $wpdb->get_var($JA);
if ($To >= $GR) {
goto GE;
}
update_user_meta($jY, "\x6d\x6f\137\163\141\155\x6c\137\165\x73\x65\162\137\164\x79\x70\145", "\x73\163\157\137\x75\x73\x65\162");
goto wV;
GE:
if (get_site_option("\x75\x73\145\x72\x5f\x61\x6c\145\162\164\137\145\155\x61\151\x6c\137\163\x65\156\x74")) {
goto BI;
}
$FR = new Customersaml();
$FR->mo_saml_send_user_exceeded_alert_email($GR);
BI:
if (is_administrator_user($user)) {
goto M8;
}
wp_redirect($mC);
die;
goto ya;
M8:
update_user_meta($jY, "\x6d\x6f\x5f\x73\x61\x6d\x6c\x5f\165\163\x65\x72\137\164\171\x70\x65", "\163\163\157\x5f\x75\163\145\162");
ya:
wV:
x8:
Fk:
}
function assign_roles_to_user($user, $aP, $blog_id, $Ig)
{
$PK = false;
if (!(!empty($Ig) && !empty($aP) && !is_administrator_user($user) && !empty($aP[$blog_id]) && is_user_member_of_blog($user->ID, $blog_id))) {
goto kW;
}
$user->set_role(false);
$nv = '';
$Sd = false;
unset($aP[$blog_id]["\144\145\x66\141\165\154\x74\137\162\x6f\x6c\x65"]);
unset($aP[$blog_id]["\144\157\x6e\x74\137\x63\x72\145\x61\164\145\137\x75\163\145\162"]);
unset($aP[$blog_id]["\144\x6f\x6e\x74\137\x61\x6c\154\157\x77\x5f\x75\156\x6c\x69\x73\x74\145\x64\137\165\x73\x65\x72"]);
foreach ($aP[$blog_id] as $Lr => $oc) {
$KA = explode("\x3b", $oc);
foreach ($KA as $Vm) {
if (!in_array($Vm, $Ig)) {
goto IU;
}
$PK = true;
$user->add_role($Lr);
IU:
Ih:
}
VR:
V4:
}
Q1:
kW:
return $PK;
}
function get_saml_roles_to_assign($aP, $blog_id, $Ig)
{
$Bk = array();
if (!(!empty($Ig) && !empty($aP) && !empty($aP[$blog_id]))) {
goto Cm;
}
unset($aP[$blog_id]["\x64\145\146\141\x75\x6c\x74\137\162\x6f\154\x65"]);
unset($aP[$blog_id]["\x64\x6f\156\164\137\143\162\145\x61\x74\145\x5f\165\x73\x65\162"]);
unset($aP[$blog_id]["\144\157\x6e\164\137\141\154\x6c\x6f\167\137\x75\x6e\154\151\163\164\145\x64\137\165\163\x65\162"]);
foreach ($aP[$blog_id] as $Lr => $oc) {
$KA = explode("\x3b", $oc);
foreach ($KA as $Vm) {
if (!in_array($Vm, $Ig)) {
goto Fu;
}
array_push($Bk, $Lr);
Fu:
lN:
}
Wv:
Wm:
}
Vq:
Cm:
return $Bk;
}
function is_administrator_user($user)
{
$hC = $user->roles;
if (!is_null($hC) && in_array("\x61\144\155\151\x6e\x69\163\164\162\x61\x74\157\x72", $hC)) {
goto n7;
}
return false;
goto gm;
n7:
return true;
gm:
}
function mo_saml_is_customer_registered()
{
$Dv = get_site_option("\155\x6f\137\x73\x61\x6d\x6c\x5f\141\x64\x6d\x69\156\137\x65\x6d\141\x69\x6c");
$Pk = get_site_option("\x6d\157\x5f\163\x61\155\154\137\x61\x64\x6d\151\x6e\137\143\165\x73\164\157\x6d\145\162\137\x6b\145\171");
if (!$Dv || !$Pk || !is_numeric(trim($Pk))) {
goto LJ;
}
return 1;
goto r4;
LJ:
return 0;
r4:
}
function mo_saml_is_customer_license_verified()
{
$OE = get_site_option("\155\157\137\163\141\x6d\x6c\x5f\x63\165\163\164\x6f\x6d\145\x72\137\164\157\x6b\145\156");
$pT = AESEncryption::decrypt_data(get_site_option("\x74\x5f\163\x69\164\145\137\x73\x74\x61\x74\x75\x73"), $OE);
$w0 = get_site_option("\163\155\x6c\x5f\x6c\x6b");
$Dv = get_site_option("\155\x6f\x5f\x73\141\x6d\x6c\x5f\x61\144\155\x69\x6e\x5f\145\x6d\x61\x69\x6c");
$Pk = get_site_option("\x6d\x6f\137\163\141\155\154\137\141\144\155\x69\156\x5f\x63\165\163\164\157\x6d\x65\162\x5f\153\145\171");
$y3 = AESEncryption::decrypt_data(get_site_option("\156\157\x5f\x73\x62\163"), $OE);
$ID = false;
if (!get_site_option("\x6e\157\137\x73\142\163")) {
goto Pq;
}
$Bh = Utilities::get_sites();
$ID = $y3 < count($Bh);
Pq:
if ($pT != "\164\x72\165\145" && !$w0 || !$Dv || !$Pk || !is_numeric(trim($Pk)) || $ID) {
goto JO;
}
return 1;
goto UW;
JO:
return 0;
UW:
}
add_action("\167\x69\144\x67\145\x74\163\137\151\156\x69\x74", create_function('', "\x72\145\x67\x69\x73\164\145\162\x5f\167\x69\x64\x67\145\x74\50\x20\42\x6d\x6f\x5f\154\157\x67\x69\x6e\137\x77\x69\x64\x22\40\51\73"));
add_action("\167\x70\137\x65\156\161\x75\x65\x75\x65\x5f\x73\x63\162\x69\160\164\163", "\x70\x6c\x75\147\x69\156\x5f\163\145\x74\x74\x69\x6e\147\163\137\x73\x74\x79\154\x65\x5f\167\151\144\147\145\164");
add_action("\167\x70\137\x65\156\161\165\x65\165\145\137\163\143\x72\x69\x70\x74\163", "\160\154\x75\x67\151\156\x5f\163\x65\x74\x74\151\156\x67\163\137\163\143\162\151\x70\164\x5f\167\151\x64\147\145\x74");
add_action("\x69\156\x69\164", "\155\x6f\x5f\154\x6f\147\x69\x6e\x5f\x76\141\154\151\144\x61\x74\145");
?>
Function Calls
| None |
Stats
| MD5 | e14497917999091ae91f3a2f786440da |
| Eval Count | 0 |
| Decode Time | 153 ms |