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 namespace MoOauthClient; use MoOauthClient\Base\InstanceHelper; use MoOauth..
Decoded Output download
<?php
namespace MoOauthClient;
use MoOauthClient\Base\InstanceHelper;
use MoOauthClient\MO_Custom_OAuth1;
use MoOauthClient\OauthHandler;
use MoOauthClient\StorageManager;
class LoginHandler
{
public $oauth_handler;
public function __construct()
{
$this->oauth_handler = new OauthHandler();
add_action("init", array($this, "mo_oauth_decide_flow"));
add_action("mo_oauth_client_tight_login_internal", array($this, "handle_sso"), 10, 4);
}
public function mo_oauth_decide_flow()
{
global $Ls;
if (!(isset($_REQUEST[\MoOAuthConstants::OPTION]) && "testattrmappingconfig" === $_REQUEST[\MoOAuthConstants::OPTION])) {
goto yv;
}
$Uh = isset($_REQUEST["app"]) ? sanitize_text_field(wp_unslash($_REQUEST["app"])) : '';
wp_safe_redirect(site_url() . "?option=oauthredirect&app_name=" . rawurlencode($Uh) . "&test=true");
exit;
yv:
$this->mo_oauth_login_validate();
}
public function mo_oauth_login_validate()
{
global $Ls;
$Tj = $Ls->get_plugin_config()->get_current_config();
$ss = true;
$ss = $Ls->mo_oauth_aemoutcrahsaphtn() == "enabled" ? false : true;
$bT = new StorageManager();
if (!(isset($_REQUEST[\MoOAuthConstants::OPTION]) && !is_array($_REQUEST["option"]) && strpos(sanitize_text_field(wp_unslash($_REQUEST[\MoOAuthConstants::OPTION])), "oauthredirect") !== false)) {
goto Ep;
}
if ($ss) {
goto Ju;
}
wp_safe_redirect(site_url() . "/wp-admin");
exit;
Ju:
if (isset($_REQUEST["mo_login_popup"])) {
goto qJ;
}
if (!(isset($_REQUEST["resource"]) && !empty($_REQUEST["resource"]))) {
goto vk;
}
if (!empty($_REQUEST["resource"])) {
goto gf;
}
$Ls->handle_error("The response from userinfo was empty.");
MO_Oauth_Debug::mo_oauth_log("The response from userinfo was empty.");
wp_die(wp_kses("The response from userinfo was empty.", \mo_oauth_get_valid_html()));
gf:
$bT = new StorageManager(isset($_REQUEST["resource"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["resource"]))) : '');
$wm = $bT->get_value("resource");
$Ti = $bT->get_value("appname");
$wx = $bT->get_value("redirect_uri");
$Rl = $bT->get_value("access_token");
$eO = $Ls->get_app_by_name($Ti)->get_app_config();
$Bn = isset($_REQUEST["test"]) && !empty($_REQUEST["test"]);
if (!($Bn && '' !== $Bn)) {
goto Ok;
}
$this->handle_group_test_conf($wm, $eO, $Rl, false, $Bn);
exit;
Ok:
$bT->remove_key("resource");
$bT->add_replace_entry("popup", "ignore");
if (!has_filter("woocommerce_checkout_get_value")) {
goto dp;
}
$wm["appname"] = $Ti;
dp:
do_action("mo_abr_filter_login", $wm);
$this->handle_sso($Ti, $eO, $wm, $bT->get_state(), ["access_token" => $Rl]);
vk:
if (isset($_REQUEST["app_name"])) {
goto FK;
}
$mP = "Please check if you are sending the 'app_name' parameter";
$Ls->handle_error($mP);
MO_Oauth_Debug::mo_oauth_log($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
FK:
$Th = isset($_REQUEST["app_name"]) && !empty($_REQUEST["app_name"]) ? sanitize_text_field(wp_unslash($_REQUEST["app_name"])) : '';
if (!($Th == '')) {
goto Wx;
}
$mP = "No such app found configured. Please check if you are sending the correct app_name";
MO_Oauth_Debug::mo_oauth_log($mP);
$Ls->handle_error($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
Wx:
$xx = $Ls->mo_oauth_client_get_option("mo_oauth_apps_list");
if (is_array($xx) && isset($xx[$Th])) {
goto cO;
}
$mP = "No such app found configured. Please check if you are sending the correct app_name";
MO_Oauth_Debug::mo_oauth_log($mP);
$Ls->handle_error($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
cO:
$ll = "//" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$ll = strtok($ll, "?");
$x5 = isset($_REQUEST["redirect_url"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["redirect_url"]))) : $ll;
$Bn = isset($_REQUEST["test"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["test"]))) : false;
$CY = isset($_REQUEST["restrictredirect"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["restrictredirect"]))) : false;
$Ro = $Ls->get_app_by_name($Th);
$V_ = $Ro->get_app_config("grant_type");
if (!is_multisite()) {
goto ae;
}
$blog_id = get_current_blog_id();
$T2 = $Ls->mo_oauth_client_get_option("mo_oauth_c3Vic2l0ZXNzZWxlY3RlZA");
$j5 = array();
if (!isset($T2)) {
goto dV;
}
$j5 = json_decode($Ls->mooauthdecrypt($T2), true);
dV:
$MQ = false;
$Hx = $Ls->mo_oauth_client_get_option("mo_oauth_isMultiSitePluginRequested");
if (!(is_array($j5) && in_array($blog_id, $j5))) {
goto AY;
}
$MQ = true;
AY:
if (!(is_multisite() && $Hx && ($Hx && !$MQ) && !$Bn && $Ls->mo_oauth_client_get_option("noOfSubSites") < 1000)) {
goto HS;
}
$Ls->handle_error("Login is disabled for this site. Please contact your administrator.");
MO_Oauth_Debug::mo_oauth_log("Login is disabled for this site. Please contact your administrator.");
wp_die("Login is disabled for this site. Please contact your administrator.");
HS:
$bT->add_replace_entry("blog_id", $blog_id);
ae:
MO_Oauth_Debug::mo_oauth_log("Grant: " . $V_);
if ($V_ && "Password Grant" === $V_) {
goto ab;
}
if (!($V_ && "Client Credentials Grant" === $V_)) {
goto Nd;
}
do_action("mo_oauth_client_credentials_grant_initiate", $Th, $Bn);
exit;
Nd:
goto c3;
ab:
do_action("pwd_essentials_internal");
do_action("mo_oauth_client_add_pwd_js");
echo "\x9 \x9<script>\xd\xa\x9\x9 \x9\x9var mo_oauth_app_name = "";
echo wp_kses($Th, \mo_oauth_get_valid_html());
echo "";\xd\xa \x9document.addEventListener('DOMContentLoaded', function() {
\xa \x9 \x9";
if ($Bn) {
goto qP;
}
echo "\x9\x9\x9\x9\x9 \x9moOAuthLoginPwd(mo_oauth_app_name, false, '";
echo esc_url($x5);
echo "');
\xa\x9 \x9\x9\x9";
goto XG;
qP:
echo "\x9 \x9 \x9 moOAuthLoginPwd(mo_oauth_app_name, true, '";
echo esc_url($x5);
echo "');
\x9 \x9\x9\x9\x9";
XG:
echo "\x9\x9\x9\x9 }, false);
\x9 \x9\x9</script>
\xa\x9 \x9 ";
exit;
c3:
if (!($Ro->get_app_config("appId") === "twitter" || $Ro->get_app_config("appId") === "oauth1")) {
goto xn;
}
MO_Oauth_Debug::mo_oauth_log("Oauth1 flow");
$Bn = isset($_REQUEST["test"]) && !empty($_REQUEST["test"]);
if (!($Bn && '' !== $Bn)) {
goto YV;
}
setcookie("oauth1_test", "1", time() + 20);
YV:
setcookie("oauth1appname", $Th, time() + 60);
$_COOKIE["oauth1appname"] = $Th;
MO_Custom_OAuth1::mo_oauth1_auth_request($Th);
exit;
xn:
$ng = md5(rand(0, 15));
$bT->add_replace_entry("appname", $Th);
$bT->add_replace_entry("redirect_uri", $x5);
$bT->add_replace_entry("test_config", $Bn);
$bT->add_replace_entry("restrictredirect", $CY);
$bT->add_replace_entry("state_nonce", $ng);
$bT = apply_filters("mo_oauth_set_custom_storage", $bT);
$Ga = $bT->get_state();
$Ga = apply_filters("state_internal", $Ga);
$sW = $Ro->get_app_config("authorizeurl");
if (!($Ro->get_app_config("send_state") === false || $Ro->get_app_config("send_state") === '')) {
goto f1;
}
$Ro->update_app_config("send_state", 1);
$Ls->set_app_by_name($Th, $Ro->get_app_config('', false));
f1:
if ($Ro->get_app_config("send_state")) {
goto PQ;
}
setcookie("state_param", $Ga, time() + 60);
PQ:
$HG = $Ro->get_app_config("pkce_flow");
$wx = $Ro->get_app_config("redirect_uri");
$PF = urlencode($Ro->get_app_config("client_id"));
$wx = empty($wx) ? \site_url() : $wx;
if ($HG && 1 === $HG) {
goto wt;
}
$Wd = $Ro->get_app_config("send_state") ? "&state=" . $Ga : '';
if ($Ro->get_app_config("send_state")) {
goto An;
}
setcookie("state_param", $Ga, time() + 60);
MO_Oauth_Debug::mo_oauth_log("state parameter not sent");
goto Kj;
An:
MO_Oauth_Debug::mo_oauth_log("state parameter sent");
Kj:
if (strpos($sW, "?") !== false) {
goto YF;
}
$sW = $sW . "?client_id=" . $PF . "&scope=" . $Ro->get_app_config("scope") . "&redirect_uri=" . urlencode($wx) . "&response_type=code" . $Wd;
goto tU;
YF:
$sW = $sW . "&client_id=" . $PF . "&scope=" . $Ro->get_app_config("scope") . "&redirect_uri=" . urlencode($wx) . "&response_type=code" . $Wd;
tU:
goto OV;
wt:
MO_Oauth_Debug::mo_oauth_log("PKCE flow");
$l9 = bin2hex(openssl_random_pseudo_bytes(32));
$Cg = $Ls->base64url_encode(pack("H*", $l9));
$cJ = $Ls->base64url_encode(pack("H*", hash("sha256", $Cg)));
$bT->add_replace_entry("code_verifier", $Cg);
$Ga = $bT->get_state();
$Wd = $Ro->get_app_config("send_state") ? "&state=" . $Ga : '';
if ($Ro->get_app_config("send_state")) {
goto OD;
}
MO_Oauth_Debug::mo_oauth_log("state parameter not sent");
goto Sd;
OD:
MO_Oauth_Debug::mo_oauth_log("state parameter sent");
Sd:
if (strpos($sW, "?") !== false) {
goto MY;
}
$sW = $sW . "?client_id=" . $PF . "&scope=" . $Ro->get_app_config("scope") . "&redirect_uri=" . urlencode($wx) . "&response_type=code" . $Wd . "&code_challenge=" . $cJ . "&code_challenge_method=S256";
goto Ar;
MY:
$sW = $sW . "&client_id=" . $PF . "&scope=" . $Ro->get_app_config("scope") . "&redirect_uri=" . urlencode($wx) . "&response_type=code" . $Wd . "&code_challenge=" . $cJ . "&code_challenge_method=S256";
Ar:
OV:
if (!(null !== $Ro->get_app_config("send_nonce") && $Ro->get_app_config("send_nonce"))) {
goto zz;
}
$Q0 = md5(rand());
$Ls->set_transient("mo_oauth_nonce_" . $Q0, $Q0, time() + 120);
$sW = $sW . "&nonce=" . $Q0;
MO_Oauth_Debug::mo_oauth_log("nonce parameter sent");
zz:
if (!(strpos($sW, "apple") !== false)) {
goto M5;
}
$sW = $sW . "&response_mode=form_post";
M5:
if (!(isset($_SERVER["REQUEST_URI"]) and strpos($_SERVER["REQUEST_URI"], "mooidccallback") !== false)) {
goto IJ;
}
if (!($Ro->get_app_config("appId") == "Vendasta" && isset($_REQUEST["account_id"]))) {
goto Qs;
}
$sW .= "&account_id=" . $_REQUEST["account_id"];
Qs:
IJ:
$sW = apply_filters("mo_auth_url_internal", $sW, $Th);
MO_Oauth_Debug::mo_oauth_log("Authorizaion Endpoint => " . $sW);
header("Location: " . $sW);
exit;
qJ:
Ep:
if (isset($_GET["error_description"])) {
goto tA;
}
if (!isset($_GET["error"])) {
goto d0;
}
if (!empty($_GET["error"])) {
goto AZ;
}
MO_Oauth_Debug::mo_oauth_log("Received, Empty Error from Authorize Endpoint");
return;
AZ:
do_action("mo_redirect_to_custom_error_page");
$Jo = "Error from Authorize Endpoint: " . sanitize_text_field(wp_unslash($_GET["error"]));
MO_Oauth_Debug::mo_oauth_log($Jo);
$Ls->handle_error($Jo);
wp_die($Jo);
d0:
goto YU;
tA:
if (!(strpos($_GET["state"], "dokan-stripe-connect") !== false)) {
goto kH;
}
return;
kH:
do_action("mo_redirect_to_custom_error_page");
$qm = "Error description from Authorize Endpoint: " . sanitize_text_field($_GET["error_description"]);
MO_Oauth_Debug::mo_oauth_log($qm);
$Ls->handle_error($qm);
wp_die($qm);
YU:
if (!(strpos($_SERVER["REQUEST_URI"], "openidcallback") !== false || strpos($_SERVER["REQUEST_URI"], "oauth_token") !== false && strpos($_SERVER["REQUEST_URI"], "oauth_verifier"))) {
goto dU;
}
MO_Oauth_Debug::mo_oauth_log("Oauth1 callback flow");
if (!empty($_COOKIE["oauth1appname"])) {
goto pH;
}
MO_Oauth_Debug::mo_oauth_log("Returning from OAuth1");
return;
pH:
MO_Oauth_Debug::mo_oauth_log("OAuth1 app found");
$Th = $_COOKIE["oauth1appname"];
$wm = MO_Custom_OAuth1::mo_oidc1_get_access_token($_COOKIE["oauth1appname"]);
$He = apply_filters("mo_tr_after_profile_info_extraction_from_token", $wm);
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("mo_oauth_attr_name_list" . $Th, $qP);
if (!(isset($_COOKIE["oauth1_test"]) && $_COOKIE["oauth1_test"] == "1")) {
goto cu;
}
$Ro = $Ls->get_app_by_name($Th);
$jA = $Ro->get_app_config();
$this->render_test_config_output($wm, false, $jA, $Th);
exit;
cu:
$Ro = $Ls->get_app_by_name($Th);
$na = $Ro->get_app_config("username_attr");
$t3 = isset($eO["email_attr"]) ? $eO["email_attr"] : '';
$R_ = $Ls->getnestedattribute($wm, $t3);
$CH = $Ls->getnestedattribute($wm, $na);
if (!empty($CH)) {
goto kf;
}
MO_Oauth_Debug::mo_oauth_log("Username not received.Please configure Attribute Mapping");
$Ls->handle_error("Username not received.Please configure Attribute Mapping");
wp_die("Username not received.Please configure Attribute Mapping");
kf:
if (!empty($R_)) {
goto eX;
}
$user = get_user_by("login", $CH);
goto fT;
eX:
$R_ = $Ls->getnestedattribute($wm, $t3);
if (!(false === strpos($R_, "@"))) {
goto fX;
}
MO_Oauth_Debug::mo_oauth_log("Mapped Email attribute does not contain valid email.");
$Ls->handle_error("Mapped Email attribute does not contain valid email.");
wp_die("Mapped Email attribute does not contain valid email.");
fX:
fT:
if ($user) {
goto pG;
}
$fw = 0;
if ($Ls->mo_oauth_hbca_xyake()) {
goto CB;
}
$user = $Ls->mo_oauth_hjsguh_kiishuyauh878gs($R_, $CH);
goto sT;
CB:
if ($Ls->mo_oauth_client_get_option("mo_oauth_flag") !== true) {
goto Gp;
}
$kC = base64_decode('PGRpdiBzdHlsZT0ndGV4dC1hbGlnbjpjZW50ZXI7Jz48Yj5Vc2VyIEFjY291bnQgZG9lcyBub3QgZXhpc3QuPC9iPjwvZGl2Pjxicj48c21hbGw+VGhpcyB2ZXJzaW9uIHN1cHBvcnRzIEF1dG8gQ3JlYXRlIFVzZXIgZmVhdHVyZSB1cHRvIDEwIFVzZXJzLiBQbGVhc2UgdXBncmFkZSB0byB0aGUgaGlnaGVyIHZlcnNpb24gb2YgdGhlIHBsdWdpbiB0byBlbmFibGUgYXV0byBjcmVhdGUgdXNlciBmb3IgdW5saW1pdGVkIHVzZXJzIG9yIGFkZCB1c2VyIG1hbnVhbGx5Ljwvc21hbGw+');
$Ls->handle_error($kC);
MO_Oauth_Debug::mo_oauth_log($kC);
wp_die($kC);
goto Ly;
Gp:
if (!empty($R_)) {
goto MR;
}
$user = $Ls->mo_oauth_jhuyn_jgsukaj($CH, $CH);
goto TR;
MR:
$user = $Ls->mo_oauth_jhuyn_jgsukaj($R_, $CH);
TR:
Ly:
sT:
goto EM;
pG:
$fw = $user->ID;
EM:
if (!$user) {
goto YJ;
}
wp_set_current_user($user->ID);
$Ta = false;
$Ta = apply_filters("mo_remember_me", $Ta);
wp_set_auth_cookie($user->ID, $Ta);
$user = get_user_by("ID", $user->ID);
do_action("wp_login", $user->user_login, $user);
wp_safe_redirect(home_url());
exit;
YJ:
dU:
if (!isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && (strpos($_SERVER["REQUEST_URI"], "/oauthcallback") !== false || isset($_REQUEST["code"]) && !empty($_REQUEST["code"]) && !isset($_REQUEST["id_token"]))) {
goto W4;
}
if (!empty($_POST["refresh_token"])) {
goto QF;
}
goto A9;
W4:
MO_Oauth_Debug::mo_oauth_log("Flow redirected back to OAuth plugin.");
MO_Oauth_Debug::mo_oauth_log($_REQUEST);
if (!(isset($_REQUEST["post_ID"]) || isset($_REQUEST["edd-action"]))) {
goto PZ;
}
return;
PZ:
if (!(isset($_REQUEST["page"]) && strcmp($_REQUEST["page"], "pmpro-discountcodes") !== false)) {
goto L2;
}
return;
L2:
if (!(strpos($_SERVER["REQUEST_URI"], "/wp-json/moserver/token") !== false)) {
goto gJ;
}
return;
gJ:
if (!($Ls->mo_oauth_aemoutcrahsaphtn() == "enabled")) {
goto bo;
}
MO_Oauth_Debug::mo_oauth_log("SSO Disabled. Please contact the administrator");
wp_die("SSO Disabled. Please contact the administrator");
return;
bo:
try {
if (isset($_COOKIE["state_param"])) {
goto Hv;
}
if (isset($_GET["state"]) && !empty($_GET["state"])) {
goto Qg;
}
$Ez = new StorageManager();
if (!is_multisite()) {
goto wm;
}
$Ez->add_replace_entry("blog_id", 1);
wm:
$du = $Ls->get_app_by_name();
if (isset($_GET["app_name"])) {
goto yf;
}
$Ez->add_replace_entry("appname", $du->get_app_name());
goto F_;
yf:
$Ez->add_replace_entry("appname", sanitize_text_field(wp_unslash($_GET["app_name"])));
F_:
$Ez->add_replace_entry("test_config", false);
$Ez->add_replace_entry("redirect_uri", site_url());
$Ga = $Ez->get_state();
goto Oc;
Hv:
MO_Oauth_Debug::mo_oauth_log("Fetched state parameter from cookie");
$Ga = $_COOKIE["state_param"];
goto Oc;
Qg:
$Ga = sanitize_text_field(wp_unslash($_GET["state"]));
Oc:
$bT = new StorageManager($Ga);
MO_Oauth_Debug::mo_oauth_log("Set storage manager from state");
if (!empty($bT->get_value("appname"))) {
goto MI;
}
return;
MI:
$Th = $bT->get_value("appname");
MO_Oauth_Debug::mo_oauth_log("Application Configured: " . $Th);
$Bn = $bT->get_value("test_config");
if (!is_multisite()) {
goto Ag;
}
if (!(empty($bT->get_value("redirected_to_subsite")) || $bT->get_value("redirected_to_subsite") !== "redirect")) {
goto tf;
}
MO_Oauth_Debug::mo_oauth_log("Redirection for multisite environment.");
$blog_id = $bT->get_value("blog_id");
$eD = get_site_url($blog_id);
$bT->add_replace_entry("redirected_to_subsite", "redirect");
$J1 = $bT->get_state();
$eD = $eD . "?code=" . $_REQUEST["code"] . "&state=" . $J1;
MO_Oauth_Debug::mo_oauth_log("Redirecting to subsite =>" . $eD);
wp_redirect($eD);
exit;
tf:
Ag:
$Ti = $Th ? $Th : '';
$xx = $Ls->mo_oauth_client_get_option("mo_oauth_apps_list");
$na = '';
$t3 = '';
$DE = $Ls->get_app_by_name($Ti);
if ($DE) {
goto Ws;
}
$Ls->handle_error("Application not configured.");
MO_Oauth_Debug::mo_oauth_log("Application not configured.");
exit("Application not configured.");
Ws:
$eO = $DE->get_app_config();
if (!(isset($eO["send_nonce"]) && $eO["send_nonce"] === 1)) {
goto Mz;
}
if (!(isset($_REQUEST["nonce"]) && !$Ls->get_transient("mo_oauth_nonce_" . $_REQUEST["nonce"]))) {
goto MU;
}
$Jo = "Nonce verification is failed. Please contact to your administrator.";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
MU:
Mz:
$HG = $DE->get_app_config("pkce_flow");
$Qq = $DE->get_app_config("pkce_client_secret");
$N6 = array("grant_type" => "authorization_code", "client_id" => $eO["client_id"], "redirect_uri" => $eO["redirect_uri"], "code" => $_REQUEST["code"]);
if (!(strpos($eO["accesstokenurl"], "services/oauth2/token") === false && strpos($eO["accesstokenurl"], "salesforce") === false && strpos($eO["accesstokenurl"], "/oam/oauth2/access_token") === false)) {
goto DQ;
}
$N6["scope"] = $DE->get_app_config("scope");
DQ:
if ($HG && 1 === $HG) {
goto J2;
}
$N6["client_secret"] = $eO["client_secret"];
goto m2;
J2:
if (!($Qq && 1 === $Qq)) {
goto Xw;
}
$N6["client_secret"] = $eO["client_secret"];
Xw:
$N6 = apply_filters("mo_oauth_add_client_secret_pkce_flow", $N6, $eO);
$N6["code_verifier"] = $bT->get_value("code_verifier");
m2:
$mR = isset($eO["send_headers"]) ? $eO["send_headers"] : 0;
$ax = isset($eO["send_body"]) ? $eO["send_body"] : 0;
if ("openidconnect" === $DE->get_app_config("app_type")) {
goto kt;
}
$qS = $eO["accesstokenurl"];
MO_Oauth_Debug::mo_oauth_log("OAuth flow");
if (strpos($eO["authorizeurl"], "clever.com/oauth") != false || strpos($eO["accesstokenurl"], "bitrix") != false) {
goto Vy;
}
$ZX = json_decode($this->oauth_handler->get_token($qS, $N6, $mR, $ax), true);
goto C1;
Vy:
$ZX = json_decode($this->oauth_handler->get_atoken($qS, $N6, $_GET["code"], $mR, $ax), true);
C1:
if (!(get_current_user_id() && $Bn != 1)) {
goto ol;
}
if (has_filter("mo_oauth_break_sso_flow")) {
goto vB;
}
wp_clear_auth_cookie();
wp_set_current_user(0);
vB:
ol:
$_SESSION["procore_access_token"] = isset($ZX["access_token"]) ? $ZX["access_token"] : false;
if (isset($ZX["access_token"])) {
goto Wm;
}
do_action("mo_redirect_to_custom_error_page");
$Ls->handle_error("Invalid token received.");
MO_Oauth_Debug::mo_oauth_log("Invalid token received.");
exit("Invalid token received.");
Wm:
MO_Oauth_Debug::mo_oauth_log("Token Response => ");
MO_Oauth_Debug::mo_oauth_log($ZX);
$kr = $eO["resourceownerdetailsurl"];
if (!(substr($kr, -1) === "=")) {
goto z1;
}
$kr .= $ZX["access_token"];
z1:
MO_Oauth_Debug::mo_oauth_log("Access token received.");
MO_Oauth_Debug::mo_oauth_log("Access Token => " . $ZX["access_token"]);
$wm = false;
MO_Oauth_Debug::mo_oauth_log("Resource Owner => ");
if (!has_filter("mo_userinfo_flow_for_walmart")) {
goto Ka;
}
$wm = apply_filters("mo_userinfo_flow_for_walmart", $kr, $ZX, $N6, $Ti, $eO);
Ka:
if (!($wm === false)) {
goto ma;
}
$VQ = null;
$VQ = apply_filters("mo_polar_register_user", $ZX);
if (!(!empty($VQ) && !empty($ZX["x_user_id"]))) {
goto nB;
}
$kr .= "/" . $ZX["x_user_id"];
nB:
$wm = $this->oauth_handler->get_resource_owner($kr, $ZX["access_token"]);
$VC = array();
if (!(strpos($DE->get_app_config("authorizeurl"), "linkedin") !== false && strpos($eO["scope"], "r_emailaddress") != false)) {
goto JO;
}
$WM = "https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))";
$VC = $this->oauth_handler->get_resource_owner($WM, $ZX["access_token"]);
JO:
$wm = array_merge($wm, $VC);
ma:
if (!has_filter("mo_check_to_execute_post_userinfo_flow_for_walmart")) {
goto mJ;
}
$wm = apply_filters("mo_check_to_execute_post_userinfo_flow_for_walmart", $wm, $Ti, $eO);
mJ:
MO_Oauth_Debug::mo_oauth_log($wm);
if (has_filter("mo_get_token_for_neon_membership")) {
goto Ds;
}
$He = apply_filters("mo_tr_after_profile_info_extraction_from_token", $wm);
goto o7;
Ds:
$He = apply_filters("mo_get_token_for_neon_membership", $wm, $ZX["access_token"]);
o7:
if (!($He != '' && is_array($He))) {
goto aL;
}
$wm = array_merge($wm, $He);
aL:
$j4 = apply_filters("accreditions_endpoint", $ZX["access_token"]);
if (!($j4 !== '' && is_array($j4))) {
goto DV;
}
$wm = array_merge($wm, $j4);
DV:
if (!has_filter("mo_polar_register_user")) {
goto Xi;
}
$YB = array();
$YB["token"] = $ZX["access_token"];
$wm = array_merge($wm, $YB);
Xi:
if (!(strpos($DE->get_app_config("authorizeurl"), "discord") !== false)) {
goto b0;
}
apply_filters("mo_dis_user_attendance", $wm["id"]);
$my = apply_filters("mo_drm_get_user_roles", array_key_exists("id", $wm) ? $wm["id"] : '');
if (!(false !== $my)) {
goto WO;
}
MO_Oauth_Debug::mo_oauth_log("Discord Roles => ");
MO_Oauth_Debug::mo_oauth_log($my);
$wm["roles"] = $my;
WO:
if (!(!$Bn && '' == $Bn)) {
goto Th;
}
do_action("mo_oauth_add_dis_user_server", get_current_user_id(), $ZX, $wm);
Th:
b0:
if (!(isset($eO["send_nonce"]) && $eO["send_nonce"] === 1)) {
goto S3;
}
if (!(isset($wm["nonce"]) && $wm["nonce"] != NULL)) {
goto U_;
}
if ($Ls->get_transient("mo_oauth_nonce_" . $wm["nonce"])) {
goto KU;
}
$Jo = "Nonce verification is failed. Please contact to your administrator.";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
goto sB;
KU:
$Ls->delete_transient("mo_oauth_nonce_" . $wm["nonce"]);
sB:
U_:
S3:
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("mo_oauth_attr_name_list" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto BF;
}
$this->handle_group_test_conf($wm, $eO, $ZX["access_token"], false, $Bn);
exit;
BF:
goto TW;
kt:
MO_Oauth_Debug::mo_oauth_log("OpenID Connect flow");
$ZX = json_decode($this->oauth_handler->get_token($eO["accesstokenurl"], $N6, $mR, $ax), true);
MO_Oauth_Debug::mo_oauth_log("Token Response => ");
MO_Oauth_Debug::mo_oauth_log($ZX);
$vc = [];
try {
$vc = $this->resolve_and_get_oidc_response($ZX);
} catch (\Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log("Invalid Response received.");
do_action("mo_redirect_to_custom_error_page");
wp_die("Invalid Response received.");
exit;
}
if (!has_action("mo_oauth_save_access_token_in_cookie")) {
goto Dj;
}
do_action("mo_oauth_save_access_token_in_cookie", $ZX["access_token"]);
Dj:
MO_Oauth_Debug::mo_oauth_log("ID Token received Successfully");
MO_Oauth_Debug::mo_oauth_log("ID Token => ");
MO_Oauth_Debug::mo_oauth_log($vc);
$wm = $this->get_resource_owner_from_app($vc, $Ti);
MO_Oauth_Debug::mo_oauth_log("Resource Owner => ");
MO_Oauth_Debug::mo_oauth_log($wm);
if (!(strpos($DE->get_app_config("authorizeurl"), "twitch") !== false)) {
goto I_;
}
$zZ = apply_filters("mo_tsm_get_user_subscription", $wm["sub"], $eO["client_id"], $ZX["access_token"]);
if (!(false !== $zZ)) {
goto Bb;
}
MO_Oauth_Debug::mo_oauth_log("Twitch Subscription => ");
MO_Oauth_Debug::mo_oauth_log($zZ);
$wm["subscription"] = $zZ;
Bb:
I_:
if (!($DE->get_app_config("appId") === "keycloak")) {
goto F2;
}
$it = apply_filters("mo_krm_get_user_roles", $wm, $ZX);
if (!(false !== $it)) {
goto c1;
}
$wm["roles"] = $it;
c1:
F2:
$wm = apply_filters("mo_azureb2c_get_user_group_ids", $wm, $eO);
$He = apply_filters("mo_tr_after_profile_info_extraction_from_token", $wm);
if (!($He != '' && is_array($He))) {
goto Zn;
}
$wm = array_merge($wm, $He);
Zn:
if (!(isset($eO["send_nonce"]) && $eO["send_nonce"] === 1)) {
goto rw;
}
if (!(isset($wm["nonce"]) && $wm["nonce"] != NULL)) {
goto gS;
}
if ($Ls->get_transient("mo_oauth_nonce_" . $wm["nonce"])) {
goto wU;
}
$Jo = "Nonce verification is failed. Please contact to your administrator.";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
goto O3;
wU:
$Ls->delete_transient("mo_oauth_nonce_" . $wm["nonce"]);
O3:
gS:
rw:
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("mo_oauth_attr_name_list" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto U3;
}
$ZX["refresh_token"] = isset($ZX["refresh_token"]) ? $ZX["refresh_token"] : '';
$_SESSION["procore_refresh_token"] = $ZX["refresh_token"];
$NB = isset($ZX["access_token"]) ? $ZX["access_token"] : '';
$this->handle_group_test_conf($wm, $eO, $NB, false, $Bn);
MO_Oauth_Debug::mo_oauth_log("Attribute Received Successfully");
exit;
U3:
TW:
if (!(isset($eO["groupdetailsurl"]) && !empty($eO["groupdetailsurl"]))) {
goto GW;
}
$wm = $this->handle_group_user_info($wm, $eO, $ZX["access_token"]);
MO_Oauth_Debug::mo_oauth_log("Group Details Obtained => ");
MO_Oauth_Debug::mo_oauth_log($wm);
GW:
MO_Oauth_Debug::mo_oauth_log("Fetched resource owner : " . json_encode($wm));
if (!has_filter("woocommerce_checkout_get_value")) {
goto Cp;
}
$wm["appname"] = $Ti;
Cp:
do_action("mo_abr_filter_login", $wm);
$this->handle_sso($Ti, $eO, $wm, $Ga, $ZX);
} catch (Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log($de->getMessage());
do_action("mo_redirect_to_custom_error_page");
exit(esc_html($de->getMessage()));
}
goto A9;
QF:
try {
if (isset($_COOKIE["state_param"])) {
goto IX;
}
if (isset($_GET["state"])) {
goto r3;
}
$Ez = new StorageManager();
if (!is_multisite()) {
goto gh;
}
$Ez->add_replace_entry("blog_id", 1);
gh:
$du = $Ls->get_app_by_name();
if (isset($_GET["app_name"])) {
goto Tv;
}
$Ez->add_replace_entry("appname", $du->get_app_name());
goto Mt;
Tv:
$Ez->add_replace_entry("appname", sanitize_text_field(wp_unslash($_GET["app_name"])));
Mt:
$Ez->add_replace_entry("test_config", false);
$Ez->add_replace_entry("redirect_uri", site_url());
$Ga = $Ez->get_state();
goto MS;
r3:
$Ga = sanitize_text_field(wp_unslash($_GET["state"]));
MS:
goto pI;
IX:
$Ga = sanitize_text_field(wp_unslash($_COOKIE["state_param"]));
pI:
$bT = new StorageManager($Ga);
if (!empty($bT->get_value("appname"))) {
goto zq;
}
return;
zq:
$Th = $bT->get_value("appname");
$Bn = $bT->get_value("test_config");
$Ti = $Th ? $Th : '';
$xx = $Ls->mo_oauth_client_get_option("mo_oauth_apps_list");
$na = '';
$t3 = '';
$DE = $Ls->get_app_by_name($Ti);
if ($DE) {
goto Cm;
}
$Ls->handle_error("Application not configured.");
MO_Oauth_Debug::mo_oauth_log("Application not configured.");
exit("Application not configured.");
Cm:
$eO = $DE->get_app_config();
if (!(isset($eO["send_nonce"]) && $eO["send_nonce"] === 1)) {
goto gd;
}
if (!(isset($_REQUEST["nonce"]) && !$Ls->get_transient("mo_oauth_nonce_" . sanitize_text_field(wp_unslash($_REQUEST["nonce"]))))) {
goto HM;
}
$Jo = "Nonce verification is failed. Please contact to your administrator.";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die(esc_html($Jo));
HM:
gd:
$N6 = array("grant_type" => "refresh_token", "client_id" => $eO["client_id"], "redirect_uri" => $eO["redirect_uri"], "refresh_token" => $_POST["refresh_token"], "scope" => $DE->get_app_config("scope"), "client_secret" => $eO["client_secret"]);
$mR = isset($eO["send_headers"]) ? $eO["send_headers"] : 0;
$ax = isset($eO["send_body"]) ? $eO["send_body"] : 0;
$qS = $eO["accesstokenurl"];
MO_Oauth_Debug::mo_oauth_log("OAuth flow");
$ZX = json_decode($this->oauth_handler->get_token($qS, $N6, $mR, $ax), true);
$Z6 = isset($ZX["access_token"]) ? $ZX["access_token"] : false;
if (isset($Z6)) {
goto mq;
}
do_action("mo_redirect_to_custom_error_page");
$Ls->handle_error("Invalid token received.");
MO_Oauth_Debug::mo_oauth_log("Invalid token received.");
exit("Invalid token received.");
mq:
MO_Oauth_Debug::mo_oauth_log("Token Response => ");
MO_Oauth_Debug::mo_oauth_log($ZX);
$kr = $eO["resourceownerdetailsurl"];
if (!(substr($kr, -1) == "=" && !empty($ZX["userName"]))) {
goto Lj;
}
$kr .= strtolower($ZX["userName"]);
Lj:
MO_Oauth_Debug::mo_oauth_log("Access token received.");
MO_Oauth_Debug::mo_oauth_log("Access Token => ");
MO_Oauth_Debug::mo_oauth_log($Z6);
$wm = false;
if (!($wm === false)) {
goto JU;
}
$wm = $this->oauth_handler->get_resource_owner($kr, $Z6);
JU:
MO_Oauth_Debug::mo_oauth_log($wm);
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("mo_oauth_attr_name_list" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto eJ;
}
$this->handle_group_test_conf($wm, $eO, $Z6, false, $Bn);
exit;
eJ:
if (!(isset($eO["groupdetailsurl"]) && !empty($eO["groupdetailsurl"]))) {
goto Wk;
}
$wm = $this->handle_group_user_info($wm, $eO, $Z6);
MO_Oauth_Debug::mo_oauth_log("Group Details Obtained => " . $wm);
Wk:
MO_Oauth_Debug::mo_oauth_log("Fetched resource owner : " . json_encode($wm));
if (!has_filter("woocommerce_checkout_get_value")) {
goto lS;
}
$wm["appname"] = $Ti;
lS:
do_action("mo_abr_filter_login", $wm);
$this->handle_sso($Ti, $eO, $wm, $Ga, $ZX);
} catch (Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log($de->getMessage());
do_action("mo_redirect_to_custom_error_page");
exit(esc_html($de->getMessage()));
}
A9:
}
public function dropdownattrmapping($cq, $dI, $Zo)
{
global $Ls;
foreach ($dI as $M0 => $XG) {
if (is_array($XG)) {
goto wv;
}
if (!empty($cq)) {
goto K0;
}
array_push($Zo, $M0);
goto fC;
K0:
array_push($Zo, $cq . "." . $M0);
fC:
goto R5;
wv:
if (empty($cq)) {
goto SM;
}
$cq .= ".";
SM:
$Zo = $this->dropdownattrmapping($cq . $M0, $XG, $Zo);
$cq = rtrim($cq, ".");
R5:
Qv:
}
pf:
return $Zo;
}
public function resolve_and_get_oidc_response($ZX = array())
{
if (!empty($ZX)) {
goto gq;
}
throw new \Exception("Token response is empty", "invalid_response");
gq:
global $Ls;
$VS = isset($ZX["id_token"]) ? $ZX["id_token"] : false;
$Rl = isset($ZX["access_token"]) ? $ZX["access_token"] : false;
$_SESSION["procore_access_token"] = isset($Rl) ? $Rl : $VS;
if (!$Ls->is_valid_jwt($VS)) {
goto aZ;
}
return $VS;
aZ:
if (!$Ls->is_valid_jwt($Rl)) {
goto m5;
}
return $Rl;
m5:
MO_Oauth_Debug::mo_oauth_log("Token is not a valid JWT.");
throw new \Exception("Token is not a valid JWT.");
}
public function handle_group_test_conf($wm = array(), $eO = array(), $Rl = '', $Qc = false, $Bn = false)
{
$this->render_test_config_output($wm, false);
}
public function testattrmappingconfig($cq, $dI)
{
foreach ($dI as $M0 => $XG) {
if (is_array($XG) || is_object($XG)) {
goto Jm;
}
echo "<tr><td>";
if (empty($cq)) {
goto gC;
}
echo esc_attr($cq) . ".";
gC:
echo esc_attr($M0) . "</td><td>" . esc_attr($XG) . "</td></tr>";
goto Pz;
Jm:
if (empty($cq)) {
goto WL;
}
$cq .= ".";
WL:
$this->testattrmappingconfig($cq . $M0, $XG);
$cq = rtrim($cq, ".");
Pz:
Ja:
}
TQ:
}
public function render_test_config_output($wm, $Qc = false)
{
MO_Oauth_Debug::mo_oauth_log("This is test configuration flow => ");
echo "<div style="font-family:Calibri;padding:0 3%;">";
echo "<style>table{border-collapse:collapse;}th {background-color: #eee; text-align: center; padding: 8px; border-width:1px; border-style:solid; border-color:#212121;}tr:nth-child(odd) {background-color: #f2f2f2;} td{padding:8px;border-width:1px; border-style:solid; border-color:#212121;}</style>";
echo "<h2>";
echo $Qc ? "Group Info" : "Test Configuration";
echo "</h2><table><tr><th>Attribute Name</th><th>Attribute Value</th></tr>";
$this->testattrmappingconfig('', $wm);
echo "</table>";
if ($Qc) {
goto Nv;
}
echo "<div style="padding: 10px;"></div><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>";
Nv:
}
public function handle_sso($Ti, $eO, $wm, $Ga, $ZX, $A8 = false)
{
MO_Oauth_Debug::mo_oauth_log("SSO handling flow");
global $Ls;
if (!(get_class($this) === "MoOauthClient\LoginHandler" && $Ls->check_versi(1))) {
goto Mx;
}
$N7 = new InstanceHelper();
$xc = $N7->get_login_handler_instance();
$xc->handle_sso($Ti, $eO, $wm, $Ga, $ZX, $A8);
Mx:
$na = isset($eO["name_attr"]) ? $eO["name_attr"] : '';
$t3 = isset($eO["email_attr"]) ? $eO["email_attr"] : '';
$R_ = $Ls->getnestedattribute($wm, $t3);
$CH = $Ls->getnestedattribute($wm, $na);
if (!empty($R_)) {
goto xa;
}
MO_Oauth_Debug::mo_oauth_log("Email address not received. Check your Attribute Mapping configuration.");
$Ls->handle_error("Email address not received. Check your <strong>Attribute Mapping</strong> configuration.");
wp_die("Email address not received. Check your <strong>Attribute Mapping</strong> configuration.");
xa:
if (!(false === strpos($R_, "@"))) {
goto Bt;
}
MO_Oauth_Debug::mo_oauth_log("Mapped Email attribute does not contain valid email.");
$Ls->handle_error("Mapped Email attribute does not contain valid email.");
wp_die("Mapped Email attribute does not contain valid email.");
Bt:
$user = get_user_by("login", $R_);
if ($user) {
goto cE;
}
$user = get_user_by("email", $R_);
cE:
if ($user) {
goto bl;
}
$fw = 0;
if ($Ls->mo_oauth_hbca_xyake()) {
goto PY;
}
$user = $Ls->mo_oauth_hjsguh_kiishuyauh878gs($R_, $CH);
goto bg;
PY:
if ($Ls->mo_oauth_client_get_option("mo_oauth_flag") !== true) {
goto Bo;
}
$kC = base64_decode('PGRpdiBzdHlsZT0ndGV4dC1hbGlnbjpjZW50ZXI7Jz48Yj5Vc2VyIEFjY291bnQgZG9lcyBub3QgZXhpc3QuPC9iPjwvZGl2Pjxicj48c21hbGw+VGhpcyB2ZXJzaW9uIHN1cHBvcnRzIEF1dG8gQ3JlYXRlIFVzZXIgZmVhdHVyZSB1cHRvIDEwIFVzZXJzLiBQbGVhc2UgdXBncmFkZSB0byB0aGUgaGlnaGVyIHZlcnNpb24gb2YgdGhlIHBsdWdpbiB0byBlbmFibGUgYXV0byBjcmVhdGUgdXNlciBmb3IgdW5saW1pdGVkIHVzZXJzIG9yIGFkZCB1c2VyIG1hbnVhbGx5Ljwvc21hbGw+');
$Ls->handle_error($kC);
MO_Oauth_Debug::mo_oauth_log($kC);
wp_die($kC);
goto YP;
Bo:
$user = $Ls->mo_oauth_jhuyn_jgsukaj($R_, $CH);
YP:
bg:
goto Ua;
bl:
$fw = $user->ID;
Ua:
if (!$user) {
goto iI;
}
wp_set_current_user($user->ID);
MO_Oauth_Debug::mo_oauth_log("User Found");
$Ta = false;
$Ta = apply_filters("mo_remember_me", $Ta);
if (!$Ta) {
goto gO;
}
MO_Oauth_Debug::mo_oauth_log("Remember Addon activated");
gO:
wp_set_auth_cookie($user->ID, $Ta);
MO_Oauth_Debug::mo_oauth_log("User cookie set");
$user = get_user_by("ID", $user->ID);
do_action("wp_login", $user->user_login, $user);
wp_safe_redirect(home_url());
MO_Oauth_Debug::mo_oauth_log("User Redirected to home url");
exit;
iI:
}
public function get_resource_owner_from_app($VS, $Gl)
{
return $this->oauth_handler->get_resource_owner_from_id_token($VS);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace MoOauthClient;
use MoOauthClient\Base\InstanceHelper;
use MoOauthClient\MO_Custom_OAuth1;
use MoOauthClient\OauthHandler;
use MoOauthClient\StorageManager;
class LoginHandler
{
public $oauth_handler;
public function __construct()
{
$this->oauth_handler = new OauthHandler();
add_action("\151\x6e\x69\x74", array($this, "\155\157\x5f\157\x61\x75\x74\x68\x5f\144\145\x63\x69\144\145\137\x66\154\x6f\167"));
add_action("\155\x6f\137\157\x61\x75\164\150\137\x63\154\151\x65\x6e\164\137\164\x69\147\x68\x74\x5f\x6c\157\147\151\x6e\137\151\156\164\x65\x72\156\x61\154", array($this, "\x68\x61\x6e\x64\x6c\x65\137\163\x73\x6f"), 10, 4);
}
public function mo_oauth_decide_flow()
{
global $Ls;
if (!(isset($_REQUEST[\MoOAuthConstants::OPTION]) && "\x74\145\x73\x74\141\x74\164\162\x6d\x61\x70\160\x69\156\x67\143\x6f\x6e\146\x69\x67" === $_REQUEST[\MoOAuthConstants::OPTION])) {
goto yv;
}
$Uh = isset($_REQUEST["\x61\x70\160"]) ? sanitize_text_field(wp_unslash($_REQUEST["\141\x70\x70"])) : '';
wp_safe_redirect(site_url() . "\x3f\157\x70\164\151\x6f\x6e\75\x6f\141\165\164\x68\x72\145\x64\x69\162\x65\x63\x74\46\x61\160\x70\x5f\156\x61\155\x65\75" . rawurlencode($Uh) . "\x26\x74\x65\x73\x74\75\x74\x72\165\145");
exit;
yv:
$this->mo_oauth_login_validate();
}
public function mo_oauth_login_validate()
{
global $Ls;
$Tj = $Ls->get_plugin_config()->get_current_config();
$ss = true;
$ss = $Ls->mo_oauth_aemoutcrahsaphtn() == "\145\x6e\x61\x62\x6c\x65\x64" ? false : true;
$bT = new StorageManager();
if (!(isset($_REQUEST[\MoOAuthConstants::OPTION]) && !is_array($_REQUEST["\157\x70\x74\x69\x6f\156"]) && strpos(sanitize_text_field(wp_unslash($_REQUEST[\MoOAuthConstants::OPTION])), "\157\141\x75\164\x68\x72\145\144\x69\162\145\x63\x74") !== false)) {
goto Ep;
}
if ($ss) {
goto Ju;
}
wp_safe_redirect(site_url() . "\x2f\x77\160\x2d\141\144\x6d\151\x6e");
exit;
Ju:
if (isset($_REQUEST["\x6d\x6f\x5f\154\157\147\x69\156\137\160\x6f\160\165\x70"])) {
goto qJ;
}
if (!(isset($_REQUEST["\162\145\163\157\x75\x72\x63\145"]) && !empty($_REQUEST["\x72\145\163\157\165\x72\x63\x65"]))) {
goto vk;
}
if (!empty($_REQUEST["\162\x65\x73\157\165\x72\x63\x65"])) {
goto gf;
}
$Ls->handle_error("\124\150\145\40\x72\145\x73\160\x6f\156\x73\145\40\146\162\x6f\155\40\165\x73\145\x72\x69\156\146\157\40\x77\141\x73\x20\x65\155\x70\x74\171\56");
MO_Oauth_Debug::mo_oauth_log("\124\150\x65\x20\x72\x65\163\160\x6f\x6e\163\x65\x20\x66\162\x6f\155\x20\x75\x73\x65\162\x69\156\x66\x6f\x20\167\x61\x73\x20\145\155\160\x74\x79\x2e");
wp_die(wp_kses("\x54\150\x65\40\x72\x65\163\160\x6f\x6e\x73\145\x20\146\x72\x6f\x6d\x20\165\x73\x65\162\x69\x6e\x66\x6f\40\x77\x61\x73\40\x65\155\x70\x74\x79\56", \mo_oauth_get_valid_html()));
gf:
$bT = new StorageManager(isset($_REQUEST["\x72\145\x73\157\165\162\x63\x65"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["\162\145\163\157\x75\162\x63\145"]))) : '');
$wm = $bT->get_value("\162\x65\x73\x6f\165\162\x63\145");
$Ti = $bT->get_value("\141\x70\x70\156\141\x6d\x65");
$wx = $bT->get_value("\x72\x65\x64\x69\162\x65\x63\164\x5f\165\x72\x69");
$Rl = $bT->get_value("\141\143\143\x65\x73\163\137\x74\157\x6b\145\x6e");
$eO = $Ls->get_app_by_name($Ti)->get_app_config();
$Bn = isset($_REQUEST["\x74\x65\163\x74"]) && !empty($_REQUEST["\164\145\163\x74"]);
if (!($Bn && '' !== $Bn)) {
goto Ok;
}
$this->handle_group_test_conf($wm, $eO, $Rl, false, $Bn);
exit;
Ok:
$bT->remove_key("\162\x65\163\x6f\165\162\143\145");
$bT->add_replace_entry("\x70\x6f\160\165\x70", "\151\147\x6e\157\x72\145");
if (!has_filter("\167\157\x6f\x63\x6f\155\x6d\x65\162\143\145\x5f\143\150\145\143\x6b\157\165\x74\x5f\147\145\x74\x5f\166\141\154\165\145")) {
goto dp;
}
$wm["\141\x70\x70\x6e\x61\x6d\145"] = $Ti;
dp:
do_action("\x6d\157\x5f\x61\x62\162\x5f\x66\x69\x6c\x74\145\162\137\154\157\x67\151\156", $wm);
$this->handle_sso($Ti, $eO, $wm, $bT->get_state(), ["\x61\x63\143\x65\163\163\x5f\164\157\x6b\145\156" => $Rl]);
vk:
if (isset($_REQUEST["\141\x70\160\x5f\x6e\x61\155\145"])) {
goto FK;
}
$mP = "\x50\154\145\x61\x73\x65\x20\x63\x68\x65\x63\x6b\40\x69\146\x20\x79\x6f\x75\x20\x61\x72\x65\x20\x73\145\156\x64\x69\156\147\x20\x74\150\x65\x20\47\x61\x70\160\x5f\x6e\141\x6d\x65\47\40\x70\141\x72\141\x6d\145\x74\x65\x72";
$Ls->handle_error($mP);
MO_Oauth_Debug::mo_oauth_log($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
FK:
$Th = isset($_REQUEST["\x61\160\160\137\156\x61\155\x65"]) && !empty($_REQUEST["\x61\160\x70\x5f\x6e\141\x6d\145"]) ? sanitize_text_field(wp_unslash($_REQUEST["\141\x70\160\x5f\x6e\x61\155\x65"])) : '';
if (!($Th == '')) {
goto Wx;
}
$mP = "\116\157\40\163\x75\x63\x68\x20\141\x70\x70\x20\x66\x6f\x75\x6e\144\x20\143\x6f\156\146\151\147\x75\162\145\x64\56\x20\120\x6c\145\x61\163\x65\x20\x63\x68\145\143\x6b\40\151\x66\x20\171\x6f\x75\40\x61\x72\145\40\x73\145\156\144\151\x6e\147\x20\164\x68\145\x20\x63\x6f\x72\x72\x65\143\x74\40\x61\x70\x70\137\156\x61\x6d\x65";
MO_Oauth_Debug::mo_oauth_log($mP);
$Ls->handle_error($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
Wx:
$xx = $Ls->mo_oauth_client_get_option("\x6d\x6f\x5f\x6f\141\x75\x74\x68\x5f\141\160\160\x73\137\154\x69\x73\164");
if (is_array($xx) && isset($xx[$Th])) {
goto cO;
}
$mP = "\116\x6f\x20\x73\x75\x63\150\x20\x61\x70\160\x20\146\157\165\x6e\144\40\143\157\156\146\151\x67\165\162\x65\144\56\x20\x50\154\x65\x61\x73\145\40\143\150\145\143\x6b\x20\x69\146\40\171\x6f\x75\40\141\x72\x65\x20\163\x65\156\144\x69\156\x67\x20\164\150\x65\40\x63\x6f\162\x72\145\x63\x74\40\x61\160\x70\x5f\156\141\x6d\x65";
MO_Oauth_Debug::mo_oauth_log($mP);
$Ls->handle_error($mP);
wp_die(wp_kses($mP, \mo_oauth_get_valid_html()));
exit;
cO:
$ll = "\x2f\57" . $_SERVER["\x48\124\x54\120\137\x48\x4f\x53\124"] . $_SERVER["\122\x45\x51\125\105\x53\124\137\x55\x52\x49"];
$ll = strtok($ll, "\77");
$x5 = isset($_REQUEST["\x72\x65\x64\151\162\x65\x63\x74\137\165\162\154"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["\162\145\x64\x69\162\145\143\x74\137\x75\162\154"]))) : $ll;
$Bn = isset($_REQUEST["\x74\145\x73\x74"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["\x74\x65\163\164"]))) : false;
$CY = isset($_REQUEST["\162\145\163\164\162\151\143\x74\x72\145\x64\151\x72\x65\x63\164"]) ? sanitize_text_field(wp_unslash(urldecode($_REQUEST["\x72\145\x73\164\162\x69\x63\x74\162\x65\x64\151\162\x65\x63\164"]))) : false;
$Ro = $Ls->get_app_by_name($Th);
$V_ = $Ro->get_app_config("\147\x72\141\156\164\137\x74\171\x70\145");
if (!is_multisite()) {
goto ae;
}
$blog_id = get_current_blog_id();
$T2 = $Ls->mo_oauth_client_get_option("\155\x6f\x5f\157\x61\165\x74\x68\x5f\143\x33\126\151\x63\62\154\60\132\x58\x4e\x7a\132\x57\x78\154\x59\x33\122\154\132\x41");
$j5 = array();
if (!isset($T2)) {
goto dV;
}
$j5 = json_decode($Ls->mooauthdecrypt($T2), true);
dV:
$MQ = false;
$Hx = $Ls->mo_oauth_client_get_option("\155\157\137\x6f\x61\165\x74\x68\x5f\x69\x73\115\165\x6c\164\151\x53\151\x74\145\x50\x6c\165\x67\151\156\x52\x65\161\165\x65\163\164\x65\x64");
if (!(is_array($j5) && in_array($blog_id, $j5))) {
goto AY;
}
$MQ = true;
AY:
if (!(is_multisite() && $Hx && ($Hx && !$MQ) && !$Bn && $Ls->mo_oauth_client_get_option("\156\x6f\x4f\146\x53\165\x62\123\151\164\x65\163") < 1000)) {
goto HS;
}
$Ls->handle_error("\x4c\x6f\147\x69\156\40\x69\163\x20\144\151\x73\141\x62\154\x65\x64\x20\x66\157\162\40\x74\150\x69\x73\40\x73\x69\164\145\x2e\40\120\154\145\141\163\145\40\x63\x6f\156\164\141\143\164\x20\171\x6f\165\x72\40\141\144\x6d\x69\156\x69\x73\x74\x72\x61\x74\157\162\56");
MO_Oauth_Debug::mo_oauth_log("\x4c\x6f\147\151\x6e\x20\x69\x73\x20\x64\x69\163\x61\x62\x6c\x65\x64\40\x66\x6f\x72\x20\x74\150\x69\163\x20\x73\151\164\x65\56\40\120\x6c\145\x61\163\x65\x20\143\157\x6e\164\x61\143\164\x20\x79\157\165\x72\40\141\144\x6d\x69\x6e\151\163\x74\x72\141\164\x6f\162\x2e");
wp_die("\x4c\157\x67\x69\156\x20\151\163\x20\144\151\163\x61\142\154\x65\x64\40\x66\157\162\40\x74\150\x69\163\40\163\x69\164\x65\x2e\40\120\x6c\x65\141\163\145\40\143\x6f\x6e\164\141\x63\164\x20\171\x6f\x75\162\x20\141\x64\x6d\151\x6e\151\163\164\162\x61\x74\157\162\x2e");
HS:
$bT->add_replace_entry("\142\154\x6f\147\x5f\151\144", $blog_id);
ae:
MO_Oauth_Debug::mo_oauth_log("\107\162\x61\x6e\164\72\x20" . $V_);
if ($V_ && "\120\141\x73\163\x77\x6f\162\x64\40\107\162\141\156\x74" === $V_) {
goto ab;
}
if (!($V_ && "\103\154\x69\145\156\x74\x20\x43\162\145\144\x65\x6e\x74\x69\x61\x6c\x73\x20\107\162\x61\156\164" === $V_)) {
goto Nd;
}
do_action("\155\157\137\157\x61\x75\164\x68\x5f\x63\x6c\151\x65\x6e\x74\x5f\x63\162\145\144\145\156\164\151\141\x6c\163\x5f\x67\162\141\156\x74\x5f\151\156\151\164\x69\x61\x74\145", $Th, $Bn);
exit;
Nd:
goto c3;
ab:
do_action("\x70\x77\144\x5f\x65\163\x73\145\x6e\164\x69\x61\x6c\163\x5f\151\156\164\145\162\x6e\x61\x6c");
do_action("\x6d\x6f\x5f\x6f\141\x75\164\150\137\143\x6c\151\145\x6e\164\137\141\144\x64\137\160\x77\x64\137\x6a\163");
echo "\x9\11\11\x9\74\163\x63\162\151\160\164\x3e\xd\xa\x9\x9\11\x9\x9\x76\141\x72\x20\x6d\157\137\x6f\x61\165\x74\x68\x5f\x61\160\x70\137\x6e\141\155\145\x20\75\40\42";
echo wp_kses($Th, \mo_oauth_get_valid_html());
echo "\42\73\xd\xa\11\11\11\11\x9\144\157\x63\165\x6d\145\156\164\56\x61\144\x64\105\166\145\x6e\x74\x4c\151\163\164\145\156\x65\x72\50\x27\x44\117\x4d\x43\157\x6e\164\145\x6e\x74\114\157\x61\x64\x65\x64\47\54\x20\146\165\x6e\x63\164\151\x6f\156\x28\x29\x20\x7b\15\xa\11\x9\11\11\11\x9";
if ($Bn) {
goto qP;
}
echo "\x9\x9\x9\x9\x9\11\x9\x6d\157\117\101\x75\x74\x68\x4c\x6f\147\x69\x6e\x50\x77\x64\x28\155\157\137\x6f\141\x75\x74\x68\x5f\x61\x70\160\x5f\156\141\155\145\x2c\x20\146\141\x6c\163\x65\54\x20\x27";
echo esc_url($x5);
echo "\47\51\x3b\15\xa\x9\11\11\x9\x9\x9";
goto XG;
qP:
echo "\x9\11\11\x9\11\x9\11\x6d\157\117\x41\165\x74\x68\114\x6f\147\151\156\120\x77\144\x28\155\x6f\137\157\141\x75\164\x68\x5f\x61\160\x70\137\x6e\141\155\145\x2c\x20\164\x72\165\x65\54\x20\x27";
echo esc_url($x5);
echo "\x27\x29\x3b\15\12\x9\11\x9\x9\x9\x9";
XG:
echo "\x9\x9\x9\x9\11\x7d\54\40\x66\x61\x6c\x73\145\x29\x3b\15\12\x9\11\x9\x9\x3c\x2f\163\x63\162\x69\x70\164\x3e\15\xa\x9\11\x9\11";
exit;
c3:
if (!($Ro->get_app_config("\141\160\160\x49\144") === "\164\167\x69\164\164\x65\162" || $Ro->get_app_config("\141\x70\160\x49\x64") === "\x6f\141\x75\164\x68\x31")) {
goto xn;
}
MO_Oauth_Debug::mo_oauth_log("\117\x61\x75\164\150\x31\40\x66\x6c\157\167");
$Bn = isset($_REQUEST["\x74\x65\163\x74"]) && !empty($_REQUEST["\164\x65\x73\164"]);
if (!($Bn && '' !== $Bn)) {
goto YV;
}
setcookie("\x6f\141\x75\x74\150\61\137\164\x65\x73\x74", "\x31", time() + 20);
YV:
setcookie("\157\141\165\x74\150\x31\141\160\x70\x6e\141\155\x65", $Th, time() + 60);
$_COOKIE["\x6f\141\165\x74\x68\x31\x61\160\160\x6e\x61\155\145"] = $Th;
MO_Custom_OAuth1::mo_oauth1_auth_request($Th);
exit;
xn:
$ng = md5(rand(0, 15));
$bT->add_replace_entry("\x61\160\x70\156\141\x6d\145", $Th);
$bT->add_replace_entry("\162\x65\x64\151\x72\x65\x63\164\x5f\x75\x72\151", $x5);
$bT->add_replace_entry("\x74\145\x73\164\137\143\157\x6e\x66\x69\147", $Bn);
$bT->add_replace_entry("\162\145\163\x74\162\x69\x63\164\162\145\x64\x69\x72\x65\143\164", $CY);
$bT->add_replace_entry("\163\x74\x61\164\x65\137\156\157\156\143\x65", $ng);
$bT = apply_filters("\x6d\x6f\137\x6f\141\165\x74\150\137\163\x65\x74\137\x63\165\163\164\x6f\155\137\x73\x74\157\x72\141\147\x65", $bT);
$Ga = $bT->get_state();
$Ga = apply_filters("\163\164\x61\164\x65\137\151\156\x74\x65\x72\156\x61\154", $Ga);
$sW = $Ro->get_app_config("\141\x75\164\x68\x6f\162\151\172\145\165\x72\154");
if (!($Ro->get_app_config("\x73\x65\x6e\x64\x5f\163\x74\x61\x74\x65") === false || $Ro->get_app_config("\x73\x65\x6e\x64\137\163\x74\141\164\145") === '')) {
goto f1;
}
$Ro->update_app_config("\163\145\x6e\144\x5f\x73\164\x61\x74\x65", 1);
$Ls->set_app_by_name($Th, $Ro->get_app_config('', false));
f1:
if ($Ro->get_app_config("\x73\145\x6e\x64\137\x73\164\x61\x74\x65")) {
goto PQ;
}
setcookie("\163\164\141\x74\x65\x5f\x70\141\x72\x61\x6d", $Ga, time() + 60);
PQ:
$HG = $Ro->get_app_config("\160\x6b\143\145\x5f\x66\154\157\167");
$wx = $Ro->get_app_config("\x72\x65\144\151\x72\x65\x63\x74\137\x75\162\x69");
$PF = urlencode($Ro->get_app_config("\x63\154\151\145\156\164\x5f\x69\x64"));
$wx = empty($wx) ? \site_url() : $wx;
if ($HG && 1 === $HG) {
goto wt;
}
$Wd = $Ro->get_app_config("\163\x65\x6e\144\x5f\x73\164\x61\x74\x65") ? "\46\163\x74\141\x74\145\75" . $Ga : '';
if ($Ro->get_app_config("\x73\145\x6e\144\137\163\x74\141\164\145")) {
goto An;
}
setcookie("\x73\164\x61\x74\145\x5f\160\141\x72\x61\x6d", $Ga, time() + 60);
MO_Oauth_Debug::mo_oauth_log("\x73\164\x61\x74\145\40\160\x61\162\x61\155\145\164\145\162\x20\156\x6f\x74\40\x73\145\x6e\x74");
goto Kj;
An:
MO_Oauth_Debug::mo_oauth_log("\x73\164\x61\x74\x65\40\160\x61\x72\x61\155\x65\164\145\x72\x20\x73\145\156\x74");
Kj:
if (strpos($sW, "\77") !== false) {
goto YF;
}
$sW = $sW . "\77\143\x6c\151\145\156\x74\x5f\151\144\x3d" . $PF . "\x26\x73\143\157\x70\145\x3d" . $Ro->get_app_config("\x73\x63\x6f\160\x65") . "\46\x72\x65\x64\x69\162\x65\143\x74\x5f\165\162\x69\75" . urlencode($wx) . "\x26\x72\145\x73\x70\x6f\156\163\x65\137\164\x79\160\145\x3d\x63\157\x64\x65" . $Wd;
goto tU;
YF:
$sW = $sW . "\46\143\x6c\x69\x65\156\x74\x5f\x69\144\x3d" . $PF . "\46\163\x63\157\160\x65\x3d" . $Ro->get_app_config("\x73\x63\x6f\x70\145") . "\x26\162\145\x64\x69\162\x65\143\164\137\x75\x72\151\x3d" . urlencode($wx) . "\46\162\145\163\x70\x6f\x6e\x73\x65\x5f\x74\171\160\x65\75\143\157\144\x65" . $Wd;
tU:
goto OV;
wt:
MO_Oauth_Debug::mo_oauth_log("\x50\x4b\103\105\x20\146\154\157\167");
$l9 = bin2hex(openssl_random_pseudo_bytes(32));
$Cg = $Ls->base64url_encode(pack("\110\52", $l9));
$cJ = $Ls->base64url_encode(pack("\x48\52", hash("\x73\x68\141\62\x35\66", $Cg)));
$bT->add_replace_entry("\x63\157\144\x65\137\166\x65\x72\x69\x66\151\145\162", $Cg);
$Ga = $bT->get_state();
$Wd = $Ro->get_app_config("\163\145\156\144\x5f\x73\164\141\x74\145") ? "\46\x73\164\141\164\145\x3d" . $Ga : '';
if ($Ro->get_app_config("\x73\145\x6e\144\137\x73\164\141\164\145")) {
goto OD;
}
MO_Oauth_Debug::mo_oauth_log("\163\x74\x61\x74\x65\x20\x70\x61\162\141\155\x65\164\145\162\40\x6e\157\164\x20\163\x65\x6e\164");
goto Sd;
OD:
MO_Oauth_Debug::mo_oauth_log("\163\164\141\164\x65\40\x70\141\162\141\x6d\x65\164\145\x72\x20\163\x65\x6e\x74");
Sd:
if (strpos($sW, "\x3f") !== false) {
goto MY;
}
$sW = $sW . "\x3f\x63\154\151\x65\x6e\164\x5f\151\x64\75" . $PF . "\x26\163\x63\157\160\x65\x3d" . $Ro->get_app_config("\163\143\x6f\x70\x65") . "\x26\162\145\144\151\x72\145\143\x74\137\x75\x72\151\75" . urlencode($wx) . "\x26\162\x65\x73\x70\157\x6e\x73\x65\x5f\164\171\160\145\x3d\143\x6f\x64\x65" . $Wd . "\x26\x63\157\144\145\137\143\150\141\x6c\154\x65\x6e\x67\x65\75" . $cJ . "\46\143\157\144\x65\x5f\143\150\x61\154\x6c\145\156\147\145\x5f\155\x65\x74\x68\x6f\144\75\x53\x32\x35\66";
goto Ar;
MY:
$sW = $sW . "\x26\x63\x6c\151\145\156\x74\137\151\144\75" . $PF . "\46\x73\143\x6f\x70\145\75" . $Ro->get_app_config("\x73\143\x6f\160\x65") . "\x26\162\x65\x64\151\162\145\x63\x74\137\x75\x72\x69\75" . urlencode($wx) . "\46\x72\145\x73\160\157\x6e\x73\x65\x5f\164\x79\x70\x65\x3d\x63\x6f\x64\x65" . $Wd . "\x26\143\x6f\144\145\x5f\x63\x68\141\154\x6c\145\156\147\145\75" . $cJ . "\46\x63\x6f\x64\x65\x5f\x63\150\141\154\x6c\x65\156\147\x65\137\x6d\x65\x74\150\x6f\144\75\x53\x32\65\x36";
Ar:
OV:
if (!(null !== $Ro->get_app_config("\x73\145\156\x64\x5f\x6e\x6f\156\143\145") && $Ro->get_app_config("\163\x65\156\144\x5f\x6e\157\156\x63\x65"))) {
goto zz;
}
$Q0 = md5(rand());
$Ls->set_transient("\x6d\x6f\x5f\157\x61\x75\x74\150\137\156\157\x6e\143\x65\x5f" . $Q0, $Q0, time() + 120);
$sW = $sW . "\46\156\x6f\x6e\143\x65\x3d" . $Q0;
MO_Oauth_Debug::mo_oauth_log("\x6e\157\x6e\143\145\40\x70\x61\x72\141\x6d\145\164\x65\162\40\163\x65\156\164");
zz:
if (!(strpos($sW, "\141\160\x70\154\145") !== false)) {
goto M5;
}
$sW = $sW . "\46\162\x65\163\160\157\156\x73\145\137\x6d\x6f\144\x65\75\x66\157\x72\155\x5f\x70\157\x73\x74";
M5:
if (!(isset($_SERVER["\x52\105\x51\x55\105\x53\x54\137\x55\x52\111"]) and strpos($_SERVER["\122\x45\121\125\x45\x53\124\x5f\125\x52\111"], "\155\x6f\157\x69\144\143\x63\141\154\x6c\142\x61\x63\153") !== false)) {
goto IJ;
}
if (!($Ro->get_app_config("\141\160\x70\x49\144") == "\x56\x65\156\x64\141\x73\164\141" && isset($_REQUEST["\141\x63\143\157\x75\156\164\x5f\x69\144"]))) {
goto Qs;
}
$sW .= "\x26\x61\x63\x63\x6f\165\x6e\164\137\x69\144\75" . $_REQUEST["\x61\x63\143\157\x75\x6e\x74\137\x69\x64"];
Qs:
IJ:
$sW = apply_filters("\x6d\x6f\x5f\x61\165\164\150\137\165\x72\x6c\137\151\156\x74\145\x72\x6e\141\x6c", $sW, $Th);
MO_Oauth_Debug::mo_oauth_log("\x41\x75\164\x68\157\162\151\x7a\141\x69\157\x6e\x20\x45\x6e\144\160\x6f\x69\x6e\164\40\x3d\76\40" . $sW);
header("\x4c\x6f\143\141\x74\151\x6f\x6e\72\x20" . $sW);
exit;
qJ:
Ep:
if (isset($_GET["\145\x72\x72\x6f\x72\137\144\145\163\x63\x72\x69\160\164\x69\x6f\156"])) {
goto tA;
}
if (!isset($_GET["\x65\x72\x72\x6f\162"])) {
goto d0;
}
if (!empty($_GET["\x65\x72\x72\157\x72"])) {
goto AZ;
}
MO_Oauth_Debug::mo_oauth_log("\x52\145\143\145\x69\166\x65\144\54\x20\x45\155\160\x74\x79\40\x45\162\x72\157\162\40\146\162\x6f\x6d\40\x41\x75\x74\150\157\x72\x69\x7a\145\40\x45\156\x64\160\157\x69\x6e\164");
return;
AZ:
do_action("\155\157\x5f\x72\x65\x64\x69\x72\x65\x63\x74\137\x74\157\137\x63\x75\x73\164\157\x6d\137\145\x72\x72\x6f\162\137\x70\141\147\x65");
$Jo = "\105\162\162\157\162\40\x66\162\157\x6d\40\101\x75\x74\x68\157\x72\151\x7a\x65\x20\105\156\144\x70\157\151\156\x74\72\40" . sanitize_text_field(wp_unslash($_GET["\x65\x72\x72\157\162"]));
MO_Oauth_Debug::mo_oauth_log($Jo);
$Ls->handle_error($Jo);
wp_die($Jo);
d0:
goto YU;
tA:
if (!(strpos($_GET["\163\x74\x61\164\x65"], "\144\x6f\153\141\x6e\55\163\164\x72\x69\x70\x65\55\x63\157\x6e\156\x65\x63\x74") !== false)) {
goto kH;
}
return;
kH:
do_action("\155\x6f\137\162\145\x64\x69\x72\x65\143\x74\x5f\x74\x6f\137\x63\165\x73\x74\157\x6d\137\x65\162\162\x6f\162\x5f\160\x61\147\145");
$qm = "\x45\x72\162\x6f\162\40\144\x65\163\x63\162\x69\160\164\151\157\156\40\146\162\x6f\155\40\x41\165\x74\x68\x6f\x72\x69\172\145\x20\x45\x6e\144\x70\x6f\x69\156\x74\72\x20" . sanitize_text_field($_GET["\x65\162\x72\157\162\137\x64\145\163\x63\162\151\x70\x74\x69\x6f\x6e"]);
MO_Oauth_Debug::mo_oauth_log($qm);
$Ls->handle_error($qm);
wp_die($qm);
YU:
if (!(strpos($_SERVER["\122\105\x51\125\105\x53\124\x5f\125\x52\x49"], "\157\x70\x65\156\x69\x64\143\141\154\154\x62\141\x63\x6b") !== false || strpos($_SERVER["\x52\x45\x51\125\x45\123\124\x5f\125\x52\x49"], "\x6f\x61\x75\164\150\137\x74\157\153\145\x6e") !== false && strpos($_SERVER["\x52\105\121\x55\105\123\x54\137\x55\122\x49"], "\157\x61\165\164\x68\137\x76\145\162\151\x66\151\x65\162"))) {
goto dU;
}
MO_Oauth_Debug::mo_oauth_log("\117\x61\165\164\x68\x31\40\x63\141\x6c\154\142\141\143\153\40\x66\x6c\x6f\167");
if (!empty($_COOKIE["\157\x61\x75\164\x68\x31\141\x70\160\156\x61\x6d\145"])) {
goto pH;
}
MO_Oauth_Debug::mo_oauth_log("\122\x65\164\x75\x72\x6e\x69\x6e\147\40\146\162\x6f\155\x20\x4f\x41\x75\164\150\61");
return;
pH:
MO_Oauth_Debug::mo_oauth_log("\117\x41\165\164\x68\61\x20\141\x70\160\40\x66\x6f\165\156\144");
$Th = $_COOKIE["\x6f\141\165\x74\150\61\x61\160\160\x6e\x61\155\x65"];
$wm = MO_Custom_OAuth1::mo_oidc1_get_access_token($_COOKIE["\x6f\141\165\x74\x68\61\x61\x70\160\156\141\155\145"]);
$He = apply_filters("\x6d\157\137\164\162\x5f\x61\146\x74\145\162\137\x70\162\157\x66\151\x6c\145\137\151\x6e\x66\x6f\x5f\145\170\164\162\x61\x63\x74\x69\x6f\x6e\x5f\x66\x72\157\155\137\x74\157\x6b\145\156", $wm);
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("\155\x6f\x5f\x6f\x61\165\164\150\x5f\141\x74\164\162\137\156\141\155\145\137\154\151\x73\164" . $Th, $qP);
if (!(isset($_COOKIE["\157\x61\x75\x74\x68\61\137\x74\x65\163\164"]) && $_COOKIE["\x6f\141\x75\x74\150\61\x5f\x74\x65\x73\x74"] == "\61")) {
goto cu;
}
$Ro = $Ls->get_app_by_name($Th);
$jA = $Ro->get_app_config();
$this->render_test_config_output($wm, false, $jA, $Th);
exit;
cu:
$Ro = $Ls->get_app_by_name($Th);
$na = $Ro->get_app_config("\165\x73\145\162\x6e\x61\155\145\x5f\x61\164\x74\162");
$t3 = isset($eO["\x65\x6d\141\x69\x6c\x5f\x61\x74\164\162"]) ? $eO["\x65\155\x61\151\154\x5f\141\x74\164\162"] : '';
$R_ = $Ls->getnestedattribute($wm, $t3);
$CH = $Ls->getnestedattribute($wm, $na);
if (!empty($CH)) {
goto kf;
}
MO_Oauth_Debug::mo_oauth_log("\125\163\145\162\x6e\x61\155\x65\40\x6e\x6f\164\x20\x72\x65\143\x65\151\166\x65\144\56\x50\154\145\141\163\x65\40\x63\157\x6e\146\x69\147\165\x72\x65\x20\101\164\x74\162\151\142\x75\x74\145\x20\115\141\x70\160\x69\156\147");
$Ls->handle_error("\125\163\145\162\x6e\141\x6d\x65\x20\156\157\164\x20\162\x65\143\145\151\x76\x65\144\x2e\120\x6c\145\x61\163\145\40\x63\x6f\x6e\x66\151\147\x75\x72\x65\40\101\x74\164\162\x69\142\x75\164\x65\40\115\141\160\x70\151\156\x67");
wp_die("\x55\163\145\162\156\141\x6d\x65\40\156\x6f\x74\40\x72\x65\143\145\x69\166\x65\144\x2e\120\154\145\x61\163\145\40\x63\157\156\x66\151\x67\x75\x72\x65\40\101\x74\x74\162\151\x62\165\164\145\40\x4d\x61\x70\160\151\156\147");
kf:
if (!empty($R_)) {
goto eX;
}
$user = get_user_by("\154\157\147\151\156", $CH);
goto fT;
eX:
$R_ = $Ls->getnestedattribute($wm, $t3);
if (!(false === strpos($R_, "\x40"))) {
goto fX;
}
MO_Oauth_Debug::mo_oauth_log("\115\x61\x70\x70\x65\x64\x20\105\x6d\x61\x69\154\x20\x61\164\164\162\151\142\x75\x74\x65\40\x64\157\x65\x73\40\156\157\164\40\143\x6f\x6e\164\141\151\156\40\x76\141\x6c\x69\x64\x20\145\x6d\141\151\x6c\x2e");
$Ls->handle_error("\115\x61\160\160\x65\144\x20\105\x6d\x61\151\154\40\x61\x74\164\x72\x69\142\x75\x74\145\x20\x64\x6f\x65\163\40\x6e\x6f\164\40\x63\x6f\156\164\x61\151\x6e\x20\x76\141\x6c\151\144\x20\145\155\141\x69\154\x2e");
wp_die("\x4d\141\160\160\x65\x64\x20\x45\x6d\141\151\x6c\40\141\x74\164\162\x69\x62\x75\164\145\40\x64\x6f\x65\163\40\156\157\164\40\143\157\x6e\164\141\x69\156\40\166\141\154\151\x64\40\x65\155\x61\151\x6c\56");
fX:
fT:
if ($user) {
goto pG;
}
$fw = 0;
if ($Ls->mo_oauth_hbca_xyake()) {
goto CB;
}
$user = $Ls->mo_oauth_hjsguh_kiishuyauh878gs($R_, $CH);
goto sT;
CB:
if ($Ls->mo_oauth_client_get_option("\x6d\x6f\137\x6f\x61\165\x74\x68\137\x66\x6c\141\x67") !== true) {
goto Gp;
}
$kC = base64_decode('PGRpdiBzdHlsZT0ndGV4dC1hbGlnbjpjZW50ZXI7Jz48Yj5Vc2VyIEFjY291bnQgZG9lcyBub3QgZXhpc3QuPC9iPjwvZGl2Pjxicj48c21hbGw+VGhpcyB2ZXJzaW9uIHN1cHBvcnRzIEF1dG8gQ3JlYXRlIFVzZXIgZmVhdHVyZSB1cHRvIDEwIFVzZXJzLiBQbGVhc2UgdXBncmFkZSB0byB0aGUgaGlnaGVyIHZlcnNpb24gb2YgdGhlIHBsdWdpbiB0byBlbmFibGUgYXV0byBjcmVhdGUgdXNlciBmb3IgdW5saW1pdGVkIHVzZXJzIG9yIGFkZCB1c2VyIG1hbnVhbGx5Ljwvc21hbGw+');
$Ls->handle_error($kC);
MO_Oauth_Debug::mo_oauth_log($kC);
wp_die($kC);
goto Ly;
Gp:
if (!empty($R_)) {
goto MR;
}
$user = $Ls->mo_oauth_jhuyn_jgsukaj($CH, $CH);
goto TR;
MR:
$user = $Ls->mo_oauth_jhuyn_jgsukaj($R_, $CH);
TR:
Ly:
sT:
goto EM;
pG:
$fw = $user->ID;
EM:
if (!$user) {
goto YJ;
}
wp_set_current_user($user->ID);
$Ta = false;
$Ta = apply_filters("\x6d\x6f\137\x72\x65\155\145\x6d\x62\x65\x72\x5f\x6d\x65", $Ta);
wp_set_auth_cookie($user->ID, $Ta);
$user = get_user_by("\x49\x44", $user->ID);
do_action("\167\x70\x5f\154\157\147\151\x6e", $user->user_login, $user);
wp_safe_redirect(home_url());
exit;
YJ:
dU:
if (!isset($_SERVER["\x48\124\124\120\x5f\130\137\122\105\121\x55\105\x53\x54\x45\104\x5f\x57\x49\124\x48"]) && (strpos($_SERVER["\x52\105\121\125\x45\x53\124\x5f\125\x52\111"], "\57\157\141\165\164\x68\143\141\154\154\142\141\143\x6b") !== false || isset($_REQUEST["\x63\x6f\144\x65"]) && !empty($_REQUEST["\143\157\x64\x65"]) && !isset($_REQUEST["\x69\x64\137\x74\x6f\x6b\145\x6e"]))) {
goto W4;
}
if (!empty($_POST["\162\x65\x66\x72\145\163\150\x5f\x74\157\153\145\156"])) {
goto QF;
}
goto A9;
W4:
MO_Oauth_Debug::mo_oauth_log("\x46\154\157\x77\40\162\x65\144\151\162\x65\143\164\145\x64\x20\142\x61\143\153\40\164\157\40\117\x41\x75\164\x68\x20\160\154\x75\147\x69\156\x2e");
MO_Oauth_Debug::mo_oauth_log($_REQUEST);
if (!(isset($_REQUEST["\x70\x6f\x73\164\x5f\x49\104"]) || isset($_REQUEST["\145\144\x64\x2d\x61\x63\164\151\157\156"]))) {
goto PZ;
}
return;
PZ:
if (!(isset($_REQUEST["\160\141\147\145"]) && strcmp($_REQUEST["\160\141\x67\x65"], "\160\155\160\x72\x6f\55\144\151\x73\x63\x6f\165\x6e\x74\143\157\x64\x65\x73") !== false)) {
goto L2;
}
return;
L2:
if (!(strpos($_SERVER["\122\105\x51\x55\x45\x53\x54\x5f\125\x52\111"], "\x2f\x77\160\x2d\152\x73\157\156\x2f\x6d\157\x73\145\x72\166\145\x72\x2f\164\157\153\145\156") !== false)) {
goto gJ;
}
return;
gJ:
if (!($Ls->mo_oauth_aemoutcrahsaphtn() == "\145\156\141\x62\154\145\x64")) {
goto bo;
}
MO_Oauth_Debug::mo_oauth_log("\x53\x53\x4f\40\x44\x69\x73\141\142\154\x65\x64\56\40\120\x6c\145\141\163\x65\x20\143\x6f\x6e\164\141\143\x74\x20\x74\x68\145\40\141\144\x6d\x69\x6e\x69\163\x74\x72\x61\x74\157\162");
wp_die("\123\123\x4f\40\104\x69\163\141\142\x6c\x65\144\56\40\x50\154\x65\x61\163\145\x20\143\x6f\x6e\164\x61\x63\164\40\x74\150\x65\40\141\x64\155\151\156\x69\163\x74\162\141\x74\x6f\x72");
return;
bo:
try {
if (isset($_COOKIE["\163\x74\141\x74\145\137\160\x61\x72\141\x6d"])) {
goto Hv;
}
if (isset($_GET["\x73\164\x61\x74\x65"]) && !empty($_GET["\x73\164\141\164\x65"])) {
goto Qg;
}
$Ez = new StorageManager();
if (!is_multisite()) {
goto wm;
}
$Ez->add_replace_entry("\x62\154\x6f\x67\137\151\x64", 1);
wm:
$du = $Ls->get_app_by_name();
if (isset($_GET["\x61\x70\160\137\156\141\x6d\145"])) {
goto yf;
}
$Ez->add_replace_entry("\141\160\x70\x6e\x61\x6d\x65", $du->get_app_name());
goto F_;
yf:
$Ez->add_replace_entry("\141\x70\160\x6e\141\155\145", sanitize_text_field(wp_unslash($_GET["\x61\160\160\x5f\x6e\x61\x6d\x65"])));
F_:
$Ez->add_replace_entry("\x74\x65\x73\164\x5f\143\157\x6e\x66\x69\147", false);
$Ez->add_replace_entry("\x72\x65\x64\151\162\x65\143\164\137\x75\162\x69", site_url());
$Ga = $Ez->get_state();
goto Oc;
Hv:
MO_Oauth_Debug::mo_oauth_log("\x46\145\164\x63\150\x65\144\x20\163\164\x61\164\x65\40\160\x61\x72\x61\x6d\145\164\x65\162\x20\x66\x72\x6f\x6d\x20\x63\157\157\x6b\151\x65");
$Ga = $_COOKIE["\x73\164\141\164\x65\137\x70\x61\162\x61\x6d"];
goto Oc;
Qg:
$Ga = sanitize_text_field(wp_unslash($_GET["\163\x74\x61\x74\145"]));
Oc:
$bT = new StorageManager($Ga);
MO_Oauth_Debug::mo_oauth_log("\x53\145\164\x20\163\164\157\x72\141\147\145\x20\x6d\x61\x6e\141\x67\145\x72\x20\x66\x72\157\155\40\x73\x74\141\x74\145");
if (!empty($bT->get_value("\141\160\160\156\x61\155\x65"))) {
goto MI;
}
return;
MI:
$Th = $bT->get_value("\x61\160\x70\x6e\141\155\x65");
MO_Oauth_Debug::mo_oauth_log("\101\x70\160\154\151\x63\141\x74\151\x6f\156\x20\103\157\156\146\151\x67\165\x72\x65\144\72\40" . $Th);
$Bn = $bT->get_value("\164\x65\x73\164\x5f\143\x6f\156\x66\151\147");
if (!is_multisite()) {
goto Ag;
}
if (!(empty($bT->get_value("\162\145\144\x69\x72\145\143\x74\145\x64\x5f\x74\x6f\137\163\165\142\163\x69\x74\x65")) || $bT->get_value("\162\x65\x64\x69\162\x65\x63\164\145\x64\137\164\x6f\137\x73\x75\142\x73\x69\x74\x65") !== "\162\x65\x64\151\162\x65\143\x74")) {
goto tf;
}
MO_Oauth_Debug::mo_oauth_log("\122\x65\x64\151\162\145\143\164\x69\x6f\x6e\x20\146\157\x72\x20\155\x75\154\164\151\163\x69\x74\145\40\x65\x6e\x76\151\x72\157\x6e\x6d\145\x6e\x74\56");
$blog_id = $bT->get_value("\x62\154\x6f\147\x5f\x69\144");
$eD = get_site_url($blog_id);
$bT->add_replace_entry("\x72\145\144\x69\162\145\x63\164\145\x64\137\164\x6f\x5f\163\x75\142\163\151\x74\x65", "\162\145\x64\x69\x72\145\143\164");
$J1 = $bT->get_state();
$eD = $eD . "\77\x63\x6f\x64\145\75" . $_REQUEST["\x63\157\144\x65"] . "\x26\x73\x74\141\x74\x65\x3d" . $J1;
MO_Oauth_Debug::mo_oauth_log("\x52\145\144\151\x72\145\143\164\x69\x6e\x67\x20\164\157\40\x73\165\x62\163\x69\x74\145\x20\75\76" . $eD);
wp_redirect($eD);
exit;
tf:
Ag:
$Ti = $Th ? $Th : '';
$xx = $Ls->mo_oauth_client_get_option("\x6d\157\x5f\157\x61\165\x74\x68\x5f\141\160\x70\163\x5f\x6c\x69\163\164");
$na = '';
$t3 = '';
$DE = $Ls->get_app_by_name($Ti);
if ($DE) {
goto Ws;
}
$Ls->handle_error("\x41\x70\x70\x6c\151\143\141\164\x69\157\x6e\40\x6e\x6f\x74\x20\x63\x6f\156\146\x69\147\x75\162\145\144\x2e");
MO_Oauth_Debug::mo_oauth_log("\x41\x70\160\154\x69\x63\141\x74\x69\x6f\156\x20\156\157\164\x20\143\157\x6e\x66\x69\147\x75\x72\145\x64\x2e");
exit("\x41\160\x70\x6c\151\x63\x61\164\151\x6f\x6e\x20\x6e\157\164\40\143\157\156\x66\151\147\x75\162\145\144\56");
Ws:
$eO = $DE->get_app_config();
if (!(isset($eO["\163\x65\x6e\144\137\x6e\x6f\156\143\x65"]) && $eO["\x73\145\156\x64\137\156\157\x6e\x63\145"] === 1)) {
goto Mz;
}
if (!(isset($_REQUEST["\x6e\x6f\x6e\143\145"]) && !$Ls->get_transient("\155\157\137\x6f\141\165\x74\150\x5f\156\157\156\x63\145\x5f" . $_REQUEST["\156\157\x6e\143\x65"]))) {
goto MU;
}
$Jo = "\x4e\x6f\156\143\x65\40\166\x65\x72\151\146\151\x63\x61\x74\x69\157\156\x20\151\x73\40\x66\141\x69\x6c\x65\144\56\x20\x50\x6c\x65\141\x73\x65\40\143\157\x6e\x74\141\143\x74\40\x74\x6f\x20\171\x6f\165\x72\40\141\144\x6d\151\x6e\151\163\164\x72\x61\164\157\162\56";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
MU:
Mz:
$HG = $DE->get_app_config("\x70\153\x63\x65\x5f\146\x6c\157\167");
$Qq = $DE->get_app_config("\160\x6b\x63\145\x5f\143\154\151\145\156\x74\137\163\145\143\162\x65\x74");
$N6 = array("\147\162\x61\156\164\x5f\x74\x79\x70\145" => "\141\165\x74\x68\157\x72\151\x7a\141\x74\x69\x6f\x6e\137\143\157\144\145", "\x63\154\151\145\156\x74\137\x69\144" => $eO["\143\154\151\x65\156\x74\137\151\144"], "\x72\x65\x64\151\162\145\x63\x74\137\x75\162\151" => $eO["\162\145\144\x69\162\145\x63\164\x5f\x75\x72\151"], "\x63\157\x64\x65" => $_REQUEST["\x63\x6f\x64\145"]);
if (!(strpos($eO["\x61\143\x63\145\x73\163\x74\x6f\x6b\x65\x6e\165\x72\154"], "\x73\x65\162\x76\151\x63\x65\163\x2f\x6f\141\165\164\150\x32\57\x74\x6f\x6b\145\x6e") === false && strpos($eO["\x61\143\x63\x65\x73\163\x74\x6f\x6b\145\x6e\x75\162\x6c"], "\x73\x61\154\145\163\146\157\x72\143\145") === false && strpos($eO["\141\143\143\145\x73\163\x74\x6f\153\145\156\x75\162\x6c"], "\x2f\157\x61\x6d\57\x6f\141\165\x74\x68\x32\x2f\x61\x63\143\x65\163\x73\137\x74\157\x6b\x65\156") === false)) {
goto DQ;
}
$N6["\x73\143\157\160\145"] = $DE->get_app_config("\163\143\x6f\160\x65");
DQ:
if ($HG && 1 === $HG) {
goto J2;
}
$N6["\x63\154\151\x65\x6e\x74\137\163\145\x63\x72\145\x74"] = $eO["\x63\x6c\151\145\156\x74\x5f\x73\145\x63\162\x65\x74"];
goto m2;
J2:
if (!($Qq && 1 === $Qq)) {
goto Xw;
}
$N6["\143\154\x69\145\156\x74\137\163\x65\x63\162\145\x74"] = $eO["\x63\x6c\151\145\x6e\x74\x5f\x73\145\143\162\145\x74"];
Xw:
$N6 = apply_filters("\x6d\x6f\x5f\157\x61\165\x74\x68\137\x61\x64\144\x5f\x63\x6c\151\x65\156\x74\x5f\x73\145\143\x72\145\164\x5f\160\x6b\x63\x65\x5f\x66\x6c\157\167", $N6, $eO);
$N6["\x63\157\x64\x65\137\166\x65\x72\x69\x66\151\145\162"] = $bT->get_value("\x63\x6f\144\x65\137\x76\145\162\151\146\x69\145\162");
m2:
$mR = isset($eO["\x73\x65\x6e\x64\137\150\145\x61\x64\145\x72\x73"]) ? $eO["\x73\x65\156\144\137\150\145\141\x64\x65\x72\163"] : 0;
$ax = isset($eO["\x73\x65\x6e\x64\x5f\142\x6f\x64\171"]) ? $eO["\x73\145\156\144\x5f\142\x6f\x64\x79"] : 0;
if ("\x6f\x70\145\x6e\x69\x64\143\x6f\156\x6e\x65\x63\x74" === $DE->get_app_config("\x61\x70\160\x5f\164\x79\160\x65")) {
goto kt;
}
$qS = $eO["\x61\143\x63\145\163\x73\x74\157\153\145\156\x75\162\154"];
MO_Oauth_Debug::mo_oauth_log("\117\101\165\x74\150\x20\146\154\157\x77");
if (strpos($eO["\141\165\x74\150\157\162\151\x7a\x65\165\162\154"], "\143\x6c\145\x76\x65\162\x2e\x63\x6f\x6d\57\x6f\x61\165\164\150") != false || strpos($eO["\141\x63\x63\x65\163\x73\164\x6f\x6b\x65\156\165\x72\x6c"], "\142\x69\x74\162\x69\x78") != false) {
goto Vy;
}
$ZX = json_decode($this->oauth_handler->get_token($qS, $N6, $mR, $ax), true);
goto C1;
Vy:
$ZX = json_decode($this->oauth_handler->get_atoken($qS, $N6, $_GET["\x63\157\x64\145"], $mR, $ax), true);
C1:
if (!(get_current_user_id() && $Bn != 1)) {
goto ol;
}
if (has_filter("\155\157\x5f\157\x61\165\x74\150\x5f\x62\x72\x65\x61\153\137\163\x73\x6f\x5f\146\x6c\x6f\167")) {
goto vB;
}
wp_clear_auth_cookie();
wp_set_current_user(0);
vB:
ol:
$_SESSION["\x70\x72\157\143\x6f\162\145\x5f\x61\x63\x63\145\x73\163\x5f\164\157\x6b\145\x6e"] = isset($ZX["\141\143\x63\145\163\163\137\164\x6f\x6b\x65\156"]) ? $ZX["\x61\x63\x63\x65\163\163\x5f\164\157\153\x65\156"] : false;
if (isset($ZX["\141\143\x63\x65\x73\163\137\164\157\153\145\x6e"])) {
goto Wm;
}
do_action("\x6d\157\137\162\145\x64\151\x72\x65\143\164\137\164\157\x5f\143\x75\x73\x74\157\x6d\137\145\x72\x72\157\x72\x5f\160\141\147\145");
$Ls->handle_error("\111\x6e\166\141\x6c\151\144\x20\164\157\x6b\145\156\x20\162\x65\143\145\x69\x76\145\144\56");
MO_Oauth_Debug::mo_oauth_log("\111\x6e\x76\x61\x6c\x69\x64\40\164\157\x6b\x65\x6e\40\x72\x65\143\145\151\166\145\144\x2e");
exit("\x49\156\x76\x61\x6c\x69\x64\x20\164\x6f\x6b\145\156\40\162\x65\x63\145\x69\x76\145\144\x2e");
Wm:
MO_Oauth_Debug::mo_oauth_log("\124\157\x6b\x65\x6e\40\x52\145\163\x70\157\x6e\163\145\40\75\x3e\x20");
MO_Oauth_Debug::mo_oauth_log($ZX);
$kr = $eO["\x72\145\x73\157\165\162\x63\145\157\167\156\145\162\x64\x65\x74\141\x69\x6c\x73\165\x72\x6c"];
if (!(substr($kr, -1) === "\x3d")) {
goto z1;
}
$kr .= $ZX["\x61\143\x63\x65\x73\163\137\164\x6f\153\145\156"];
z1:
MO_Oauth_Debug::mo_oauth_log("\101\143\143\145\163\163\x20\164\x6f\153\x65\x6e\40\x72\145\x63\x65\x69\x76\145\144\56");
MO_Oauth_Debug::mo_oauth_log("\101\x63\x63\145\x73\x73\40\x54\x6f\153\145\156\x20\x3d\x3e\40" . $ZX["\141\143\x63\145\163\163\137\164\157\x6b\x65\156"]);
$wm = false;
MO_Oauth_Debug::mo_oauth_log("\122\x65\x73\157\165\x72\x63\x65\40\x4f\x77\156\x65\162\x20\x3d\76\40");
if (!has_filter("\x6d\x6f\137\165\163\x65\x72\151\x6e\146\x6f\x5f\x66\154\x6f\x77\137\146\x6f\x72\x5f\167\x61\154\x6d\x61\x72\164")) {
goto Ka;
}
$wm = apply_filters("\x6d\x6f\x5f\x75\x73\145\162\x69\x6e\x66\x6f\x5f\x66\154\x6f\x77\137\x66\x6f\x72\137\167\141\x6c\155\141\162\164", $kr, $ZX, $N6, $Ti, $eO);
Ka:
if (!($wm === false)) {
goto ma;
}
$VQ = null;
$VQ = apply_filters("\155\x6f\x5f\x70\x6f\154\x61\162\x5f\x72\x65\147\151\163\164\145\x72\x5f\x75\163\x65\x72", $ZX);
if (!(!empty($VQ) && !empty($ZX["\170\137\x75\163\x65\x72\x5f\x69\144"]))) {
goto nB;
}
$kr .= "\x2f" . $ZX["\170\x5f\x75\x73\x65\162\x5f\x69\144"];
nB:
$wm = $this->oauth_handler->get_resource_owner($kr, $ZX["\141\143\143\145\163\163\137\164\x6f\153\145\156"]);
$VC = array();
if (!(strpos($DE->get_app_config("\141\x75\x74\150\157\x72\151\172\x65\x75\x72\x6c"), "\x6c\151\156\153\145\144\x69\156") !== false && strpos($eO["\x73\143\x6f\x70\x65"], "\162\137\x65\x6d\x61\151\x6c\x61\x64\144\x72\x65\x73\163") != false)) {
goto JO;
}
$WM = "\150\x74\x74\x70\163\72\x2f\x2f\x61\160\151\56\x6c\151\156\153\145\144\x69\x6e\x2e\x63\x6f\155\x2f\166\62\x2f\145\x6d\x61\x69\x6c\101\144\x64\x72\x65\x73\163\77\161\75\x6d\145\155\x62\x65\162\x73\x26\x70\x72\x6f\x6a\x65\143\164\151\157\156\75\x28\145\154\x65\x6d\145\x6e\x74\x73\52\x28\x68\141\156\x64\x6c\145\176\x29\x29";
$VC = $this->oauth_handler->get_resource_owner($WM, $ZX["\141\x63\x63\x65\163\x73\137\x74\157\153\x65\x6e"]);
JO:
$wm = array_merge($wm, $VC);
ma:
if (!has_filter("\155\157\x5f\x63\x68\x65\x63\x6b\137\164\x6f\x5f\145\170\145\143\165\164\145\137\x70\x6f\163\164\137\x75\x73\x65\x72\151\x6e\x66\x6f\137\x66\154\x6f\167\137\146\x6f\162\137\x77\141\154\x6d\x61\x72\x74")) {
goto mJ;
}
$wm = apply_filters("\x6d\x6f\x5f\143\x68\145\143\x6b\137\x74\x6f\x5f\145\x78\x65\143\165\164\x65\x5f\160\157\x73\164\x5f\165\x73\x65\162\x69\156\x66\157\x5f\x66\154\x6f\167\137\146\157\162\137\x77\141\154\x6d\141\x72\164", $wm, $Ti, $eO);
mJ:
MO_Oauth_Debug::mo_oauth_log($wm);
if (has_filter("\155\x6f\137\x67\x65\x74\x5f\x74\x6f\153\x65\x6e\137\x66\x6f\x72\137\156\x65\157\x6e\x5f\155\145\155\x62\x65\162\x73\x68\151\x70")) {
goto Ds;
}
$He = apply_filters("\x6d\157\137\x74\x72\137\x61\146\164\145\162\137\x70\x72\x6f\146\x69\154\145\x5f\151\x6e\x66\157\137\x65\170\164\162\x61\143\164\151\157\x6e\137\146\x72\157\155\x5f\x74\x6f\x6b\145\x6e", $wm);
goto o7;
Ds:
$He = apply_filters("\155\157\137\x67\145\164\x5f\164\x6f\x6b\x65\156\x5f\146\157\162\137\x6e\145\x6f\156\137\x6d\x65\x6d\142\x65\162\x73\x68\x69\x70", $wm, $ZX["\x61\x63\x63\145\x73\163\x5f\164\157\153\145\156"]);
o7:
if (!($He != '' && is_array($He))) {
goto aL;
}
$wm = array_merge($wm, $He);
aL:
$j4 = apply_filters("\x61\143\x63\162\145\144\151\x74\x69\157\x6e\163\137\x65\156\x64\x70\x6f\x69\x6e\164", $ZX["\x61\143\x63\145\163\x73\x5f\164\157\153\x65\x6e"]);
if (!($j4 !== '' && is_array($j4))) {
goto DV;
}
$wm = array_merge($wm, $j4);
DV:
if (!has_filter("\155\x6f\x5f\x70\x6f\154\141\x72\x5f\162\145\147\x69\x73\x74\x65\162\x5f\165\x73\x65\x72")) {
goto Xi;
}
$YB = array();
$YB["\164\157\x6b\x65\156"] = $ZX["\141\143\143\145\163\x73\137\164\x6f\x6b\145\156"];
$wm = array_merge($wm, $YB);
Xi:
if (!(strpos($DE->get_app_config("\141\165\164\150\x6f\162\x69\172\x65\165\162\154"), "\144\151\x73\x63\x6f\x72\144") !== false)) {
goto b0;
}
apply_filters("\x6d\157\x5f\144\x69\x73\137\x75\163\x65\x72\x5f\141\x74\x74\x65\x6e\x64\141\156\143\x65", $wm["\x69\x64"]);
$my = apply_filters("\155\157\x5f\x64\162\155\x5f\147\145\x74\x5f\x75\x73\x65\x72\x5f\162\x6f\x6c\145\163", array_key_exists("\151\144", $wm) ? $wm["\151\144"] : '');
if (!(false !== $my)) {
goto WO;
}
MO_Oauth_Debug::mo_oauth_log("\x44\151\163\143\157\162\x64\40\x52\x6f\x6c\x65\163\40\75\76\40");
MO_Oauth_Debug::mo_oauth_log($my);
$wm["\162\x6f\154\145\163"] = $my;
WO:
if (!(!$Bn && '' == $Bn)) {
goto Th;
}
do_action("\x6d\157\137\x6f\141\x75\x74\150\x5f\x61\144\144\x5f\x64\151\163\137\165\163\145\162\137\x73\x65\162\x76\145\x72", get_current_user_id(), $ZX, $wm);
Th:
b0:
if (!(isset($eO["\163\x65\x6e\x64\x5f\x6e\x6f\156\x63\x65"]) && $eO["\163\145\x6e\x64\137\156\x6f\156\143\x65"] === 1)) {
goto S3;
}
if (!(isset($wm["\156\157\156\x63\145"]) && $wm["\156\157\156\143\x65"] != NULL)) {
goto U_;
}
if ($Ls->get_transient("\x6d\x6f\137\157\141\x75\164\150\137\156\x6f\156\143\145\x5f" . $wm["\x6e\157\x6e\x63\145"])) {
goto KU;
}
$Jo = "\116\157\x6e\x63\145\40\x76\145\162\151\x66\x69\143\141\x74\151\157\x6e\40\x69\x73\40\x66\141\151\154\145\x64\56\40\x50\154\145\x61\x73\x65\x20\143\x6f\156\164\141\x63\164\40\164\x6f\x20\x79\157\x75\162\40\x61\x64\x6d\151\156\151\163\x74\x72\141\164\x6f\x72\x2e";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
goto sB;
KU:
$Ls->delete_transient("\x6d\157\x5f\x6f\x61\x75\164\x68\137\x6e\157\x6e\x63\145\x5f" . $wm["\156\157\x6e\x63\145"]);
sB:
U_:
S3:
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("\x6d\x6f\137\x6f\141\165\164\x68\137\141\x74\x74\x72\137\x6e\x61\x6d\x65\x5f\x6c\151\x73\x74" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto BF;
}
$this->handle_group_test_conf($wm, $eO, $ZX["\x61\x63\143\x65\163\163\137\164\157\153\145\x6e"], false, $Bn);
exit;
BF:
goto TW;
kt:
MO_Oauth_Debug::mo_oauth_log("\117\x70\145\x6e\x49\x44\x20\103\x6f\x6e\156\145\143\x74\x20\146\154\x6f\x77");
$ZX = json_decode($this->oauth_handler->get_token($eO["\141\143\143\145\163\x73\x74\x6f\x6b\x65\156\x75\x72\x6c"], $N6, $mR, $ax), true);
MO_Oauth_Debug::mo_oauth_log("\x54\x6f\x6b\x65\156\40\122\145\163\160\x6f\x6e\x73\x65\40\x3d\76\40");
MO_Oauth_Debug::mo_oauth_log($ZX);
$vc = [];
try {
$vc = $this->resolve_and_get_oidc_response($ZX);
} catch (\Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log("\111\x6e\166\141\154\x69\x64\x20\122\x65\163\160\x6f\x6e\x73\145\40\162\x65\x63\145\x69\166\145\x64\56");
do_action("\x6d\x6f\137\x72\x65\x64\151\x72\145\x63\164\137\164\157\x5f\143\x75\x73\164\157\x6d\x5f\x65\162\x72\x6f\162\137\160\141\x67\145");
wp_die("\x49\x6e\x76\x61\x6c\151\x64\x20\122\x65\163\160\157\x6e\x73\x65\x20\x72\x65\143\x65\x69\x76\145\144\x2e");
exit;
}
if (!has_action("\x6d\157\137\x6f\141\x75\164\150\137\x73\141\166\x65\137\141\x63\143\145\x73\x73\137\x74\157\x6b\145\156\x5f\x69\156\137\143\157\157\153\x69\145")) {
goto Dj;
}
do_action("\x6d\157\x5f\x6f\141\165\x74\150\x5f\x73\141\x76\x65\x5f\141\143\x63\x65\163\163\x5f\164\157\x6b\145\x6e\x5f\151\156\x5f\143\157\x6f\153\x69\145", $ZX["\141\143\x63\145\x73\163\x5f\164\x6f\x6b\x65\x6e"]);
Dj:
MO_Oauth_Debug::mo_oauth_log("\111\104\40\x54\x6f\x6b\x65\x6e\x20\x72\x65\143\x65\151\x76\145\x64\40\x53\x75\143\143\145\163\163\x66\165\x6c\154\x79");
MO_Oauth_Debug::mo_oauth_log("\x49\104\40\124\157\x6b\145\x6e\x20\75\76\x20");
MO_Oauth_Debug::mo_oauth_log($vc);
$wm = $this->get_resource_owner_from_app($vc, $Ti);
MO_Oauth_Debug::mo_oauth_log("\x52\145\x73\x6f\x75\162\143\x65\x20\117\167\156\x65\x72\40\x3d\x3e\40");
MO_Oauth_Debug::mo_oauth_log($wm);
if (!(strpos($DE->get_app_config("\141\165\x74\150\x6f\x72\151\x7a\145\165\x72\154"), "\164\167\x69\x74\x63\x68") !== false)) {
goto I_;
}
$zZ = apply_filters("\155\157\x5f\164\163\155\137\147\x65\164\x5f\165\x73\x65\x72\x5f\x73\165\142\x73\143\x72\151\160\164\151\x6f\x6e", $wm["\163\165\x62"], $eO["\143\154\151\x65\x6e\164\137\x69\x64"], $ZX["\141\143\x63\145\163\163\137\164\x6f\153\145\156"]);
if (!(false !== $zZ)) {
goto Bb;
}
MO_Oauth_Debug::mo_oauth_log("\124\x77\x69\164\143\150\x20\123\x75\x62\163\143\x72\x69\160\164\151\x6f\x6e\x20\x3d\76\x20");
MO_Oauth_Debug::mo_oauth_log($zZ);
$wm["\x73\x75\x62\x73\x63\x72\151\160\x74\x69\157\156"] = $zZ;
Bb:
I_:
if (!($DE->get_app_config("\141\160\160\x49\x64") === "\153\x65\171\143\x6c\x6f\x61\x6b")) {
goto F2;
}
$it = apply_filters("\155\157\x5f\x6b\x72\x6d\137\147\x65\164\137\165\x73\x65\162\x5f\x72\157\x6c\x65\163", $wm, $ZX);
if (!(false !== $it)) {
goto c1;
}
$wm["\162\157\154\x65\x73"] = $it;
c1:
F2:
$wm = apply_filters("\x6d\x6f\x5f\x61\x7a\165\162\145\142\62\143\137\147\x65\164\x5f\x75\163\x65\162\x5f\147\162\x6f\165\160\x5f\151\144\163", $wm, $eO);
$He = apply_filters("\155\157\x5f\164\162\137\x61\146\164\x65\x72\137\160\x72\x6f\146\151\x6c\145\137\151\156\x66\x6f\137\x65\170\x74\162\141\143\164\x69\x6f\x6e\137\146\x72\157\x6d\137\164\157\153\145\156", $wm);
if (!($He != '' && is_array($He))) {
goto Zn;
}
$wm = array_merge($wm, $He);
Zn:
if (!(isset($eO["\x73\x65\156\144\x5f\156\157\156\143\145"]) && $eO["\163\145\156\x64\x5f\x6e\157\156\x63\x65"] === 1)) {
goto rw;
}
if (!(isset($wm["\x6e\157\156\x63\x65"]) && $wm["\x6e\157\x6e\143\x65"] != NULL)) {
goto gS;
}
if ($Ls->get_transient("\x6d\x6f\x5f\x6f\141\165\x74\x68\137\x6e\157\x6e\x63\x65\137" . $wm["\156\x6f\156\143\x65"])) {
goto wU;
}
$Jo = "\116\x6f\x6e\x63\145\40\166\x65\x72\151\146\x69\x63\141\x74\x69\157\156\x20\151\x73\40\x66\141\x69\154\x65\144\x2e\40\120\154\145\141\163\145\40\143\157\156\x74\x61\x63\164\40\x74\x6f\40\x79\x6f\165\162\x20\141\144\155\x69\156\x69\163\164\162\141\164\x6f\162\x2e";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die($Jo);
goto O3;
wU:
$Ls->delete_transient("\155\157\x5f\157\x61\x75\x74\150\x5f\x6e\x6f\156\x63\x65\x5f" . $wm["\x6e\157\x6e\143\145"]);
O3:
gS:
rw:
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("\x6d\x6f\x5f\x6f\x61\165\164\150\137\141\x74\164\x72\137\x6e\x61\155\145\137\x6c\151\163\x74" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto U3;
}
$ZX["\162\145\x66\x72\145\x73\150\x5f\x74\157\153\x65\156"] = isset($ZX["\x72\145\146\x72\145\x73\150\x5f\x74\157\x6b\145\x6e"]) ? $ZX["\162\x65\x66\x72\x65\163\x68\x5f\164\157\x6b\145\x6e"] : '';
$_SESSION["\x70\x72\157\x63\x6f\162\x65\137\x72\x65\x66\x72\145\163\150\137\x74\157\153\145\156"] = $ZX["\x72\x65\146\162\x65\163\x68\x5f\164\x6f\x6b\x65\156"];
$NB = isset($ZX["\x61\143\143\x65\x73\x73\x5f\x74\157\x6b\145\x6e"]) ? $ZX["\x61\143\x63\145\x73\x73\137\164\x6f\153\x65\156"] : '';
$this->handle_group_test_conf($wm, $eO, $NB, false, $Bn);
MO_Oauth_Debug::mo_oauth_log("\101\164\x74\x72\151\142\165\x74\145\40\x52\x65\143\x65\151\x76\x65\144\40\123\x75\143\143\x65\163\x73\146\165\x6c\x6c\171");
exit;
U3:
TW:
if (!(isset($eO["\x67\x72\x6f\x75\x70\x64\x65\164\x61\x69\x6c\163\x75\162\154"]) && !empty($eO["\147\162\x6f\165\160\144\x65\x74\141\151\154\x73\x75\x72\x6c"]))) {
goto GW;
}
$wm = $this->handle_group_user_info($wm, $eO, $ZX["\x61\143\x63\145\163\x73\x5f\164\x6f\153\145\156"]);
MO_Oauth_Debug::mo_oauth_log("\x47\x72\x6f\165\160\40\104\145\164\141\x69\154\x73\x20\x4f\142\164\x61\151\x6e\x65\x64\40\75\x3e\40");
MO_Oauth_Debug::mo_oauth_log($wm);
GW:
MO_Oauth_Debug::mo_oauth_log("\106\145\x74\143\150\145\144\40\x72\x65\163\157\x75\162\143\145\x20\157\x77\x6e\145\162\40\x3a\40" . json_encode($wm));
if (!has_filter("\x77\x6f\x6f\x63\157\155\x6d\145\162\143\x65\x5f\143\150\x65\x63\153\x6f\165\164\x5f\147\145\164\x5f\x76\141\154\x75\x65")) {
goto Cp;
}
$wm["\141\x70\x70\156\141\155\145"] = $Ti;
Cp:
do_action("\x6d\157\137\x61\142\162\x5f\x66\151\x6c\164\145\162\x5f\x6c\157\x67\x69\x6e", $wm);
$this->handle_sso($Ti, $eO, $wm, $Ga, $ZX);
} catch (Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log($de->getMessage());
do_action("\x6d\x6f\x5f\162\145\144\151\x72\145\143\x74\x5f\x74\x6f\x5f\x63\x75\163\x74\x6f\155\x5f\x65\162\162\157\x72\x5f\160\x61\147\145");
exit(esc_html($de->getMessage()));
}
goto A9;
QF:
try {
if (isset($_COOKIE["\x73\x74\141\x74\x65\137\x70\x61\x72\x61\x6d"])) {
goto IX;
}
if (isset($_GET["\x73\164\141\x74\x65"])) {
goto r3;
}
$Ez = new StorageManager();
if (!is_multisite()) {
goto gh;
}
$Ez->add_replace_entry("\142\154\x6f\x67\x5f\x69\144", 1);
gh:
$du = $Ls->get_app_by_name();
if (isset($_GET["\141\x70\x70\137\156\x61\x6d\x65"])) {
goto Tv;
}
$Ez->add_replace_entry("\x61\x70\160\x6e\x61\155\145", $du->get_app_name());
goto Mt;
Tv:
$Ez->add_replace_entry("\141\160\160\156\x61\155\145", sanitize_text_field(wp_unslash($_GET["\x61\160\x70\x5f\x6e\x61\x6d\145"])));
Mt:
$Ez->add_replace_entry("\x74\x65\x73\164\137\x63\x6f\x6e\146\x69\x67", false);
$Ez->add_replace_entry("\162\145\144\x69\162\x65\x63\164\137\165\162\151", site_url());
$Ga = $Ez->get_state();
goto MS;
r3:
$Ga = sanitize_text_field(wp_unslash($_GET["\x73\164\141\x74\145"]));
MS:
goto pI;
IX:
$Ga = sanitize_text_field(wp_unslash($_COOKIE["\163\x74\x61\164\145\x5f\x70\x61\x72\141\155"]));
pI:
$bT = new StorageManager($Ga);
if (!empty($bT->get_value("\141\x70\x70\156\141\x6d\145"))) {
goto zq;
}
return;
zq:
$Th = $bT->get_value("\x61\160\160\x6e\x61\x6d\145");
$Bn = $bT->get_value("\x74\145\x73\x74\x5f\143\157\x6e\x66\x69\147");
$Ti = $Th ? $Th : '';
$xx = $Ls->mo_oauth_client_get_option("\155\157\x5f\157\141\165\164\150\x5f\141\x70\x70\x73\137\x6c\x69\163\164");
$na = '';
$t3 = '';
$DE = $Ls->get_app_by_name($Ti);
if ($DE) {
goto Cm;
}
$Ls->handle_error("\x41\160\x70\x6c\151\143\x61\x74\x69\157\156\x20\156\x6f\164\x20\x63\x6f\156\x66\151\147\165\x72\x65\x64\56");
MO_Oauth_Debug::mo_oauth_log("\x41\x70\160\154\151\x63\x61\164\x69\157\156\x20\x6e\x6f\x74\x20\143\157\x6e\146\x69\147\x75\x72\x65\x64\x2e");
exit("\101\160\x70\x6c\x69\x63\141\x74\x69\x6f\x6e\x20\156\157\x74\40\x63\x6f\156\x66\151\147\165\162\145\x64\56");
Cm:
$eO = $DE->get_app_config();
if (!(isset($eO["\163\x65\156\144\137\x6e\157\156\x63\145"]) && $eO["\x73\145\156\x64\x5f\x6e\x6f\x6e\143\145"] === 1)) {
goto gd;
}
if (!(isset($_REQUEST["\156\157\156\143\x65"]) && !$Ls->get_transient("\x6d\x6f\137\x6f\141\165\x74\150\x5f\156\x6f\156\143\x65\137" . sanitize_text_field(wp_unslash($_REQUEST["\x6e\157\156\143\145"]))))) {
goto HM;
}
$Jo = "\116\157\156\x63\x65\x20\x76\145\162\x69\x66\151\143\141\x74\151\157\156\40\151\163\40\x66\141\151\154\x65\x64\x2e\x20\120\x6c\x65\141\x73\145\x20\143\157\x6e\x74\x61\143\164\40\x74\157\40\171\157\165\162\40\x61\144\155\151\x6e\x69\163\x74\x72\x61\164\x6f\162\56";
$Ls->handle_error($Jo);
MO_Oauth_Debug::mo_oauth_log($Jo);
wp_die(esc_html($Jo));
HM:
gd:
$N6 = array("\147\162\x61\156\164\x5f\x74\171\x70\x65" => "\162\x65\x66\162\145\163\x68\x5f\164\157\x6b\145\156", "\143\x6c\x69\145\x6e\164\x5f\x69\x64" => $eO["\143\x6c\151\145\156\x74\137\x69\x64"], "\162\x65\x64\151\162\145\x63\x74\x5f\165\162\151" => $eO["\x72\x65\144\151\x72\x65\x63\x74\x5f\165\162\x69"], "\x72\145\146\x72\x65\x73\x68\137\164\157\x6b\x65\156" => $_POST["\162\x65\146\x72\x65\163\x68\x5f\164\x6f\x6b\x65\156"], "\x73\x63\157\160\145" => $DE->get_app_config("\x73\x63\x6f\160\145"), "\143\154\x69\145\156\x74\137\163\x65\143\x72\145\x74" => $eO["\143\154\151\x65\156\x74\137\163\x65\x63\162\145\x74"]);
$mR = isset($eO["\x73\x65\x6e\144\137\x68\x65\x61\x64\145\x72\x73"]) ? $eO["\163\145\156\x64\137\150\x65\141\144\145\x72\x73"] : 0;
$ax = isset($eO["\163\145\x6e\x64\x5f\x62\x6f\144\x79"]) ? $eO["\x73\x65\156\x64\x5f\x62\x6f\144\x79"] : 0;
$qS = $eO["\x61\x63\x63\x65\x73\x73\164\x6f\153\x65\x6e\165\x72\x6c"];
MO_Oauth_Debug::mo_oauth_log("\117\101\x75\x74\150\x20\146\x6c\157\x77");
$ZX = json_decode($this->oauth_handler->get_token($qS, $N6, $mR, $ax), true);
$Z6 = isset($ZX["\141\143\143\145\163\x73\x5f\x74\x6f\x6b\x65\x6e"]) ? $ZX["\x61\x63\x63\x65\x73\163\137\x74\157\x6b\x65\x6e"] : false;
if (isset($Z6)) {
goto mq;
}
do_action("\155\157\137\162\x65\144\151\x72\x65\x63\x74\137\164\x6f\x5f\x63\165\163\164\157\x6d\137\x65\x72\x72\157\x72\137\160\141\147\145");
$Ls->handle_error("\111\156\x76\x61\154\x69\144\40\x74\x6f\x6b\x65\x6e\x20\x72\145\143\x65\151\x76\145\144\x2e");
MO_Oauth_Debug::mo_oauth_log("\x49\156\166\141\154\x69\144\40\164\x6f\x6b\145\x6e\x20\162\145\x63\x65\151\166\145\x64\56");
exit("\x49\156\166\141\x6c\x69\144\40\164\157\153\x65\x6e\40\162\145\143\x65\151\166\x65\144\x2e");
mq:
MO_Oauth_Debug::mo_oauth_log("\x54\x6f\x6b\145\156\40\122\145\163\160\x6f\156\x73\x65\40\x3d\x3e\x20");
MO_Oauth_Debug::mo_oauth_log($ZX);
$kr = $eO["\x72\x65\163\157\x75\x72\143\x65\157\167\x6e\x65\x72\144\x65\164\x61\151\154\163\x75\x72\154"];
if (!(substr($kr, -1) == "\x3d" && !empty($ZX["\x75\x73\145\162\116\141\x6d\145"]))) {
goto Lj;
}
$kr .= strtolower($ZX["\x75\163\x65\162\116\x61\155\145"]);
Lj:
MO_Oauth_Debug::mo_oauth_log("\101\143\x63\x65\163\163\x20\x74\x6f\x6b\145\x6e\x20\x72\x65\x63\145\x69\x76\x65\x64\x2e");
MO_Oauth_Debug::mo_oauth_log("\x41\143\x63\x65\163\x73\x20\x54\157\153\145\x6e\x20\75\76\40");
MO_Oauth_Debug::mo_oauth_log($Z6);
$wm = false;
if (!($wm === false)) {
goto JU;
}
$wm = $this->oauth_handler->get_resource_owner($kr, $Z6);
JU:
MO_Oauth_Debug::mo_oauth_log($wm);
$Zo = [];
$qP = $this->dropdownattrmapping('', $wm, $Zo);
$Ls->mo_oauth_client_update_option("\x6d\x6f\x5f\157\x61\x75\x74\150\137\141\x74\164\162\x5f\156\x61\155\145\x5f\x6c\151\x73\164" . $Ti, $qP);
if (!($Bn && '' !== $Bn)) {
goto eJ;
}
$this->handle_group_test_conf($wm, $eO, $Z6, false, $Bn);
exit;
eJ:
if (!(isset($eO["\147\162\157\165\160\x64\145\x74\x61\151\154\163\x75\162\x6c"]) && !empty($eO["\147\x72\x6f\x75\160\x64\145\x74\141\151\x6c\x73\165\x72\x6c"]))) {
goto Wk;
}
$wm = $this->handle_group_user_info($wm, $eO, $Z6);
MO_Oauth_Debug::mo_oauth_log("\107\x72\157\x75\160\x20\104\x65\164\x61\151\x6c\x73\40\117\142\164\x61\x69\x6e\145\144\x20\x3d\x3e\x20" . $wm);
Wk:
MO_Oauth_Debug::mo_oauth_log("\x46\x65\164\x63\150\x65\144\x20\162\x65\x73\x6f\x75\162\x63\x65\40\157\x77\x6e\145\x72\40\72\x20" . json_encode($wm));
if (!has_filter("\167\157\157\x63\x6f\155\x6d\145\162\x63\145\x5f\143\150\x65\x63\153\x6f\165\164\x5f\147\x65\164\137\166\x61\154\165\145")) {
goto lS;
}
$wm["\x61\160\x70\x6e\x61\155\145"] = $Ti;
lS:
do_action("\155\x6f\x5f\x61\x62\162\x5f\146\x69\x6c\164\145\162\137\x6c\x6f\x67\x69\156", $wm);
$this->handle_sso($Ti, $eO, $wm, $Ga, $ZX);
} catch (Exception $de) {
$Ls->handle_error($de->getMessage());
MO_Oauth_Debug::mo_oauth_log($de->getMessage());
do_action("\x6d\x6f\137\x72\145\144\x69\162\x65\143\164\x5f\x74\x6f\x5f\x63\165\x73\x74\157\x6d\x5f\x65\162\162\x6f\162\137\160\x61\x67\x65");
exit(esc_html($de->getMessage()));
}
A9:
}
public function dropdownattrmapping($cq, $dI, $Zo)
{
global $Ls;
foreach ($dI as $M0 => $XG) {
if (is_array($XG)) {
goto wv;
}
if (!empty($cq)) {
goto K0;
}
array_push($Zo, $M0);
goto fC;
K0:
array_push($Zo, $cq . "\x2e" . $M0);
fC:
goto R5;
wv:
if (empty($cq)) {
goto SM;
}
$cq .= "\56";
SM:
$Zo = $this->dropdownattrmapping($cq . $M0, $XG, $Zo);
$cq = rtrim($cq, "\x2e");
R5:
Qv:
}
pf:
return $Zo;
}
public function resolve_and_get_oidc_response($ZX = array())
{
if (!empty($ZX)) {
goto gq;
}
throw new \Exception("\x54\x6f\x6b\145\156\40\162\x65\x73\x70\x6f\156\163\145\x20\x69\163\40\x65\x6d\160\x74\171", "\151\x6e\x76\141\154\151\x64\137\x72\145\x73\160\x6f\x6e\163\145");
gq:
global $Ls;
$VS = isset($ZX["\x69\144\x5f\164\157\x6b\145\156"]) ? $ZX["\151\x64\x5f\x74\157\x6b\x65\156"] : false;
$Rl = isset($ZX["\x61\x63\143\145\x73\163\x5f\x74\x6f\x6b\x65\x6e"]) ? $ZX["\x61\143\143\x65\163\163\137\164\x6f\153\x65\x6e"] : false;
$_SESSION["\x70\162\x6f\143\x6f\162\145\137\x61\143\143\x65\163\163\137\x74\x6f\x6b\145\x6e"] = isset($Rl) ? $Rl : $VS;
if (!$Ls->is_valid_jwt($VS)) {
goto aZ;
}
return $VS;
aZ:
if (!$Ls->is_valid_jwt($Rl)) {
goto m5;
}
return $Rl;
m5:
MO_Oauth_Debug::mo_oauth_log("\124\x6f\153\x65\156\x20\151\x73\40\x6e\x6f\164\x20\x61\40\166\141\x6c\x69\144\40\x4a\127\x54\x2e");
throw new \Exception("\x54\x6f\x6b\145\x6e\40\x69\x73\x20\156\157\164\40\141\x20\166\x61\x6c\x69\144\x20\112\127\x54\56");
}
public function handle_group_test_conf($wm = array(), $eO = array(), $Rl = '', $Qc = false, $Bn = false)
{
$this->render_test_config_output($wm, false);
}
public function testattrmappingconfig($cq, $dI)
{
foreach ($dI as $M0 => $XG) {
if (is_array($XG) || is_object($XG)) {
goto Jm;
}
echo "\x3c\x74\x72\76\x3c\164\x64\x3e";
if (empty($cq)) {
goto gC;
}
echo esc_attr($cq) . "\56";
gC:
echo esc_attr($M0) . "\74\x2f\164\144\x3e\74\x74\x64\x3e" . esc_attr($XG) . "\x3c\x2f\x74\144\x3e\x3c\57\x74\162\x3e";
goto Pz;
Jm:
if (empty($cq)) {
goto WL;
}
$cq .= "\56";
WL:
$this->testattrmappingconfig($cq . $M0, $XG);
$cq = rtrim($cq, "\56");
Pz:
Ja:
}
TQ:
}
public function render_test_config_output($wm, $Qc = false)
{
MO_Oauth_Debug::mo_oauth_log("\124\150\151\x73\40\151\163\40\x74\145\x73\x74\x20\143\x6f\x6e\x66\151\147\165\x72\x61\x74\x69\x6f\x6e\40\x66\x6c\157\x77\40\75\x3e\x20");
echo "\74\144\x69\166\40\163\164\171\x6c\x65\75\x22\146\x6f\x6e\x74\x2d\146\141\155\151\x6c\171\72\103\141\154\151\142\x72\151\73\x70\141\144\x64\151\156\x67\x3a\60\40\x33\x25\73\42\76";
echo "\74\x73\164\171\154\145\76\164\141\x62\x6c\145\173\x62\x6f\162\x64\x65\162\x2d\x63\157\154\x6c\x61\x70\x73\x65\x3a\x63\x6f\x6c\x6c\141\x70\x73\x65\x3b\175\164\x68\40\173\142\141\143\x6b\x67\162\157\165\x6e\144\x2d\143\x6f\x6c\x6f\x72\x3a\x20\43\145\145\x65\x3b\x20\164\145\x78\x74\55\141\154\x69\x67\156\72\x20\x63\145\156\164\x65\x72\x3b\x20\x70\x61\144\x64\151\156\147\72\40\70\160\170\x3b\x20\142\157\162\144\x65\162\x2d\x77\151\144\164\x68\x3a\61\x70\170\73\40\142\157\162\x64\145\x72\x2d\x73\164\171\x6c\x65\72\163\x6f\154\151\x64\73\x20\x62\x6f\x72\144\x65\162\55\x63\x6f\x6c\157\x72\x3a\43\62\x31\x32\x31\x32\x31\x3b\x7d\x74\162\72\x6e\164\150\55\143\150\x69\154\x64\x28\x6f\144\x64\51\40\x7b\x62\x61\143\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x23\146\62\146\x32\x66\62\73\x7d\40\x74\144\173\160\x61\x64\144\x69\x6e\x67\72\x38\x70\x78\73\142\157\x72\x64\145\162\x2d\167\x69\x64\x74\x68\72\61\x70\170\x3b\40\x62\157\x72\144\x65\x72\x2d\x73\x74\x79\154\145\x3a\x73\x6f\154\x69\144\73\40\x62\157\162\144\x65\162\55\x63\x6f\x6c\157\162\72\x23\x32\x31\x32\x31\62\61\x3b\175\x3c\x2f\163\x74\171\154\145\x3e";
echo "\x3c\x68\62\76";
echo $Qc ? "\x47\x72\157\165\160\x20\x49\x6e\x66\157" : "\124\145\x73\x74\40\103\157\x6e\146\x69\x67\x75\162\141\164\151\157\156";
echo "\x3c\x2f\150\62\x3e\x3c\x74\141\142\154\145\x3e\x3c\164\x72\x3e\74\x74\150\76\x41\164\164\x72\x69\142\165\x74\145\x20\x4e\x61\x6d\145\x3c\57\164\150\76\74\164\150\76\x41\164\164\x72\x69\142\165\x74\145\40\126\x61\x6c\x75\x65\x3c\57\x74\150\x3e\74\x2f\x74\x72\76";
$this->testattrmappingconfig('', $wm);
echo "\74\x2f\x74\141\142\x6c\145\76";
if ($Qc) {
goto Nv;
}
echo "\74\x64\151\x76\40\163\164\x79\154\145\75\42\x70\141\144\x64\x69\x6e\x67\72\40\x31\x30\160\170\73\42\x3e\74\57\x64\151\166\76\x3c\x69\156\x70\165\164\40\163\164\x79\x6c\x65\x3d\x22\x70\141\144\x64\x69\156\147\x3a\61\x25\x3b\x77\x69\144\164\150\x3a\61\x30\x30\160\170\x3b\142\141\x63\x6b\x67\x72\x6f\x75\156\x64\x3a\x20\x23\60\x30\x39\x31\x43\104\x20\156\x6f\156\145\40\162\145\160\x65\x61\164\40\163\143\162\157\x6c\154\x20\60\x25\x20\x30\45\73\143\x75\162\x73\157\x72\72\x20\x70\x6f\151\156\164\145\x72\73\x66\x6f\156\x74\55\x73\151\172\x65\72\61\x35\160\x78\73\142\x6f\162\144\x65\x72\55\167\151\144\164\x68\72\x20\61\x70\x78\x3b\142\157\162\144\x65\x72\55\163\164\x79\154\x65\72\x20\x73\157\154\151\x64\x3b\x62\x6f\162\144\145\162\x2d\x72\141\144\x69\165\x73\72\x20\63\x70\170\73\167\150\x69\164\145\55\x73\x70\141\x63\x65\x3a\40\x6e\x6f\167\x72\141\x70\73\x62\157\x78\x2d\x73\x69\172\x69\x6e\x67\72\x20\142\157\162\144\x65\x72\55\142\157\170\x3b\x62\x6f\162\x64\145\x72\55\x63\x6f\154\x6f\162\x3a\40\x23\60\60\x37\63\x41\x41\73\142\x6f\170\55\x73\150\141\x64\x6f\x77\72\x20\x30\x70\x78\40\x31\x70\x78\x20\x30\160\x78\40\162\147\x62\141\50\x31\62\60\54\40\62\60\x30\x2c\40\62\63\x30\x2c\40\60\x2e\66\x29\x20\151\x6e\x73\145\164\73\x63\157\x6c\157\162\72\40\x23\106\106\x46\x3b\x22\x74\x79\160\145\x3d\x22\142\x75\164\x74\x6f\x6e\42\x20\166\x61\x6c\x75\145\75\42\x44\157\x6e\145\x22\40\x6f\156\103\x6c\151\143\153\x3d\42\x73\x65\154\146\x2e\x63\154\157\x73\x65\x28\x29\x3b\42\x3e\74\x2f\x64\151\x76\x3e";
Nv:
}
public function handle_sso($Ti, $eO, $wm, $Ga, $ZX, $A8 = false)
{
MO_Oauth_Debug::mo_oauth_log("\x53\123\117\40\150\x61\156\x64\154\x69\156\147\40\x66\154\157\x77");
global $Ls;
if (!(get_class($this) === "\115\157\x4f\x61\165\x74\x68\x43\154\x69\x65\x6e\164\x5c\114\157\x67\151\156\110\141\x6e\144\154\x65\162" && $Ls->check_versi(1))) {
goto Mx;
}
$N7 = new InstanceHelper();
$xc = $N7->get_login_handler_instance();
$xc->handle_sso($Ti, $eO, $wm, $Ga, $ZX, $A8);
Mx:
$na = isset($eO["\156\x61\155\145\137\141\164\x74\x72"]) ? $eO["\x6e\x61\x6d\145\x5f\141\x74\164\x72"] : '';
$t3 = isset($eO["\x65\155\141\151\x6c\137\141\x74\164\x72"]) ? $eO["\x65\x6d\141\151\x6c\x5f\x61\164\164\162"] : '';
$R_ = $Ls->getnestedattribute($wm, $t3);
$CH = $Ls->getnestedattribute($wm, $na);
if (!empty($R_)) {
goto xa;
}
MO_Oauth_Debug::mo_oauth_log("\105\x6d\x61\x69\x6c\40\141\x64\x64\162\x65\163\163\x20\x6e\157\x74\40\x72\x65\x63\145\151\166\x65\x64\x2e\x20\x43\x68\145\x63\x6b\40\x79\x6f\x75\x72\x20\101\x74\164\162\x69\142\165\164\145\40\115\x61\160\160\151\x6e\147\x20\143\157\156\x66\x69\x67\165\x72\x61\164\151\157\156\56");
$Ls->handle_error("\105\x6d\141\x69\x6c\x20\x61\144\x64\x72\x65\163\x73\x20\156\x6f\164\40\162\145\143\145\151\x76\145\144\x2e\x20\x43\150\145\x63\153\x20\171\157\165\162\40\74\163\164\162\x6f\x6e\x67\x3e\101\164\x74\x72\151\142\165\x74\x65\40\x4d\141\x70\x70\151\x6e\x67\x3c\57\163\x74\x72\x6f\x6e\147\76\x20\x63\157\x6e\146\151\147\165\x72\x61\x74\151\x6f\156\x2e");
wp_die("\105\155\x61\x69\154\40\141\x64\144\x72\145\163\163\x20\156\x6f\x74\40\x72\x65\143\x65\x69\x76\x65\x64\x2e\x20\103\150\145\x63\153\x20\171\157\165\x72\x20\74\163\164\162\x6f\x6e\x67\76\101\x74\164\x72\x69\x62\x75\x74\145\x20\x4d\141\x70\160\151\x6e\147\x3c\x2f\163\x74\x72\x6f\x6e\x67\x3e\x20\x63\157\x6e\146\x69\x67\x75\162\x61\x74\151\x6f\156\56");
xa:
if (!(false === strpos($R_, "\100"))) {
goto Bt;
}
MO_Oauth_Debug::mo_oauth_log("\x4d\141\160\x70\x65\144\40\x45\x6d\x61\151\154\x20\141\x74\x74\162\151\142\x75\164\145\x20\144\x6f\145\x73\x20\x6e\157\164\x20\143\x6f\156\164\x61\x69\x6e\40\166\141\x6c\x69\x64\x20\145\x6d\141\151\x6c\x2e");
$Ls->handle_error("\x4d\141\x70\x70\x65\144\40\x45\x6d\x61\x69\x6c\x20\141\164\164\x72\x69\x62\165\164\x65\x20\144\x6f\x65\x73\x20\156\x6f\x74\40\143\157\156\164\141\151\x6e\x20\166\141\x6c\151\x64\40\145\x6d\141\x69\x6c\x2e");
wp_die("\x4d\141\160\x70\x65\x64\x20\x45\x6d\x61\x69\x6c\x20\x61\164\164\x72\x69\x62\x75\164\145\40\144\x6f\145\x73\40\156\x6f\x74\x20\x63\157\156\164\141\x69\x6e\40\x76\x61\154\151\x64\x20\x65\x6d\x61\151\154\x2e");
Bt:
$user = get_user_by("\154\157\x67\x69\156", $R_);
if ($user) {
goto cE;
}
$user = get_user_by("\145\155\x61\x69\154", $R_);
cE:
if ($user) {
goto bl;
}
$fw = 0;
if ($Ls->mo_oauth_hbca_xyake()) {
goto PY;
}
$user = $Ls->mo_oauth_hjsguh_kiishuyauh878gs($R_, $CH);
goto bg;
PY:
if ($Ls->mo_oauth_client_get_option("\155\157\137\x6f\x61\165\x74\x68\137\x66\x6c\x61\x67") !== true) {
goto Bo;
}
$kC = base64_decode('PGRpdiBzdHlsZT0ndGV4dC1hbGlnbjpjZW50ZXI7Jz48Yj5Vc2VyIEFjY291bnQgZG9lcyBub3QgZXhpc3QuPC9iPjwvZGl2Pjxicj48c21hbGw+VGhpcyB2ZXJzaW9uIHN1cHBvcnRzIEF1dG8gQ3JlYXRlIFVzZXIgZmVhdHVyZSB1cHRvIDEwIFVzZXJzLiBQbGVhc2UgdXBncmFkZSB0byB0aGUgaGlnaGVyIHZlcnNpb24gb2YgdGhlIHBsdWdpbiB0byBlbmFibGUgYXV0byBjcmVhdGUgdXNlciBmb3IgdW5saW1pdGVkIHVzZXJzIG9yIGFkZCB1c2VyIG1hbnVhbGx5Ljwvc21hbGw+');
$Ls->handle_error($kC);
MO_Oauth_Debug::mo_oauth_log($kC);
wp_die($kC);
goto YP;
Bo:
$user = $Ls->mo_oauth_jhuyn_jgsukaj($R_, $CH);
YP:
bg:
goto Ua;
bl:
$fw = $user->ID;
Ua:
if (!$user) {
goto iI;
}
wp_set_current_user($user->ID);
MO_Oauth_Debug::mo_oauth_log("\x55\163\x65\x72\40\106\x6f\165\156\x64");
$Ta = false;
$Ta = apply_filters("\x6d\x6f\137\162\x65\x6d\x65\x6d\142\x65\x72\x5f\x6d\145", $Ta);
if (!$Ta) {
goto gO;
}
MO_Oauth_Debug::mo_oauth_log("\122\x65\x6d\x65\155\142\x65\x72\40\x41\144\x64\x6f\156\x20\141\x63\x74\151\166\141\x74\145\144");
gO:
wp_set_auth_cookie($user->ID, $Ta);
MO_Oauth_Debug::mo_oauth_log("\x55\x73\x65\162\x20\x63\x6f\x6f\153\151\x65\x20\163\145\x74");
$user = get_user_by("\111\x44", $user->ID);
do_action("\x77\160\137\x6c\x6f\147\151\156", $user->user_login, $user);
wp_safe_redirect(home_url());
MO_Oauth_Debug::mo_oauth_log("\125\x73\145\x72\40\x52\145\x64\151\162\x65\143\164\145\144\40\164\157\x20\150\157\155\145\40\165\x72\154");
exit;
iI:
}
public function get_resource_owner_from_app($VS, $Gl)
{
return $this->oauth_handler->get_resource_owner_from_id_token($VS);
}
}
Function Calls
None |
Stats
MD5 | 89972076913f5041395166f415ce2374 |
Eval Count | 0 |
Decode Time | 82 ms |