Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
do_action("\x6d\x6f\137\x61\142\162\137\146\x69\x6c\x74\x65\x72\137\154\157\147\x69\x6e", ..
Decoded Output download
<? 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;
} ?>
Did this file decode correctly?
Original Code
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 Calls
None |
Stats
MD5 | ad06780cf103106bff32bc88e35c23bc |
Eval Count | 0 |
Decode Time | 51 ms |