Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
public function checkForRedirection(RequestEvent $qh) { global $base_url; ..
Decoded Output download
<? public function checkForRedirection(RequestEvent $qh)
{
global $base_url;
$current_user = \Drupal::currentUser();
$np = \Drupal::request();
$IV = $np->getUri();
$qD = \Drupal::request()->getPathInfo();
$w_ = \Drupal::service("session");
if (!(\Drupal::currentUser()->isAuthenticated() && $w_->isStarted())) {
goto tY;
}
$E0 = User::load(\Drupal::currentUser()->id());
if (!$E0) {
goto qy;
}
$xO = $w_->get("moOauthSetAt") !== NULL ? $w_->get("moOauthSetAt") : '';
$L5 = $w_->get("moOauthContent") !== NULL ? $w_->get("moOauthContent") : '';
if (!(!empty($L5) && !empty($xO))) {
goto ez;
}
if (!(isset($L5["expires_in"]) && $xO + $L5["expires_in"] - \Drupal::time()->getCurrentTime() < 0)) {
goto wb;
}
miniorange_oauth_clientController::moOauthGetAccessToken();
wb:
ez:
qy:
tY:
$WS = strpos($IV, "?");
$Sn = $WS !== false ? substr($IV, 0, $WS) : $IV;
$LB = $base_url . "/user/" . $current_user->id() . "/edit";
$Pa = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_require_profile_field");
if (!($Pa == 1 && $current_user->isAuthenticated() && !in_array("administrator", $current_user->getRoles()))) {
goto AZ;
}
if (!(!Utilities::check_for_redirect_to_user_profile_form($current_user->getEmail()) && $IV != $LB)) {
goto ei;
}
Utilities::redirect_to_profile_form($current_user->id());
ei:
AZ:
$U1 = \Drupal::config("miniorange_oauth_client.settings")->get("auto_redirect_app_name");
$TV = DBQueries::get_all_applications_with_oauth_login_enabled();
$TW = in_array($U1, $TV) ? (new appValues($U1))->enable_login_with_oauth : 0;
if (!empty(\Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_base_url"))) {
goto eB;
}
$sS = $base_url;
goto tc;
eB:
$sS = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_base_url");
tc:
$Sp = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_enable_backdoor");
$iv = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_force_auth");
$yZ = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_license_key");
$Eb = strpos($Sn, "mo_login") || strpos($Sn, "moLogin") || strpos($Sn, "user/reset") || strpos($Sn, "user/password") || strpos($Sn, "files/css") || strpos($Sn, "files/js") ? true : false;
$Dp = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_client_enable_page_access");
if (!$TW) {
goto MH;
}
if (!(!\Drupal::currentUser()->isAuthenticated() && $Eb == false && !isset($_POST["pass"]))) {
goto c8;
}
if ($Sp && isset($_GET["oauth_client_login"]) && $_GET["oauth_client_login"] == "false") {
goto wu;
}
if (!$iv) {
goto oQ;
}
$Jk = \Drupal::config("miniorange_oauth_client.settings")->get("miniorange_oauth_page_restriction_type");
if ($Dp && isset($_GET["stop_redirect"]) && $_GET["stop_redirect"] == "true") {
goto mG;
}
if ($Jk === "whitelist_pages") {
goto NM;
}
if (!($Jk === "restrict_pages" && Utilities::is_page_restricted($qD))) {
goto lQ;
}
$mm = miniorange_oauth_clientController::miniorange_oauth_client_mologin($IV);
if (!(strpos($Sn, "admin") !== false)) {
goto XA;
}
$mm->send();
exit;
XA:
$qh->setResponse($mm);
lQ:
goto Vz;
NM:
if (Utilities::is_page_excluded($qD)) {
goto vg;
}
$mm = miniorange_oauth_clientController::miniorange_oauth_client_mologin($IV);
if (!(strpos($Sn, "admin") !== false)) {
goto wm;
}
$mm->send();
exit;
wm:
$qh->setResponse($mm);
goto r5;
vg:
r5:
Vz:
goto bA;
mG:
bA:
oQ:
goto Kt;
wu:
Kt:
c8:
if (!($yZ == NULL)) {
goto Xt;
}
$NV = \Drupal::configFactory()->getEditable("miniorange_oauth_client.settings");
$NV->clear("miniorange_oauth_client_force_auth")->clear("miniorange_oauth_client_auto_redirect_to_idp")->save();
Xt:
MH:
} ?>
Did this file decode correctly?
Original Code
public function checkForRedirection(RequestEvent $qh)
{
global $base_url;
$current_user = \Drupal::currentUser();
$np = \Drupal::request();
$IV = $np->getUri();
$qD = \Drupal::request()->getPathInfo();
$w_ = \Drupal::service("\x73\145\163\163\151\x6f\156");
if (!(\Drupal::currentUser()->isAuthenticated() && $w_->isStarted())) {
goto tY;
}
$E0 = User::load(\Drupal::currentUser()->id());
if (!$E0) {
goto qy;
}
$xO = $w_->get("\x6d\x6f\117\x61\x75\x74\x68\123\x65\164\x41\x74") !== NULL ? $w_->get("\155\157\117\141\x75\164\x68\x53\145\164\x41\164") : '';
$L5 = $w_->get("\155\157\x4f\x61\165\164\150\103\157\156\164\x65\x6e\x74") !== NULL ? $w_->get("\x6d\x6f\x4f\141\x75\164\x68\x43\x6f\156\x74\145\x6e\164") : '';
if (!(!empty($L5) && !empty($xO))) {
goto ez;
}
if (!(isset($L5["\x65\170\160\151\162\x65\163\137\151\x6e"]) && $xO + $L5["\145\170\x70\151\162\145\163\137\151\156"] - \Drupal::time()->getCurrentTime() < 0)) {
goto wb;
}
miniorange_oauth_clientController::moOauthGetAccessToken();
wb:
ez:
qy:
tY:
$WS = strpos($IV, "\77");
$Sn = $WS !== false ? substr($IV, 0, $WS) : $IV;
$LB = $base_url . "\x2f\x75\x73\x65\162\x2f" . $current_user->id() . "\57\145\x64\x69\164";
$Pa = \Drupal::config("\x6d\151\156\x69\157\162\x61\156\147\145\x5f\157\141\165\164\x68\x5f\x63\154\x69\x65\x6e\164\x2e\163\145\164\x74\x69\156\147\163")->get("\155\151\x6e\151\157\162\141\156\147\x65\137\x6f\141\x75\164\x68\137\162\x65\x71\165\151\x72\x65\137\x70\162\x6f\146\x69\x6c\145\137\146\151\145\x6c\x64");
if (!($Pa == 1 && $current_user->isAuthenticated() && !in_array("\x61\x64\x6d\x69\x6e\151\x73\164\x72\141\x74\x6f\162", $current_user->getRoles()))) {
goto AZ;
}
if (!(!Utilities::check_for_redirect_to_user_profile_form($current_user->getEmail()) && $IV != $LB)) {
goto ei;
}
Utilities::redirect_to_profile_form($current_user->id());
ei:
AZ:
$U1 = \Drupal::config("\x6d\x69\x6e\x69\x6f\162\x61\156\x67\x65\137\x6f\141\165\164\x68\x5f\x63\154\151\145\156\164\56\x73\145\164\x74\151\156\147\163")->get("\x61\165\164\157\x5f\x72\145\144\x69\x72\145\x63\164\137\x61\x70\160\137\156\x61\155\x65");
$TV = DBQueries::get_all_applications_with_oauth_login_enabled();
$TW = in_array($U1, $TV) ? (new appValues($U1))->enable_login_with_oauth : 0;
if (!empty(\Drupal::config("\155\151\156\151\x6f\x72\x61\156\147\145\137\157\x61\x75\x74\x68\137\143\x6c\x69\x65\156\x74\56\163\145\164\164\x69\156\147\x73")->get("\x6d\x69\156\x69\157\x72\141\156\x67\145\137\x6f\x61\165\x74\x68\x5f\143\x6c\151\x65\x6e\x74\137\142\x61\x73\x65\137\165\x72\x6c"))) {
goto eB;
}
$sS = $base_url;
goto tc;
eB:
$sS = \Drupal::config("\x6d\x69\x6e\x69\x6f\162\141\156\x67\x65\137\157\x61\165\x74\150\137\143\x6c\x69\x65\x6e\x74\56\163\145\x74\x74\151\x6e\147\x73")->get("\155\x69\156\x69\x6f\162\141\156\147\x65\137\157\x61\165\x74\150\x5f\x63\x6c\151\145\156\164\x5f\142\141\x73\145\137\165\x72\x6c");
tc:
$Sp = \Drupal::config("\155\151\x6e\x69\x6f\x72\x61\156\x67\x65\137\x6f\x61\165\x74\150\x5f\143\154\151\x65\x6e\x74\56\163\x65\x74\164\151\x6e\147\x73")->get("\155\x69\156\x69\x6f\x72\x61\156\x67\145\x5f\x6f\141\x75\164\x68\137\x63\x6c\x69\145\x6e\164\x5f\x65\156\x61\x62\154\145\x5f\142\x61\x63\x6b\x64\157\157\162");
$iv = \Drupal::config("\155\151\156\x69\157\x72\141\x6e\x67\x65\x5f\157\141\165\164\x68\x5f\x63\154\151\x65\156\x74\x2e\163\145\164\x74\x69\156\x67\x73")->get("\155\151\x6e\x69\157\x72\x61\x6e\x67\145\137\x6f\x61\x75\164\x68\137\x63\x6c\151\x65\x6e\x74\137\x66\x6f\x72\x63\145\x5f\141\165\164\x68");
$yZ = \Drupal::config("\x6d\151\x6e\151\157\162\x61\x6e\x67\145\x5f\157\141\165\x74\x68\x5f\143\x6c\151\145\156\164\x2e\163\145\164\164\x69\156\x67\163")->get("\155\151\156\151\x6f\x72\141\156\147\145\137\157\141\165\164\150\137\x63\154\151\x65\x6e\x74\137\154\x69\x63\145\x6e\x73\145\x5f\153\145\171");
$Eb = strpos($Sn, "\155\x6f\x5f\154\157\147\151\x6e") || strpos($Sn, "\x6d\x6f\114\157\x67\x69\156") || strpos($Sn, "\165\163\x65\x72\57\x72\145\163\x65\164") || strpos($Sn, "\165\x73\x65\x72\57\160\x61\163\x73\167\157\x72\x64") || strpos($Sn, "\x66\151\x6c\x65\x73\x2f\x63\x73\163") || strpos($Sn, "\146\x69\x6c\145\x73\x2f\x6a\x73") ? true : false;
$Dp = \Drupal::config("\155\x69\x6e\151\x6f\x72\141\x6e\x67\x65\137\157\141\x75\x74\x68\x5f\143\154\x69\x65\x6e\x74\56\x73\145\x74\x74\151\x6e\x67\163")->get("\x6d\x69\156\151\x6f\162\141\x6e\x67\x65\137\157\141\165\164\150\137\143\x6c\151\145\156\x74\x5f\x65\156\141\x62\154\145\137\160\x61\x67\x65\137\141\143\x63\x65\163\163");
if (!$TW) {
goto MH;
}
if (!(!\Drupal::currentUser()->isAuthenticated() && $Eb == false && !isset($_POST["\160\x61\x73\163"]))) {
goto c8;
}
if ($Sp && isset($_GET["\x6f\141\165\x74\x68\x5f\x63\154\x69\145\156\x74\137\154\x6f\x67\x69\156"]) && $_GET["\x6f\141\x75\x74\x68\x5f\143\x6c\x69\145\156\164\137\x6c\157\x67\x69\156"] == "\x66\141\x6c\x73\145") {
goto wu;
}
if (!$iv) {
goto oQ;
}
$Jk = \Drupal::config("\155\x69\156\x69\x6f\162\141\x6e\x67\145\x5f\x6f\x61\x75\164\x68\137\143\154\x69\145\156\x74\x2e\x73\145\x74\x74\151\156\147\163")->get("\x6d\x69\156\x69\x6f\162\141\156\147\x65\x5f\x6f\141\165\x74\x68\x5f\160\141\x67\145\137\162\145\x73\164\162\151\x63\x74\x69\157\156\x5f\164\x79\x70\x65");
if ($Dp && isset($_GET["\163\x74\x6f\x70\x5f\162\145\x64\151\x72\145\143\164"]) && $_GET["\x73\164\x6f\x70\x5f\162\x65\144\151\x72\x65\x63\x74"] == "\x74\162\x75\x65") {
goto mG;
}
if ($Jk === "\167\150\x69\164\x65\154\151\x73\164\x5f\160\141\147\x65\163") {
goto NM;
}
if (!($Jk === "\x72\x65\163\164\162\x69\x63\x74\137\x70\141\x67\145\x73" && Utilities::is_page_restricted($qD))) {
goto lQ;
}
$mm = miniorange_oauth_clientController::miniorange_oauth_client_mologin($IV);
if (!(strpos($Sn, "\141\x64\155\x69\x6e") !== false)) {
goto XA;
}
$mm->send();
exit;
XA:
$qh->setResponse($mm);
lQ:
goto Vz;
NM:
if (Utilities::is_page_excluded($qD)) {
goto vg;
}
$mm = miniorange_oauth_clientController::miniorange_oauth_client_mologin($IV);
if (!(strpos($Sn, "\141\x64\x6d\151\x6e") !== false)) {
goto wm;
}
$mm->send();
exit;
wm:
$qh->setResponse($mm);
goto r5;
vg:
r5:
Vz:
goto bA;
mG:
bA:
oQ:
goto Kt;
wu:
Kt:
c8:
if (!($yZ == NULL)) {
goto Xt;
}
$NV = \Drupal::configFactory()->getEditable("\155\151\156\x69\157\162\x61\x6e\147\x65\x5f\x6f\x61\165\164\150\x5f\143\154\x69\x65\156\x74\x2e\x73\145\164\x74\x69\156\147\163");
$NV->clear("\155\x69\156\x69\x6f\162\x61\x6e\147\x65\x5f\157\141\x75\x74\x68\137\143\154\151\x65\156\164\x5f\x66\x6f\162\x63\x65\137\x61\165\164\150")->clear("\155\151\156\151\x6f\162\141\x6e\x67\x65\x5f\157\x61\x75\x74\150\137\143\x6c\151\145\156\164\x5f\x61\165\x74\x6f\137\162\x65\144\151\x72\145\x63\164\137\164\157\137\x69\x64\160")->save();
Xt:
MH:
}
Function Calls
None |
Stats
MD5 | dae50b9b68e0efe984f74739f5d15d48 |
Eval Count | 0 |
Decode Time | 70 ms |