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 Drupal\rest_api_authentication\Authentication\Provider; use Drupal..
Decoded Output download
<?php
namespace Drupal\rest_api_authentication\Authentication\Provider;
use Drupal\rest_api_authentication\API_Authentication_Basic_Auth;
use Drupal\rest_api_authentication\API_Authentication_API_Token;
use Drupal\rest_api_authentication\API_Authentication_OAuth;
use Drupal\rest_api_authentication\API_Authentication_JWT;
use Drupal\rest_api_authentication\API_Authentication_Ext_OAuth;
use Drupal\rest_api_authentication\MiniorangeApiAuthConstants;
use Drupal\rest_api_authentication\Utilities;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing;
use Drupal\Component\Utility;
use Drupal\Core\Authentication\AuthenticationProviderInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\user\Entity\User;
use Drupal\Core\Flood\FloodInterface;
use Drupal\user\UserAuthInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class restAPI implements AuthenticationProviderInterface
{
protected $config;
protected $entityTypeManager;
public function __construct(ConfigFactoryInterface $Fp, EntityTypeManagerInterface $k9)
{
$this->config = $Fp->get("rest_api_authentication.settings");
$this->entityTypeManager = $k9;
}
public function applies(Request $BB)
{
$E_ = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_enable_authentication");
if (!($E_ == 1)) {
goto O0;
}
$aK = trim(\Drupal::config("rest_api_authentication.settings")->get("list_of_apis") ?? '');
$R3 = '';
$R3 = \Drupal::moduleHandler()->invokeAll("validate_jwt_in_authorization_header", [$BB]);
$R3 = isset($R3[0]) ? $R3[0] : null;
$ML = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_enable_custom_api_authentication");
if (!((!empty($aK) || $aK != null) && $ML)) {
goto mW;
}
$aK = explode(";", $aK);
foreach ($aK as $gL) {
if (strpos($BB->getRequestUri(), $gL) !== false && trim($gL) != '') {
goto WK;
}
if (strpos($gL, "{}")) {
goto Yc;
}
goto Kw;
WK:
return isset($R3) ? $R3 : true;
goto Kw;
Yc:
$Z3 = explode("/", $gL);
$ft = explode("/", $BB->getRequestUri());
if (!(count($Z3) == count($ft))) {
goto Ce;
}
$Hv = array();
$uY = 0;
Kn:
if (!($uY < count($Z3))) {
goto SG;
}
if ($Z3[$uY] == "{}") {
goto Zm;
}
$Hv[$uY] = 0;
goto MN;
Zm:
$Hv[$uY] = 1;
MN:
dk:
$uY++;
goto Kn;
SG:
$uY = 0;
Ab:
if (!($uY < count($Z3))) {
goto SA;
}
if (!($Z3[$uY] != $ft[$uY])) {
goto Vd;
}
if ($Hv[$uY] == 1) {
goto u0;
}
$Hv[$uY] = 2;
goto bm;
u0:
$Hv[$uY] = 0;
bm:
Vd:
Tb:
$uY++;
goto Ab;
SA:
if (!(array_sum($Hv) == 0)) {
goto Qr;
}
return isset($R3) ? $R3 : true;
Qr:
Ce:
Kw:
ix:
}
sV:
mW:
$hG = \Drupal::config("rest_api_authentication.settings")->get("whitelist_get_apis");
if (!($hG == 1)) {
goto ea;
}
if (!($BB->getMethod() == "GET")) {
goto m0;
}
return false;
m0:
ea:
if (!(strpos($BB->getRequestUri(), "/admin/config/services/jsonapi/") !== false)) {
goto Bm;
}
return false;
Bm:
$W8 = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_enable_json_api_authentication");
if (!(strpos($BB->getRequestUri(), "/jsonapi/") !== false && $W8)) {
goto II;
}
return isset($R3) ? $R3 : true;
II:
$if = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_enable_rest_api_authentication");
if (!(strpos($BB->getRequestUri(), "?_format=") !== false && $if)) {
goto GM;
}
return isset($R3) ? $R3 : true;
GM:
return false;
O0:
}
public function authenticate(Request $BB)
{
global $base_url;
\Drupal::logger("rest_api_authentication")->notice("Request Object Before Authentication <br><pre><code>" . print_r($BB, TRUE) . "</code></pre>");
$fE = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_fraud_check");
$NR = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_token");
$d3 = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_email");
$SQ = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_license_key");
$E_ = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_enable_authentication");
if (!MiniorangeApiAuthConstants::INTRANET) {
goto pC;
}
$Vw = true;
$jN = true;
goto vW;
pC:
$nQ = Utilities::check_fraud();
$Vw = $nQ == Utilities::decrypt_data($fE, $NR);
$jN = $nQ == Utilities::decrypt_data($fE, $NR, "AES-128-ECB");
vW:
$qw = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_multi_site_plugin") == true;
if (($qw || $Vw || $jN) && $d3 != null && $d3 != '') {
goto a0;
}
if ($d3 != null && $d3 != '') {
goto u_;
}
if (!($d3 == null || $d3 == '')) {
goto ZR;
}
$DT["status"] = "error";
$DT["http_code"] = "401";
$DT["message"] = "You are not logged in.";
$DT["error_description"] = "Make sure you have logged in or Register in to module.";
ZR:
goto um;
u_:
$DT["status"] = "error";
$DT["http_code"] = "403";
$DT["message"] = "License key you have entered has already been used.";
$DT["error_description"] = "Please enter a key which has not been used before on any other instance or if you have exausted all your keys then buy more license from Licensing.";
um:
goto Tz;
a0:
if (isset($SQ) && !empty($SQ) && $E_) {
goto kC;
}
if (!(!isset($SQ) && empty($SQ))) {
goto jn;
}
$DT["status"] = "error";
$DT["http_code"] = "401";
$DT["message"] = "You have not activated module yet.";
$DT["error_description"] = "Please enter a License key which has not been used before on any other instance or if you have exausted all your keys then buy more license from Licensing.";
jn:
goto Qk;
kC:
$OR = trim(\Drupal::config("rest_api_authentication.settings")->get("list_of_ips"));
if (!(!empty($OR) || $OR != null)) {
goto Z9;
}
$Ma = \Drupal::config("rest_api_authentication.settings")->get("ip_access_type");
$OR = explode(";", $OR);
if ($Ma) {
goto KB;
}
if (!(array_search($BB->getClientIp(), $OR) === FALSE)) {
goto OX;
}
$B3 = array("status" => "error", "http_code" => "403", "error" => "IP_ADDRESS_BLOCKED", "error_description" => "The request can not be completed as your IP address is not whitelisted. Please contact your site administrator");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["http_code"]);
exit;
OX:
goto nn;
KB:
if (!(array_search($BB->getClientIp(), $OR) !== FALSE)) {
goto ne;
}
$B3 = array("status" => "error", "http_code" => "403", "error" => "INVALID_IP", "error_description" => "This IP address is not allowed to make this request. Please contact your site administrator");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["http_code"]);
exit;
ne:
nn:
Z9:
$DT = array();
if (!($BB->getPathInfo() == "/user/login")) {
goto sW;
}
return null;
sW:
$rU = \Drupal::config("rest_api_authentication.settings")->get("authentication_method");
switch ($rU) {
case 0:
$DT = API_Authentication_Basic_Auth::validate_api_request($BB);
goto Ee;
case 1:
$DT = API_Authentication_API_Token::validate_api_request($BB);
goto Ee;
case 2:
$DT = API_Authentication_OAuth::validate_api_request($BB);
goto Ee;
case 3:
$DT = API_Authentication_JWT::validate_api_request($BB);
goto Ee;
case 4:
$DT = API_Authentication_Ext_OAuth::validate_api_request($BB);
goto Ee;
default:
return null;
}
R5:
Ee:
Qk:
Tz:
if (!(isset($DT["status"]) && $DT["status"] == "error")) {
goto ht;
}
if (isset($DT["message"]) && trim($DT["message"]) != '' || isset($DT["error_description"]) && trim($DT["error_description"]) != '') {
goto DM;
}
throw new AccessDeniedHttpException();
return null;
goto G5;
DM:
\Drupal::logger("rest_api_authentication")->notice("Request Object After Authentication <br><pre><code>" . print_r($BB, TRUE) . "</code></pre>");
echo json_encode($DT, JSON_PRETTY_PRINT);
http_response_code($DT["http_code"]);
exit;
G5:
ht:
$bz = $DT["user"];
$UE = $bz->id();
$hH = '';
$hH = trim(\Drupal::config("rest_api_authentication.settings")->get("list_of_role_restrictions"));
if (!(!empty($hH) || $hH != null)) {
goto cO;
}
$tP = explode(";", $hH);
foreach ($tP as $zL) {
$XW = explode(":", $zL);
$gL = $XW[0];
$T6 = $XW[1];
if (!(strpos($BB->getRequestUri(), $gL) !== false)) {
goto uE;
}
$Mr = explode(",", $T6);
$lp = array_intersect($Mr, $bz->getRoles());
if (count($lp) > 0) {
goto A1;
}
$B3 = array("status" => "error", "http_code" => "403", "error" => "ACCESS_DENIED", "error_description" => "User does not have the required permissions.");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["http_code"]);
exit;
goto sD;
A1:
goto ke;
sD:
uE:
sB:
}
ke:
cO:
$pm = $this->entityTypeManager->getStorage("user");
return $this->entityTypeManager->getStorage("user")->load($UE);
}
public function handleException(ExceptionEvent $od)
{
$ga = $od->getThrowable();
if (!$ga instanceof AccessDeniedHttpException) {
goto ZM;
}
$od->setThrowable(new UnauthorizedHttpException("Invalid consumer origin.", $ga));
return TRUE;
ZM:
return FALSE;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Drupal\rest_api_authentication\Authentication\Provider;
use Drupal\rest_api_authentication\API_Authentication_Basic_Auth;
use Drupal\rest_api_authentication\API_Authentication_API_Token;
use Drupal\rest_api_authentication\API_Authentication_OAuth;
use Drupal\rest_api_authentication\API_Authentication_JWT;
use Drupal\rest_api_authentication\API_Authentication_Ext_OAuth;
use Drupal\rest_api_authentication\MiniorangeApiAuthConstants;
use Drupal\rest_api_authentication\Utilities;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing;
use Drupal\Component\Utility;
use Drupal\Core\Authentication\AuthenticationProviderInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\user\Entity\User;
use Drupal\Core\Flood\FloodInterface;
use Drupal\user\UserAuthInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class restAPI implements AuthenticationProviderInterface
{
protected $config;
protected $entityTypeManager;
public function __construct(ConfigFactoryInterface $Fp, EntityTypeManagerInterface $k9)
{
$this->config = $Fp->get("\x72\x65\163\x74\x5f\x61\160\x69\x5f\x61\x75\164\x68\x65\x6e\164\151\143\x61\164\151\x6f\x6e\x2e\x73\145\x74\x74\x69\x6e\147\x73");
$this->entityTypeManager = $k9;
}
public function applies(Request $BB)
{
$E_ = \Drupal::config("\162\145\x73\164\137\141\160\x69\x5f\x61\165\x74\x68\x65\156\164\151\143\x61\164\151\157\156\56\163\145\x74\x74\x69\156\147\x73")->get("\162\x65\x73\164\137\x61\160\x69\x5f\141\165\164\x68\x65\156\164\151\143\141\x74\151\157\x6e\x5f\x65\x6e\x61\142\154\x65\137\x61\165\164\150\x65\x6e\164\x69\143\x61\x74\x69\x6f\156");
if (!($E_ == 1)) {
goto O0;
}
$aK = trim(\Drupal::config("\x72\x65\x73\164\x5f\141\160\x69\x5f\141\165\164\150\145\156\x74\x69\143\141\x74\151\x6f\x6e\56\x73\x65\164\164\151\x6e\147\x73")->get("\154\151\163\x74\x5f\x6f\146\137\x61\160\151\163") ?? '');
$R3 = '';
$R3 = \Drupal::moduleHandler()->invokeAll("\166\141\x6c\x69\144\141\164\145\137\x6a\x77\x74\137\x69\x6e\137\141\x75\164\x68\157\162\x69\x7a\x61\x74\x69\157\x6e\x5f\150\x65\141\x64\x65\162", [$BB]);
$R3 = isset($R3[0]) ? $R3[0] : null;
$ML = \Drupal::config("\x72\145\x73\x74\137\x61\160\151\x5f\x61\x75\164\x68\145\156\x74\151\x63\x61\164\151\x6f\x6e\56\x73\x65\164\x74\151\x6e\x67\163")->get("\162\x65\x73\164\137\x61\x70\x69\x5f\x61\165\x74\150\145\x6e\x74\151\143\x61\164\151\157\156\x5f\x65\156\141\x62\154\145\x5f\x63\165\x73\x74\157\x6d\137\141\160\x69\137\141\165\x74\150\x65\156\x74\x69\x63\x61\x74\x69\157\156");
if (!((!empty($aK) || $aK != null) && $ML)) {
goto mW;
}
$aK = explode("\73", $aK);
foreach ($aK as $gL) {
if (strpos($BB->getRequestUri(), $gL) !== false && trim($gL) != '') {
goto WK;
}
if (strpos($gL, "\x7b\175")) {
goto Yc;
}
goto Kw;
WK:
return isset($R3) ? $R3 : true;
goto Kw;
Yc:
$Z3 = explode("\x2f", $gL);
$ft = explode("\57", $BB->getRequestUri());
if (!(count($Z3) == count($ft))) {
goto Ce;
}
$Hv = array();
$uY = 0;
Kn:
if (!($uY < count($Z3))) {
goto SG;
}
if ($Z3[$uY] == "\173\x7d") {
goto Zm;
}
$Hv[$uY] = 0;
goto MN;
Zm:
$Hv[$uY] = 1;
MN:
dk:
$uY++;
goto Kn;
SG:
$uY = 0;
Ab:
if (!($uY < count($Z3))) {
goto SA;
}
if (!($Z3[$uY] != $ft[$uY])) {
goto Vd;
}
if ($Hv[$uY] == 1) {
goto u0;
}
$Hv[$uY] = 2;
goto bm;
u0:
$Hv[$uY] = 0;
bm:
Vd:
Tb:
$uY++;
goto Ab;
SA:
if (!(array_sum($Hv) == 0)) {
goto Qr;
}
return isset($R3) ? $R3 : true;
Qr:
Ce:
Kw:
ix:
}
sV:
mW:
$hG = \Drupal::config("\x72\x65\163\x74\137\x61\x70\x69\x5f\141\165\x74\150\145\x6e\164\151\143\141\164\x69\157\156\56\x73\x65\164\x74\151\156\x67\163")->get("\167\150\x69\164\x65\154\151\163\164\x5f\x67\x65\164\x5f\141\160\x69\163");
if (!($hG == 1)) {
goto ea;
}
if (!($BB->getMethod() == "\x47\x45\124")) {
goto m0;
}
return false;
m0:
ea:
if (!(strpos($BB->getRequestUri(), "\57\x61\x64\x6d\x69\156\57\x63\157\x6e\x66\x69\147\57\163\145\162\166\151\x63\x65\163\57\x6a\x73\x6f\156\141\160\151\57") !== false)) {
goto Bm;
}
return false;
Bm:
$W8 = \Drupal::config("\x72\145\x73\164\x5f\141\160\151\x5f\x61\165\164\150\x65\x6e\164\151\x63\x61\x74\151\157\156\x2e\163\x65\x74\164\x69\x6e\x67\x73")->get("\x72\145\x73\x74\x5f\x61\x70\151\x5f\141\x75\164\150\x65\156\x74\151\143\x61\x74\x69\x6f\156\x5f\x65\x6e\x61\142\x6c\145\x5f\152\x73\x6f\x6e\x5f\141\x70\151\137\x61\165\x74\x68\x65\156\164\151\x63\x61\164\x69\x6f\156");
if (!(strpos($BB->getRequestUri(), "\x2f\x6a\163\157\x6e\141\160\x69\x2f") !== false && $W8)) {
goto II;
}
return isset($R3) ? $R3 : true;
II:
$if = \Drupal::config("\162\145\163\x74\x5f\x61\160\151\x5f\x61\165\164\150\x65\156\x74\151\x63\141\164\151\157\156\x2e\163\x65\x74\164\151\x6e\147\163")->get("\x72\145\163\164\x5f\141\160\x69\137\x61\165\164\150\x65\x6e\164\x69\143\141\x74\x69\157\x6e\x5f\145\156\141\142\154\145\137\x72\145\x73\164\x5f\141\x70\151\x5f\141\x75\164\x68\x65\x6e\164\x69\143\141\x74\151\x6f\x6e");
if (!(strpos($BB->getRequestUri(), "\x3f\137\146\157\162\155\141\164\75") !== false && $if)) {
goto GM;
}
return isset($R3) ? $R3 : true;
GM:
return false;
O0:
}
public function authenticate(Request $BB)
{
global $base_url;
\Drupal::logger("\162\x65\163\x74\x5f\x61\x70\151\x5f\x61\165\164\150\145\x6e\164\x69\x63\x61\164\x69\157\x6e")->notice("\x52\x65\x71\x75\145\x73\x74\40\117\142\x6a\x65\x63\x74\40\102\145\x66\x6f\x72\145\x20\101\x75\164\x68\x65\156\164\x69\143\141\x74\151\157\156\x20\x3c\142\162\76\74\x70\x72\145\x3e\x3c\x63\x6f\x64\145\76" . print_r($BB, TRUE) . "\x3c\57\143\157\x64\145\x3e\x3c\x2f\x70\162\x65\76");
$fE = \Drupal::config("\x72\x65\x73\164\137\141\x70\151\137\x61\165\164\x68\145\x6e\x74\151\143\141\164\x69\x6f\x6e\56\163\x65\164\164\x69\x6e\147\x73")->get("\162\145\163\x74\137\141\x70\x69\x5f\x61\165\x74\150\145\x6e\x74\151\143\141\164\151\157\x6e\137\x63\165\x73\164\157\x6d\x65\x72\x5f\141\144\x6d\x69\156\x5f\146\x72\141\x75\144\137\143\150\145\143\153");
$NR = \Drupal::config("\x72\145\x73\164\137\x61\x70\151\137\x61\165\164\150\x65\156\x74\151\143\141\164\151\157\156\56\x73\x65\164\x74\151\x6e\147\x73")->get("\x72\145\x73\164\x5f\141\160\x69\x5f\141\x75\164\150\x65\x6e\164\151\143\141\164\151\x6f\156\137\143\x75\163\164\x6f\155\145\162\137\141\x64\155\x69\156\137\164\x6f\x6b\x65\156");
$d3 = \Drupal::config("\x72\145\163\x74\x5f\141\160\151\x5f\141\x75\x74\x68\x65\156\164\151\x63\141\x74\151\157\156\x2e\163\145\x74\164\151\x6e\147\x73")->get("\162\x65\x73\164\137\141\x70\151\137\141\165\x74\150\x65\156\x74\x69\x63\x61\164\151\157\x6e\137\x63\x75\x73\164\x6f\155\145\162\137\x61\144\x6d\151\x6e\x5f\145\155\141\151\x6c");
$SQ = \Drupal::config("\x72\145\x73\x74\137\141\160\151\x5f\x61\x75\x74\x68\145\x6e\164\x69\143\141\164\151\157\156\x2e\163\x65\164\164\x69\156\x67\x73")->get("\x72\145\x73\164\x5f\x61\x70\151\x5f\x61\x75\x74\x68\145\156\164\151\143\141\x74\x69\157\156\137\154\x69\143\145\156\x73\145\x5f\x6b\145\x79");
$E_ = \Drupal::config("\162\x65\x73\x74\x5f\141\x70\151\x5f\141\x75\164\150\145\x6e\x74\151\143\141\164\151\x6f\156\56\x73\x65\164\164\x69\156\147\163")->get("\x72\x65\163\x74\137\x61\160\151\x5f\x61\165\x74\150\x65\156\164\x69\143\x61\x74\x69\157\x6e\x5f\x65\156\x61\x62\x6c\x65\137\141\x75\164\150\x65\x6e\164\x69\143\x61\x74\151\157\156");
if (!MiniorangeApiAuthConstants::INTRANET) {
goto pC;
}
$Vw = true;
$jN = true;
goto vW;
pC:
$nQ = Utilities::check_fraud();
$Vw = $nQ == Utilities::decrypt_data($fE, $NR);
$jN = $nQ == Utilities::decrypt_data($fE, $NR, "\101\x45\123\55\61\x32\x38\x2d\105\x43\102");
vW:
$qw = \Drupal::config("\x72\x65\163\x74\137\x61\160\x69\137\141\165\164\150\145\156\x74\x69\x63\x61\x74\x69\x6f\156\x2e\163\145\164\x74\151\156\x67\163")->get("\162\145\163\164\x5f\x61\x70\151\137\141\x75\164\x68\145\x6e\x74\x69\143\141\x74\x69\157\156\137\x6d\165\x6c\x74\151\x5f\x73\x69\x74\145\x5f\160\154\165\147\x69\156") == true;
if (($qw || $Vw || $jN) && $d3 != null && $d3 != '') {
goto a0;
}
if ($d3 != null && $d3 != '') {
goto u_;
}
if (!($d3 == null || $d3 == '')) {
goto ZR;
}
$DT["\x73\164\x61\x74\x75\163"] = "\x65\162\162\157\x72";
$DT["\150\164\164\160\x5f\x63\x6f\144\x65"] = "\x34\60\x31";
$DT["\x6d\x65\163\x73\x61\147\x65"] = "\131\157\x75\40\141\x72\145\x20\x6e\x6f\x74\x20\154\157\147\147\145\144\40\151\156\56";
$DT["\x65\x72\x72\x6f\162\x5f\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e"] = "\x4d\x61\153\145\40\x73\x75\x72\x65\x20\x79\157\165\40\x68\x61\166\145\x20\x6c\157\147\147\x65\x64\40\x69\156\40\x6f\x72\x20\x52\x65\x67\x69\163\164\145\162\x20\x69\x6e\x20\x74\x6f\40\x6d\x6f\x64\x75\x6c\145\x2e";
ZR:
goto um;
u_:
$DT["\163\164\x61\164\x75\163"] = "\145\x72\x72\x6f\x72";
$DT["\150\164\x74\160\137\143\x6f\x64\145"] = "\64\60\x33";
$DT["\155\x65\163\163\141\x67\x65"] = "\x4c\x69\x63\x65\x6e\x73\145\40\x6b\145\x79\40\171\x6f\165\40\150\x61\x76\x65\40\x65\156\164\145\x72\x65\x64\40\x68\141\x73\40\x61\154\162\145\x61\x64\171\x20\142\x65\145\156\x20\x75\x73\145\x64\x2e";
$DT["\x65\162\x72\157\x72\x5f\144\x65\163\143\x72\151\160\164\x69\x6f\156"] = "\120\x6c\145\141\x73\x65\x20\145\156\164\x65\x72\40\x61\40\x6b\x65\171\x20\167\x68\151\x63\150\40\x68\141\x73\x20\x6e\x6f\x74\40\142\145\145\156\40\165\163\145\144\40\x62\145\146\157\162\x65\40\x6f\156\40\141\x6e\171\40\157\x74\150\145\x72\40\x69\156\x73\x74\x61\x6e\143\x65\40\157\162\40\x69\x66\x20\x79\x6f\165\40\150\x61\x76\x65\40\x65\x78\x61\x75\163\x74\x65\144\x20\141\x6c\x6c\x20\x79\157\165\x72\x20\x6b\145\x79\x73\x20\164\150\x65\156\x20\142\x75\x79\x20\x6d\157\162\x65\x20\x6c\151\x63\x65\x6e\x73\145\x20\x66\162\x6f\x6d\40\114\x69\143\145\x6e\163\x69\x6e\147\56";
um:
goto Tz;
a0:
if (isset($SQ) && !empty($SQ) && $E_) {
goto kC;
}
if (!(!isset($SQ) && empty($SQ))) {
goto jn;
}
$DT["\x73\164\141\164\165\163"] = "\145\x72\x72\x6f\162";
$DT["\x68\164\x74\x70\137\x63\x6f\144\x65"] = "\64\x30\61";
$DT["\x6d\x65\x73\163\x61\x67\x65"] = "\x59\x6f\165\x20\x68\141\166\x65\x20\156\x6f\164\40\x61\x63\x74\151\166\x61\x74\145\144\40\x6d\x6f\144\x75\x6c\x65\40\171\145\x74\56";
$DT["\145\162\162\x6f\x72\x5f\144\145\163\143\x72\151\x70\x74\x69\x6f\x6e"] = "\120\x6c\145\141\163\x65\40\x65\x6e\164\145\x72\x20\x61\40\114\x69\x63\145\x6e\163\x65\40\153\145\171\40\x77\150\x69\x63\150\x20\x68\x61\163\x20\x6e\157\x74\x20\x62\x65\145\156\40\x75\x73\x65\144\40\142\145\x66\157\162\145\x20\x6f\x6e\x20\x61\x6e\171\40\x6f\x74\x68\x65\162\x20\151\156\163\x74\141\156\143\145\x20\157\162\40\x69\x66\x20\x79\157\x75\x20\x68\141\166\x65\40\x65\170\x61\x75\163\164\x65\x64\x20\x61\x6c\154\x20\171\157\x75\x72\40\153\145\171\163\x20\x74\x68\x65\x6e\40\142\165\x79\40\155\x6f\x72\x65\40\154\x69\143\x65\156\x73\x65\40\146\162\x6f\155\40\x4c\151\143\145\156\x73\x69\156\x67\x2e";
jn:
goto Qk;
kC:
$OR = trim(\Drupal::config("\162\145\163\x74\137\141\160\x69\137\141\165\164\x68\x65\156\164\x69\143\x61\164\x69\x6f\156\x2e\163\x65\x74\x74\x69\156\147\x73")->get("\154\x69\163\164\x5f\157\x66\137\151\160\x73"));
if (!(!empty($OR) || $OR != null)) {
goto Z9;
}
$Ma = \Drupal::config("\162\145\x73\164\137\141\x70\x69\137\x61\x75\164\x68\x65\156\x74\x69\143\x61\164\151\157\156\56\163\145\x74\164\151\x6e\x67\x73")->get("\151\x70\x5f\141\x63\x63\x65\163\163\x5f\164\171\x70\x65");
$OR = explode("\x3b", $OR);
if ($Ma) {
goto KB;
}
if (!(array_search($BB->getClientIp(), $OR) === FALSE)) {
goto OX;
}
$B3 = array("\x73\164\x61\x74\x75\x73" => "\x65\162\162\157\x72", "\150\x74\x74\160\137\143\157\144\145" => "\x34\x30\63", "\145\162\162\x6f\x72" => "\111\x50\x5f\x41\104\104\x52\x45\x53\x53\x5f\102\114\x4f\x43\x4b\x45\x44", "\145\162\x72\x6f\x72\x5f\144\x65\x73\x63\162\151\160\x74\151\x6f\x6e" => "\x54\150\145\x20\162\145\x71\165\145\163\x74\40\x63\141\156\40\x6e\157\164\40\142\x65\40\143\157\155\x70\154\x65\164\145\x64\40\x61\163\x20\171\157\165\x72\x20\111\120\x20\141\x64\144\x72\x65\163\x73\x20\151\163\40\x6e\x6f\x74\40\167\x68\x69\164\145\x6c\x69\163\x74\145\144\x2e\x20\x50\154\145\x61\163\x65\40\143\x6f\156\164\x61\143\x74\40\x79\x6f\x75\x72\40\x73\x69\x74\x65\x20\141\x64\x6d\x69\x6e\x69\163\164\162\141\x74\x6f\x72");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["\150\x74\x74\160\x5f\143\157\144\x65"]);
exit;
OX:
goto nn;
KB:
if (!(array_search($BB->getClientIp(), $OR) !== FALSE)) {
goto ne;
}
$B3 = array("\163\x74\141\164\x75\x73" => "\145\162\x72\157\x72", "\150\x74\x74\x70\x5f\143\157\x64\x65" => "\64\60\63", "\x65\x72\x72\x6f\x72" => "\x49\x4e\126\x41\x4c\111\104\x5f\111\120", "\145\x72\x72\157\162\x5f\x64\x65\163\143\162\151\160\x74\151\157\156" => "\124\x68\151\x73\x20\x49\120\40\141\x64\x64\x72\145\163\163\x20\x69\x73\x20\156\x6f\x74\x20\141\x6c\154\x6f\x77\145\x64\x20\x74\x6f\40\155\141\x6b\x65\40\164\x68\151\x73\40\162\145\161\x75\x65\x73\164\x2e\x20\x50\154\x65\141\x73\x65\40\143\x6f\x6e\164\x61\x63\164\x20\171\157\x75\x72\40\x73\x69\x74\145\x20\141\144\x6d\151\156\151\x73\x74\162\x61\x74\157\x72");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["\150\164\164\x70\x5f\143\157\144\x65"]);
exit;
ne:
nn:
Z9:
$DT = array();
if (!($BB->getPathInfo() == "\57\165\x73\145\x72\57\x6c\x6f\x67\x69\156")) {
goto sW;
}
return null;
sW:
$rU = \Drupal::config("\x72\x65\163\164\x5f\x61\x70\151\x5f\x61\165\x74\x68\145\x6e\164\x69\143\141\x74\151\157\x6e\x2e\x73\x65\x74\x74\151\x6e\147\x73")->get("\x61\x75\x74\x68\145\156\164\x69\x63\x61\x74\x69\x6f\x6e\x5f\155\145\x74\x68\157\144");
switch ($rU) {
case 0:
$DT = API_Authentication_Basic_Auth::validate_api_request($BB);
goto Ee;
case 1:
$DT = API_Authentication_API_Token::validate_api_request($BB);
goto Ee;
case 2:
$DT = API_Authentication_OAuth::validate_api_request($BB);
goto Ee;
case 3:
$DT = API_Authentication_JWT::validate_api_request($BB);
goto Ee;
case 4:
$DT = API_Authentication_Ext_OAuth::validate_api_request($BB);
goto Ee;
default:
return null;
}
R5:
Ee:
Qk:
Tz:
if (!(isset($DT["\163\164\141\x74\x75\163"]) && $DT["\x73\x74\141\164\165\163"] == "\145\x72\x72\x6f\162")) {
goto ht;
}
if (isset($DT["\x6d\x65\163\x73\141\147\x65"]) && trim($DT["\155\x65\163\x73\x61\x67\x65"]) != '' || isset($DT["\145\162\162\157\162\137\x64\x65\x73\x63\162\x69\160\164\151\157\156"]) && trim($DT["\x65\x72\162\x6f\x72\137\x64\x65\x73\143\162\151\x70\164\x69\x6f\x6e"]) != '') {
goto DM;
}
throw new AccessDeniedHttpException();
return null;
goto G5;
DM:
\Drupal::logger("\x72\x65\163\x74\x5f\x61\x70\151\137\141\x75\x74\x68\x65\x6e\x74\151\143\x61\x74\x69\x6f\156")->notice("\x52\145\161\x75\145\163\164\x20\117\142\152\x65\x63\164\x20\x41\x66\164\145\162\x20\x41\x75\x74\x68\145\x6e\164\151\x63\x61\x74\151\157\156\x20\x3c\x62\x72\x3e\x3c\160\162\x65\x3e\74\x63\157\x64\145\76" . print_r($BB, TRUE) . "\x3c\x2f\x63\157\x64\x65\76\74\57\x70\x72\145\x3e");
echo json_encode($DT, JSON_PRETTY_PRINT);
http_response_code($DT["\150\164\164\x70\137\143\x6f\x64\x65"]);
exit;
G5:
ht:
$bz = $DT["\x75\x73\x65\162"];
$UE = $bz->id();
$hH = '';
$hH = trim(\Drupal::config("\x72\x65\163\x74\137\x61\160\x69\x5f\141\x75\164\x68\x65\x6e\x74\151\143\141\164\x69\157\156\x2e\163\x65\164\164\151\x6e\x67\163")->get("\154\151\x73\x74\137\157\146\x5f\162\157\154\145\x5f\x72\145\x73\x74\x72\151\143\x74\151\157\156\163"));
if (!(!empty($hH) || $hH != null)) {
goto cO;
}
$tP = explode("\73", $hH);
foreach ($tP as $zL) {
$XW = explode("\x3a", $zL);
$gL = $XW[0];
$T6 = $XW[1];
if (!(strpos($BB->getRequestUri(), $gL) !== false)) {
goto uE;
}
$Mr = explode("\54", $T6);
$lp = array_intersect($Mr, $bz->getRoles());
if (count($lp) > 0) {
goto A1;
}
$B3 = array("\163\x74\141\164\x75\x73" => "\x65\162\162\x6f\162", "\150\164\x74\x70\x5f\143\x6f\144\145" => "\64\60\x33", "\145\162\162\x6f\162" => "\x41\103\103\x45\x53\123\137\x44\x45\x4e\111\x45\104", "\x65\162\x72\157\162\137\x64\145\163\143\162\151\x70\x74\x69\x6f\156" => "\125\x73\x65\162\x20\144\x6f\x65\163\40\156\x6f\164\x20\x68\x61\166\145\x20\164\150\x65\40\162\x65\161\165\x69\x72\145\144\x20\x70\x65\x72\x6d\x69\x73\163\151\157\156\x73\x2e");
echo json_encode($B3, JSON_PRETTY_PRINT);
http_response_code($B3["\150\x74\x74\x70\137\143\157\144\145"]);
exit;
goto sD;
A1:
goto ke;
sD:
uE:
sB:
}
ke:
cO:
$pm = $this->entityTypeManager->getStorage("\x75\x73\x65\x72");
return $this->entityTypeManager->getStorage("\x75\163\x65\x72")->load($UE);
}
public function handleException(ExceptionEvent $od)
{
$ga = $od->getThrowable();
if (!$ga instanceof AccessDeniedHttpException) {
goto ZM;
}
$od->setThrowable(new UnauthorizedHttpException("\111\x6e\166\141\x6c\151\x64\40\x63\x6f\x6e\x73\x75\x6d\x65\x72\40\157\x72\151\x67\151\x6e\56", $ga));
return TRUE;
ZM:
return FALSE;
}
}
Function Calls
None |
Stats
MD5 | 2b2353b3aece2b3dd8b34a7d460dbed9 |
Eval Count | 0 |
Decode Time | 90 ms |