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\Free; use MoOauthClient\App; class AppSettings { ..
Decoded Output download
<?php
namespace MoOauthClient\Free;
use MoOauthClient\App;
class AppSettings
{
private $app_config;
public function __construct()
{
$this->app_config = array("client_id", "client_secret", "scope", "redirect_uri", "app_type", "authorizeurl", "accesstokenurl", "resourceownerdetailsurl", "groupdetailsurl", "jwks_uri", "displayappname", "appId", "mo_oauth_response_type");
}
public function save_app_settings()
{
global $rJ;
$A8 = $rJ->get_plugin_config()->get_current_config();
$Hh = "disabled";
if (empty($A8["mo_dte_state"])) {
goto ap;
}
$Hh = $rJ->mooauthdecrypt($A8["mo_dte_state"]);
ap:
if (!($Hh == "disabled")) {
goto fS;
}
if (!(isset($_POST["mo_oauth_add_app_nonce"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["mo_oauth_add_app_nonce"])), "mo_oauth_add_app") && isset($_POST[\MoOAuthConstants::OPTION]) && "mo_oauth_add_app" === $_POST[\MoOAuthConstants::OPTION])) {
goto Bb;
}
if (!($rJ->mo_oauth_check_empty_or_null($_POST["mo_oauth_client_id"]) || $rJ->mo_oauth_check_empty_or_null($_POST["mo_oauth_client_secret"]))) {
goto ji;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "Please enter valid Client ID and Client Secret.");
$rJ->mo_oauth_show_error_message();
return;
ji:
$RZ = isset($_POST["mo_oauth_custom_app_name"]) ? sanitize_text_field(wp_unslash($_POST["mo_oauth_custom_app_name"])) : false;
$es = $rJ->get_app_by_name($RZ);
$es = false !== $es ? $es->get_app_config() : [];
$l6 = false !== $es;
$ar = $rJ->get_app_list();
if (!(!$l6 && is_array($ar) && count($ar) > 0 && !$rJ->check_versi(4))) {
goto uN;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "You can only add 1 application with free version. Upgrade to enterprise version if you want to add more applications.");
$rJ->mo_oauth_show_error_message();
return;
uN:
$es = !is_array($es) || empty($es) ? array() : $es;
$es = $this->change_app_settings($_POST, $es);
$wM = isset($_POST["mo_oauth_discovery"]) && isset($es["is_discovery_valid"]) && $es["is_discovery_valid"] == "true";
if (!$wM) {
goto IX;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "Your settings are saved successfully.");
$es["mo_discovery_validation"] = "valid";
$rJ->mo_oauth_show_success_message();
goto b_;
IX:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "<strong>Error: </strong> Incorrect Domain/Tenant/Policy/Realm. Please configure with correct values and try again.");
$es["mo_discovery_validation"] = "invalid";
$rJ->mo_oauth_show_error_message();
b_:
$ar[$RZ] = new App($es);
$ar[$RZ]->set_app_name($RZ);
$ar = apply_filters("mo_oauth_client_save_additional_field_settings_internal", $ar);
$rJ->mo_oauth_client_update_option("mo_oauth_apps_list", $ar);
wp_redirect("admin.php?page=mo_oauth_settings&tab=config&action=update&app=" . urlencode($RZ));
Bb:
if (!(isset($_POST["mo_oauth_attribute_mapping_nonce"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["mo_oauth_attribute_mapping_nonce"])), "mo_oauth_attribute_mapping") && isset($_POST[\MoOAuthConstants::OPTION]) && "mo_oauth_attribute_mapping" === $_POST[\MoOAuthConstants::OPTION])) {
goto IC;
}
$RZ = sanitize_text_field(wp_unslash(isset($_POST[\MoOAuthConstants::POST_APP_NAME]) ? $_POST[\MoOAuthConstants::POST_APP_NAME] : ''));
$lG = $rJ->get_app_by_name($RZ);
$Hb = $lG->get_app_config('', false);
$post = array_map("esc_attr", $_POST);
$Hb = $this->change_attribute_mapping($post, $Hb);
$Hb = apply_filters("mo_oauth_client_save_additional_attr_mapping_settings_internal", $Hb);
$av = $rJ->set_app_by_name($RZ, $Hb);
if (!$av) {
goto Ls;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "Your settings are saved successfully.");
$rJ->mo_oauth_show_success_message();
goto az;
Ls:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "There was an error saving settings.");
$rJ->mo_oauth_show_error_message();
az:
wp_safe_redirect("admin.php?page=mo_oauth_settings&tab=config&action=update&app=" . rawurlencode($RZ));
IC:
fS:
do_action("mo_oauth_client_save_app_settings_internal");
}
public function change_app_settings($post, $es)
{
global $rJ;
$qY = '';
$kV = '';
$km = '';
$RZ = sanitize_text_field(wp_unslash(isset($post[\MoOAuthConstants::POST_APP_NAME]) ? $post[\MoOAuthConstants::POST_APP_NAME] : ''));
if ("eveonline" === $RZ) {
goto zd;
}
$mz = isset($post["mo_oauth_discovery"]) ? $post["mo_oauth_discovery"] : null;
if (!empty($mz)) {
goto VW;
}
$qY = isset($post["mo_oauth_authorizeurl"]) ? stripslashes($post["mo_oauth_authorizeurl"]) : '';
$kV = isset($post["mo_oauth_accesstokenurl"]) ? stripslashes($post["mo_oauth_accesstokenurl"]) : '';
$km = isset($post["mo_oauth_resourceownerdetailsurl"]) ? stripslashes($post["mo_oauth_resourceownerdetailsurl"]) : '';
goto k1;
VW:
$es["existing_app_flow"] = true;
if (isset($post["mo_oauth_provider_domain"])) {
goto Fw;
}
if (!isset($post["mo_oauth_provider_tenant"])) {
goto of;
}
$UD = stripslashes(trim($post["mo_oauth_provider_tenant"]));
$mz = str_replace("tenant", $UD, $mz);
$es["tenant"] = $UD;
of:
goto eK;
Fw:
$gh = stripslashes(rtrim($post["mo_oauth_provider_domain"], "/"));
$mz = str_replace("domain", $gh, $mz);
$es["domain"] = $gh;
eK:
if (isset($post["mo_oauth_provider_policy"])) {
goto fP;
}
if (!isset($post["mo_oauth_provider_realm"])) {
goto WZ;
}
$Bo = stripslashes(trim($post["mo_oauth_provider_realm"]));
$mz = str_replace("realmname", $Bo, $mz);
$es["realm"] = $Bo;
WZ:
goto vr;
fP:
$MK = stripslashes(trim($post["mo_oauth_provider_policy"]));
$mz = str_replace("policy", $MK, $mz);
$es["policy"] = $MK;
vr:
$du = null;
if (filter_var($mz, FILTER_VALIDATE_URL)) {
goto ze;
}
$es["is_discovery_valid"] = "false";
goto EP;
ze:
$rJ->mo_oauth_client_update_option("mo_oc_valid_discovery_ep", true);
$IQ = array("ssl" => array("verify_peer" => false, "verify_peer_name" => false));
$nM = @file_get_contents($mz, false, stream_context_create($IQ));
$du = array();
if ($nM) {
goto q3;
}
$es["is_discovery_valid"] = "false";
goto dW;
q3:
$du = json_decode($nM);
$es["is_discovery_valid"] = "true";
dW:
$rg = isset($du->scopes_supported[0]) ? $du->scopes_supported[0] : '';
$WD = isset($du->scopes_supported[1]) ? $du->scopes_supported[1] : '';
$FH = stripslashes($rg) . " " . stripslashes($WD);
$es["discovery"] = $mz;
$es["scope"] = isset($og) && !empty($og) ? $og : $FH;
$qY = isset($du->authorization_endpoint) ? stripslashes($du->authorization_endpoint) : '';
$kV = isset($du->token_endpoint) ? stripslashes($du->token_endpoint) : '';
$km = isset($du->userinfo_endpoint) ? stripslashes($du->userinfo_endpoint) : '';
EP:
k1:
goto xP;
zd:
$rJ->mo_oauth_client_update_option("mo_oauth_eveonline_enable", 1);
$rJ->mo_oauth_client_update_option("mo_oauth_eveonline_client_id", $K_);
$rJ->mo_oauth_client_update_option("mo_oauth_eveonline_client_secret", $aO);
if (!($rJ->mo_oauth_client_get_option("mo_oauth_eveonline_client_id") && $rJ->mo_oauth_client_get_option("mo_oauth_eveonline_client_secret"))) {
goto Lg;
}
$Y9 = new Customer();
$HP = $Y9->add_oauth_application("eveonline", "EVE Online OAuth");
if ("Application Created" === $HP) {
goto N9;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, $HP);
$this->mo_oauth_show_error_message();
goto ig;
N9:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "Your settings were saved. Go to Advanced EVE Online Settings for configuring restrictions on user sign in.");
$this->mo_oauth_show_success_message();
ig:
Lg:
xP:
isset($post["mo_oauth_scope"]) && !empty($post["mo_oauth_scope"]) ? $es["scope"] = sanitize_text_field(wp_unslash($post["mo_oauth_scope"])) : '';
$es["unique_appid"] = isset($post["mo_oauth_custom_app_name"]) ? stripslashes($post["mo_oauth_custom_app_name"]) : '';
$es["client_id"] = $rJ->mooauthencrypt(sanitize_text_field(wp_unslash(isset($post["mo_oauth_client_id"]) ? $post["mo_oauth_client_id"] : '')));
$es["client_secret"] = $rJ->mooauthencrypt(wp_unslash(isset($post["mo_oauth_client_secret"]) ? stripslashes(trim($post["mo_oauth_client_secret"])) : ''));
$es["client_creds_encrpyted"] = true;
$es["send_headers"] = isset($post["mo_oauth_authorization_header"]) ? (int) filter_var($post["mo_oauth_authorization_header"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["send_body"] = isset($post["mo_oauth_body"]) ? (int) filter_var($post["mo_oauth_body"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["send_state"] = isset($_POST["mo_oauth_state"]) ? (int) filter_var($_POST["mo_oauth_state"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["send_nonce"] = isset($_POST["mo_oauth_nonce"]) ? (int) filter_var($_POST["mo_oauth_nonce"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["show_on_login_page"] = isset($post["mo_oauth_show_on_login_page"]) ? (int) filter_var($post["mo_oauth_show_on_login_page"], FILTER_SANITIZE_NUMBER_INT) : 0;
if (!(!empty($es["app_type"]) && $es["app_type"] === "oauth1")) {
goto xq;
}
$es["requesturl"] = isset($post["mo_oauth_requesturl"]) ? stripslashes($post["mo_oauth_requesturl"]) : '';
xq:
if (isset($es["appId"])) {
goto aX;
}
$es["appId"] = $RZ;
aX:
$es["redirect_uri"] = sanitize_text_field(wp_unslash(isset($post["mo_update_url"]) ? $post["mo_update_url"] : site_url()));
$es["authorizeurl"] = $qY;
$es["accesstokenurl"] = $kV;
$es["app_type"] = isset($post["mo_oauth_app_type"]) ? stripslashes($post["mo_oauth_app_type"]) : stripslashes("oauth");
if (!($es["app_type"] == "oauth" || $es["app_type"] == "oauth1" || isset($post["mo_oauth_resourceownerdetailsurl"]))) {
goto iT;
}
$es["resourceownerdetailsurl"] = $km;
iT:
return $es;
}
public function change_attribute_mapping($post, $es)
{
$YY = stripslashes($post["mo_oauth_username_attr"]);
$es["username_attr"] = $YY;
return $es;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace MoOauthClient\Free;
use MoOauthClient\App;
class AppSettings
{
private $app_config;
public function __construct()
{
$this->app_config = array("\x63\154\x69\x65\156\164\x5f\x69\x64", "\x63\154\151\145\156\x74\x5f\163\x65\x63\162\145\164", "\163\143\157\x70\145", "\162\145\x64\151\x72\145\143\164\x5f\165\x72\x69", "\141\160\160\x5f\164\171\160\145", "\x61\165\164\x68\157\x72\151\x7a\145\165\x72\154", "\141\143\x63\x65\163\x73\x74\157\x6b\x65\156\x75\x72\154", "\162\145\163\157\x75\162\143\145\x6f\167\x6e\145\x72\144\x65\164\141\151\x6c\163\165\162\x6c", "\x67\x72\157\165\160\144\x65\164\x61\151\x6c\163\165\162\154", "\152\x77\153\163\x5f\165\162\151", "\144\x69\163\160\x6c\x61\171\x61\x70\x70\156\x61\x6d\x65", "\x61\160\160\111\x64", "\x6d\x6f\x5f\157\x61\165\x74\150\x5f\162\145\163\x70\157\x6e\x73\145\x5f\164\x79\160\145");
}
public function save_app_settings()
{
global $rJ;
$A8 = $rJ->get_plugin_config()->get_current_config();
$Hh = "\x64\151\x73\x61\x62\154\x65\144";
if (empty($A8["\x6d\x6f\x5f\x64\164\145\137\x73\164\141\164\145"])) {
goto ap;
}
$Hh = $rJ->mooauthdecrypt($A8["\155\x6f\x5f\x64\x74\x65\137\x73\164\x61\x74\145"]);
ap:
if (!($Hh == "\144\x69\x73\x61\142\x6c\145\144")) {
goto fS;
}
if (!(isset($_POST["\155\x6f\x5f\157\141\x75\x74\x68\x5f\x61\x64\x64\x5f\141\x70\160\x5f\x6e\157\156\143\145"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["\x6d\x6f\137\157\x61\165\x74\x68\137\x61\144\144\x5f\x61\x70\160\x5f\156\157\156\x63\x65"])), "\155\157\137\157\x61\x75\164\x68\137\141\x64\144\x5f\x61\x70\x70") && isset($_POST[\MoOAuthConstants::OPTION]) && "\155\157\x5f\x6f\x61\x75\164\150\x5f\x61\x64\144\x5f\141\160\x70" === $_POST[\MoOAuthConstants::OPTION])) {
goto Bb;
}
if (!($rJ->mo_oauth_check_empty_or_null($_POST["\x6d\x6f\137\x6f\x61\165\x74\150\x5f\x63\x6c\151\x65\x6e\x74\137\151\x64"]) || $rJ->mo_oauth_check_empty_or_null($_POST["\x6d\157\x5f\x6f\x61\165\164\150\x5f\143\x6c\151\145\x6e\x74\x5f\x73\145\x63\x72\x65\164"]))) {
goto ji;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\x50\154\145\x61\x73\145\x20\145\156\164\145\162\x20\166\141\154\151\x64\40\103\154\151\x65\x6e\x74\40\x49\104\x20\x61\x6e\144\x20\103\x6c\151\145\156\x74\40\x53\x65\143\x72\x65\164\56");
$rJ->mo_oauth_show_error_message();
return;
ji:
$RZ = isset($_POST["\155\x6f\137\x6f\141\x75\164\150\137\143\165\x73\164\x6f\155\137\141\x70\160\x5f\156\x61\x6d\x65"]) ? sanitize_text_field(wp_unslash($_POST["\x6d\x6f\x5f\x6f\x61\165\164\x68\137\143\x75\x73\164\157\155\137\141\160\x70\137\156\x61\155\x65"])) : false;
$es = $rJ->get_app_by_name($RZ);
$es = false !== $es ? $es->get_app_config() : [];
$l6 = false !== $es;
$ar = $rJ->get_app_list();
if (!(!$l6 && is_array($ar) && count($ar) > 0 && !$rJ->check_versi(4))) {
goto uN;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\131\157\x75\40\143\x61\x6e\40\x6f\156\154\x79\40\x61\144\x64\40\61\40\141\160\x70\154\151\143\x61\164\151\157\x6e\x20\167\151\x74\150\40\x66\x72\145\145\40\166\x65\162\163\151\157\x6e\x2e\x20\x55\x70\x67\x72\x61\x64\x65\40\x74\x6f\40\145\x6e\x74\145\162\x70\162\x69\163\x65\x20\166\x65\162\163\x69\157\156\x20\x69\x66\x20\171\157\165\40\167\x61\x6e\x74\x20\x74\x6f\x20\x61\144\x64\x20\155\x6f\x72\145\40\x61\x70\160\x6c\151\143\x61\x74\151\157\x6e\163\x2e");
$rJ->mo_oauth_show_error_message();
return;
uN:
$es = !is_array($es) || empty($es) ? array() : $es;
$es = $this->change_app_settings($_POST, $es);
$wM = isset($_POST["\x6d\x6f\137\157\141\165\x74\150\x5f\x64\151\163\143\x6f\166\145\162\x79"]) && isset($es["\151\x73\137\x64\151\x73\143\157\166\145\x72\x79\x5f\166\x61\x6c\151\x64"]) && $es["\x69\x73\137\x64\151\x73\143\157\x76\145\162\171\137\166\141\154\151\x64"] == "\x74\x72\x75\x65";
if (!$wM) {
goto IX;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\x59\157\x75\162\40\x73\x65\x74\x74\151\156\147\163\x20\141\162\x65\x20\163\141\x76\145\x64\40\163\x75\x63\143\x65\163\x73\x66\x75\x6c\154\x79\x2e");
$es["\x6d\x6f\137\x64\151\x73\x63\x6f\x76\x65\162\x79\x5f\166\x61\x6c\151\x64\141\x74\x69\x6f\156"] = "\166\141\154\151\x64";
$rJ->mo_oauth_show_success_message();
goto b_;
IX:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\x3c\x73\x74\162\157\x6e\147\x3e\x45\162\x72\x6f\162\72\x20\x3c\x2f\x73\164\x72\157\x6e\147\76\x20\x49\156\x63\x6f\162\x72\145\x63\164\40\x44\x6f\155\141\x69\156\x2f\124\x65\156\141\x6e\x74\x2f\x50\x6f\154\x69\x63\x79\57\122\x65\141\x6c\155\56\x20\x50\x6c\145\141\163\x65\40\x63\x6f\x6e\x66\x69\147\x75\x72\x65\x20\x77\151\x74\x68\40\x63\157\162\x72\x65\143\x74\x20\166\141\154\x75\x65\x73\40\141\156\x64\40\x74\x72\x79\x20\x61\147\141\x69\156\x2e");
$es["\155\x6f\137\x64\x69\x73\x63\157\166\x65\x72\x79\137\166\141\x6c\x69\144\141\x74\151\157\x6e"] = "\x69\x6e\166\x61\154\151\x64";
$rJ->mo_oauth_show_error_message();
b_:
$ar[$RZ] = new App($es);
$ar[$RZ]->set_app_name($RZ);
$ar = apply_filters("\x6d\x6f\137\157\x61\x75\164\150\137\x63\x6c\151\x65\x6e\164\x5f\163\x61\x76\145\137\x61\144\144\x69\x74\x69\157\x6e\x61\x6c\x5f\x66\151\145\154\x64\x5f\x73\x65\x74\x74\x69\156\x67\163\137\x69\156\x74\145\162\156\141\154", $ar);
$rJ->mo_oauth_client_update_option("\155\157\x5f\157\141\165\164\150\x5f\x61\160\x70\163\x5f\154\x69\x73\x74", $ar);
wp_redirect("\141\144\155\x69\x6e\56\160\x68\160\x3f\x70\141\147\145\75\x6d\x6f\x5f\x6f\x61\x75\164\150\x5f\x73\x65\164\164\151\x6e\x67\x73\x26\164\x61\x62\x3d\143\157\x6e\x66\x69\147\46\141\143\164\151\157\x6e\x3d\165\160\144\141\164\145\46\141\x70\160\x3d" . urlencode($RZ));
Bb:
if (!(isset($_POST["\x6d\157\137\157\141\165\x74\150\137\x61\164\x74\162\151\142\x75\x74\x65\x5f\x6d\141\x70\160\x69\156\147\x5f\x6e\157\156\x63\x65"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["\x6d\x6f\x5f\157\141\165\164\150\x5f\x61\164\x74\162\x69\x62\165\164\x65\137\155\x61\x70\160\151\x6e\147\x5f\156\x6f\x6e\x63\x65"])), "\x6d\x6f\137\157\141\x75\164\150\x5f\141\x74\x74\162\x69\x62\x75\164\145\x5f\x6d\x61\160\x70\x69\156\x67") && isset($_POST[\MoOAuthConstants::OPTION]) && "\x6d\157\x5f\157\141\x75\164\x68\x5f\x61\x74\164\x72\151\142\165\164\x65\137\x6d\x61\160\x70\151\x6e\x67" === $_POST[\MoOAuthConstants::OPTION])) {
goto IC;
}
$RZ = sanitize_text_field(wp_unslash(isset($_POST[\MoOAuthConstants::POST_APP_NAME]) ? $_POST[\MoOAuthConstants::POST_APP_NAME] : ''));
$lG = $rJ->get_app_by_name($RZ);
$Hb = $lG->get_app_config('', false);
$post = array_map("\145\163\143\x5f\x61\164\164\162", $_POST);
$Hb = $this->change_attribute_mapping($post, $Hb);
$Hb = apply_filters("\x6d\157\x5f\157\x61\165\x74\150\x5f\143\x6c\151\x65\156\x74\137\x73\141\x76\x65\137\141\x64\x64\151\x74\151\x6f\x6e\x61\154\x5f\141\164\164\162\x5f\155\x61\x70\x70\x69\156\147\137\163\145\164\164\x69\x6e\x67\x73\137\x69\x6e\x74\x65\162\x6e\x61\x6c", $Hb);
$av = $rJ->set_app_by_name($RZ, $Hb);
if (!$av) {
goto Ls;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\x59\x6f\x75\162\x20\x73\x65\x74\164\151\x6e\147\163\40\x61\x72\145\x20\163\x61\x76\145\144\40\x73\165\x63\143\145\163\163\x66\165\x6c\154\x79\56");
$rJ->mo_oauth_show_success_message();
goto az;
Ls:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\124\x68\145\162\145\x20\x77\x61\163\40\x61\x6e\40\145\x72\x72\x6f\x72\40\163\141\x76\x69\156\147\40\x73\145\x74\164\151\156\x67\163\56");
$rJ->mo_oauth_show_error_message();
az:
wp_safe_redirect("\141\x64\155\x69\x6e\x2e\x70\x68\160\x3f\160\x61\x67\x65\75\x6d\x6f\137\x6f\141\x75\x74\x68\x5f\x73\145\164\164\151\156\147\163\46\164\x61\142\x3d\x63\157\x6e\x66\x69\147\x26\141\143\x74\x69\x6f\x6e\x3d\x75\160\144\x61\x74\145\46\x61\160\x70\x3d" . rawurlencode($RZ));
IC:
fS:
do_action("\x6d\x6f\x5f\x6f\x61\x75\164\x68\x5f\143\x6c\x69\x65\x6e\x74\137\x73\x61\x76\145\137\141\x70\160\x5f\x73\145\164\x74\x69\x6e\x67\163\x5f\151\x6e\x74\x65\x72\156\x61\x6c");
}
public function change_app_settings($post, $es)
{
global $rJ;
$qY = '';
$kV = '';
$km = '';
$RZ = sanitize_text_field(wp_unslash(isset($post[\MoOAuthConstants::POST_APP_NAME]) ? $post[\MoOAuthConstants::POST_APP_NAME] : ''));
if ("\145\166\x65\157\x6e\154\151\156\145" === $RZ) {
goto zd;
}
$mz = isset($post["\x6d\157\x5f\x6f\x61\x75\164\150\x5f\x64\151\x73\143\x6f\x76\x65\162\x79"]) ? $post["\x6d\157\x5f\157\x61\x75\x74\x68\137\x64\x69\163\x63\x6f\166\x65\x72\171"] : null;
if (!empty($mz)) {
goto VW;
}
$qY = isset($post["\155\157\137\157\x61\x75\164\150\x5f\x61\x75\164\x68\157\162\151\172\x65\x75\x72\x6c"]) ? stripslashes($post["\x6d\157\137\x6f\141\165\164\150\137\x61\x75\164\150\157\x72\x69\172\145\165\x72\154"]) : '';
$kV = isset($post["\155\157\137\157\x61\165\x74\x68\137\x61\x63\143\x65\163\163\164\157\153\x65\x6e\165\x72\x6c"]) ? stripslashes($post["\x6d\x6f\x5f\157\x61\165\x74\x68\137\141\x63\x63\145\x73\x73\164\x6f\x6b\x65\x6e\165\162\x6c"]) : '';
$km = isset($post["\x6d\x6f\x5f\x6f\141\x75\164\150\x5f\x72\x65\163\x6f\x75\162\x63\145\157\167\156\145\162\144\x65\x74\141\x69\x6c\163\165\x72\154"]) ? stripslashes($post["\x6d\x6f\x5f\157\x61\165\164\x68\137\162\x65\163\157\x75\162\x63\145\x6f\167\156\x65\x72\144\145\x74\141\151\x6c\163\x75\x72\x6c"]) : '';
goto k1;
VW:
$es["\x65\170\x69\163\164\151\156\x67\137\x61\x70\x70\x5f\x66\x6c\x6f\167"] = true;
if (isset($post["\155\x6f\137\x6f\x61\165\x74\x68\137\x70\x72\157\166\x69\144\x65\162\x5f\144\157\155\x61\x69\x6e"])) {
goto Fw;
}
if (!isset($post["\x6d\x6f\x5f\x6f\141\165\164\x68\137\160\x72\157\x76\x69\x64\145\162\137\164\x65\x6e\141\x6e\164"])) {
goto of;
}
$UD = stripslashes(trim($post["\155\x6f\x5f\x6f\x61\165\x74\x68\x5f\160\162\157\166\151\x64\x65\x72\137\164\x65\156\x61\156\164"]));
$mz = str_replace("\x74\145\x6e\x61\156\x74", $UD, $mz);
$es["\164\145\x6e\x61\x6e\164"] = $UD;
of:
goto eK;
Fw:
$gh = stripslashes(rtrim($post["\155\x6f\137\x6f\x61\165\164\150\x5f\160\x72\157\166\151\x64\x65\162\x5f\144\x6f\155\141\151\156"], "\57"));
$mz = str_replace("\144\x6f\155\141\x69\x6e", $gh, $mz);
$es["\144\x6f\155\x61\151\156"] = $gh;
eK:
if (isset($post["\x6d\x6f\137\x6f\x61\165\164\x68\x5f\160\x72\157\x76\151\144\x65\x72\137\160\157\154\151\x63\171"])) {
goto fP;
}
if (!isset($post["\155\157\x5f\x6f\141\165\x74\x68\x5f\x70\x72\157\x76\x69\144\145\162\137\162\x65\141\x6c\155"])) {
goto WZ;
}
$Bo = stripslashes(trim($post["\x6d\x6f\137\157\141\x75\x74\150\137\160\x72\x6f\166\151\144\145\162\137\162\145\141\x6c\x6d"]));
$mz = str_replace("\162\145\x61\154\155\156\x61\x6d\145", $Bo, $mz);
$es["\162\x65\141\154\155"] = $Bo;
WZ:
goto vr;
fP:
$MK = stripslashes(trim($post["\155\157\137\157\x61\x75\x74\150\137\x70\x72\157\x76\x69\144\x65\162\x5f\160\157\154\151\x63\171"]));
$mz = str_replace("\160\157\x6c\x69\x63\x79", $MK, $mz);
$es["\x70\x6f\x6c\x69\143\x79"] = $MK;
vr:
$du = null;
if (filter_var($mz, FILTER_VALIDATE_URL)) {
goto ze;
}
$es["\x69\163\x5f\x64\151\x73\143\157\x76\x65\162\x79\137\x76\141\x6c\151\144"] = "\146\x61\x6c\163\145";
goto EP;
ze:
$rJ->mo_oauth_client_update_option("\x6d\x6f\x5f\x6f\143\x5f\166\x61\154\151\x64\x5f\144\151\x73\143\x6f\166\x65\162\171\x5f\145\160", true);
$IQ = array("\163\163\x6c" => array("\x76\x65\x72\x69\146\x79\137\160\x65\145\162" => false, "\x76\x65\162\151\146\171\x5f\160\145\x65\162\x5f\x6e\141\155\x65" => false));
$nM = @file_get_contents($mz, false, stream_context_create($IQ));
$du = array();
if ($nM) {
goto q3;
}
$es["\151\163\137\x64\151\163\143\x6f\166\145\x72\171\x5f\x76\141\x6c\151\x64"] = "\x66\141\154\163\x65";
goto dW;
q3:
$du = json_decode($nM);
$es["\x69\x73\137\144\151\163\143\x6f\166\145\162\171\x5f\166\141\154\151\x64"] = "\164\x72\165\145";
dW:
$rg = isset($du->scopes_supported[0]) ? $du->scopes_supported[0] : '';
$WD = isset($du->scopes_supported[1]) ? $du->scopes_supported[1] : '';
$FH = stripslashes($rg) . "\40" . stripslashes($WD);
$es["\144\x69\163\x63\157\166\145\x72\171"] = $mz;
$es["\163\143\157\x70\x65"] = isset($og) && !empty($og) ? $og : $FH;
$qY = isset($du->authorization_endpoint) ? stripslashes($du->authorization_endpoint) : '';
$kV = isset($du->token_endpoint) ? stripslashes($du->token_endpoint) : '';
$km = isset($du->userinfo_endpoint) ? stripslashes($du->userinfo_endpoint) : '';
EP:
k1:
goto xP;
zd:
$rJ->mo_oauth_client_update_option("\155\157\x5f\157\141\x75\164\150\137\x65\x76\x65\x6f\156\x6c\x69\x6e\145\x5f\145\156\141\142\x6c\x65", 1);
$rJ->mo_oauth_client_update_option("\x6d\157\x5f\x6f\141\x75\164\150\x5f\x65\166\x65\157\x6e\154\151\156\x65\x5f\x63\154\x69\x65\x6e\164\x5f\x69\144", $K_);
$rJ->mo_oauth_client_update_option("\155\157\137\157\x61\x75\x74\150\137\145\x76\x65\x6f\156\x6c\151\156\x65\x5f\x63\154\x69\x65\156\164\x5f\x73\x65\143\x72\145\x74", $aO);
if (!($rJ->mo_oauth_client_get_option("\155\157\x5f\157\x61\165\x74\150\x5f\145\x76\145\157\x6e\154\151\156\x65\137\143\x6c\x69\145\156\x74\137\x69\144") && $rJ->mo_oauth_client_get_option("\x6d\x6f\x5f\x6f\141\x75\x74\150\x5f\x65\x76\x65\x6f\156\154\151\156\145\x5f\x63\154\151\x65\156\164\137\x73\145\143\162\145\164"))) {
goto Lg;
}
$Y9 = new Customer();
$HP = $Y9->add_oauth_application("\145\x76\145\x6f\156\x6c\x69\x6e\145", "\105\126\105\40\117\x6e\154\151\x6e\x65\40\x4f\x41\165\164\x68");
if ("\101\x70\x70\154\x69\x63\x61\164\151\x6f\x6e\x20\x43\162\145\x61\x74\145\144" === $HP) {
goto N9;
}
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, $HP);
$this->mo_oauth_show_error_message();
goto ig;
N9:
$rJ->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\131\x6f\165\162\40\x73\145\x74\x74\x69\156\x67\x73\x20\x77\x65\x72\145\x20\163\141\x76\145\x64\56\x20\107\x6f\x20\x74\x6f\40\x41\144\x76\141\x6e\143\145\x64\40\x45\x56\x45\40\x4f\x6e\x6c\151\x6e\145\40\x53\x65\x74\164\x69\x6e\147\x73\40\x66\x6f\x72\x20\x63\157\156\146\x69\x67\x75\162\151\x6e\147\x20\x72\145\x73\x74\x72\x69\x63\x74\151\157\156\163\40\x6f\156\x20\x75\x73\145\x72\x20\x73\151\x67\156\x20\x69\156\x2e");
$this->mo_oauth_show_success_message();
ig:
Lg:
xP:
isset($post["\x6d\x6f\137\157\x61\165\164\x68\x5f\163\x63\x6f\x70\x65"]) && !empty($post["\x6d\157\x5f\x6f\x61\x75\x74\x68\137\x73\143\x6f\x70\x65"]) ? $es["\x73\143\157\160\145"] = sanitize_text_field(wp_unslash($post["\x6d\157\x5f\x6f\141\x75\x74\150\x5f\x73\x63\157\160\x65"])) : '';
$es["\165\x6e\151\161\165\x65\x5f\x61\x70\160\x69\144"] = isset($post["\x6d\157\137\x6f\x61\165\x74\x68\x5f\x63\165\163\x74\x6f\155\137\141\x70\160\x5f\156\x61\155\x65"]) ? stripslashes($post["\155\157\137\x6f\141\x75\164\150\x5f\x63\165\x73\x74\x6f\155\x5f\141\160\160\137\156\x61\x6d\x65"]) : '';
$es["\143\x6c\151\x65\x6e\164\x5f\151\x64"] = $rJ->mooauthencrypt(sanitize_text_field(wp_unslash(isset($post["\155\157\x5f\157\141\165\x74\x68\137\143\154\x69\145\x6e\164\x5f\151\x64"]) ? $post["\x6d\157\x5f\157\141\x75\x74\x68\x5f\x63\154\x69\x65\x6e\x74\137\151\x64"] : '')));
$es["\143\x6c\151\x65\x6e\164\x5f\163\145\x63\x72\145\164"] = $rJ->mooauthencrypt(wp_unslash(isset($post["\155\157\137\x6f\x61\x75\x74\x68\x5f\x63\x6c\x69\145\156\164\137\163\145\x63\x72\x65\x74"]) ? stripslashes(trim($post["\x6d\x6f\137\157\141\165\x74\x68\x5f\143\154\x69\145\x6e\x74\x5f\163\x65\x63\162\x65\164"])) : ''));
$es["\x63\x6c\151\145\156\x74\x5f\x63\x72\145\144\x73\x5f\145\x6e\143\162\x70\171\164\145\x64"] = true;
$es["\x73\145\x6e\x64\137\150\x65\141\x64\x65\162\163"] = isset($post["\x6d\x6f\137\x6f\141\165\164\150\137\x61\165\x74\x68\157\162\x69\x7a\141\x74\151\157\156\x5f\150\x65\x61\144\x65\x72"]) ? (int) filter_var($post["\155\x6f\137\157\141\x75\x74\x68\x5f\x61\165\164\x68\x6f\x72\x69\172\141\x74\x69\157\156\x5f\x68\x65\x61\x64\145\x72"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["\x73\x65\x6e\x64\137\x62\157\x64\171"] = isset($post["\155\157\137\157\141\165\164\x68\x5f\x62\x6f\144\171"]) ? (int) filter_var($post["\155\x6f\x5f\157\x61\165\x74\x68\137\x62\157\x64\x79"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["\x73\x65\156\x64\137\x73\164\x61\x74\145"] = isset($_POST["\x6d\157\x5f\157\x61\165\164\x68\137\x73\164\141\x74\145"]) ? (int) filter_var($_POST["\x6d\x6f\137\x6f\x61\165\164\x68\x5f\x73\164\x61\164\x65"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["\163\x65\156\x64\x5f\x6e\157\156\x63\x65"] = isset($_POST["\x6d\x6f\137\x6f\x61\165\164\x68\x5f\156\157\x6e\143\145"]) ? (int) filter_var($_POST["\155\157\137\x6f\141\x75\164\150\137\x6e\x6f\156\x63\x65"], FILTER_SANITIZE_NUMBER_INT) : 0;
$es["\x73\x68\x6f\x77\x5f\157\156\x5f\x6c\157\147\151\156\137\160\141\x67\145"] = isset($post["\x6d\x6f\137\x6f\141\x75\x74\150\137\x73\150\157\x77\137\x6f\156\137\154\157\x67\151\156\137\160\141\147\145"]) ? (int) filter_var($post["\x6d\157\137\157\141\165\164\150\137\x73\x68\157\167\x5f\x6f\x6e\137\154\157\x67\x69\156\137\160\x61\x67\145"], FILTER_SANITIZE_NUMBER_INT) : 0;
if (!(!empty($es["\141\x70\x70\137\164\x79\160\145"]) && $es["\141\x70\x70\x5f\x74\171\x70\145"] === "\x6f\x61\x75\164\150\x31")) {
goto xq;
}
$es["\x72\x65\x71\165\145\x73\164\165\162\154"] = isset($post["\155\x6f\x5f\157\141\165\164\x68\x5f\162\145\161\165\x65\163\164\165\162\154"]) ? stripslashes($post["\155\157\x5f\157\x61\165\164\x68\x5f\162\145\x71\x75\145\x73\x74\x75\x72\154"]) : '';
xq:
if (isset($es["\x61\160\160\x49\144"])) {
goto aX;
}
$es["\x61\160\160\x49\x64"] = $RZ;
aX:
$es["\162\x65\144\151\x72\x65\143\x74\x5f\x75\x72\x69"] = sanitize_text_field(wp_unslash(isset($post["\x6d\157\137\x75\x70\x64\141\164\145\x5f\165\x72\154"]) ? $post["\x6d\x6f\x5f\165\x70\x64\141\164\x65\x5f\x75\162\x6c"] : site_url()));
$es["\141\165\164\x68\x6f\162\x69\x7a\145\x75\x72\x6c"] = $qY;
$es["\x61\143\x63\145\x73\x73\x74\157\x6b\x65\x6e\x75\x72\154"] = $kV;
$es["\141\160\x70\137\164\171\160\x65"] = isset($post["\x6d\157\x5f\x6f\x61\x75\x74\x68\137\141\160\x70\137\164\171\x70\x65"]) ? stripslashes($post["\x6d\157\x5f\157\141\x75\x74\x68\137\x61\160\160\137\164\171\160\x65"]) : stripslashes("\157\x61\x75\164\150");
if (!($es["\x61\x70\x70\x5f\164\x79\160\x65"] == "\x6f\141\165\x74\150" || $es["\141\x70\160\137\x74\171\x70\x65"] == "\157\141\x75\164\x68\61" || isset($post["\155\x6f\137\x6f\141\165\x74\150\x5f\x72\x65\x73\x6f\x75\x72\143\145\x6f\167\156\x65\x72\144\x65\x74\141\151\x6c\163\x75\162\154"]))) {
goto iT;
}
$es["\162\145\x73\x6f\165\162\143\145\157\167\156\x65\x72\144\x65\164\x61\x69\154\163\165\162\x6c"] = $km;
iT:
return $es;
}
public function change_attribute_mapping($post, $es)
{
$YY = stripslashes($post["\155\x6f\x5f\157\x61\165\164\x68\x5f\x75\163\x65\x72\x6e\141\155\x65\137\x61\x74\x74\x72"]);
$es["\x75\163\x65\162\156\141\x6d\145\x5f\141\164\164\162"] = $YY;
return $es;
}
}
Function Calls
None |
Stats
MD5 | 0f5e069d707b927f9ee78e5d4165d663 |
Eval Count | 0 |
Decode Time | 69 ms |