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 saml_response() { global $base_url; global $gW;..

Decoded Output download

<?      public function saml_response() 
    { 
        global $base_url; 
        global $gW; 
        if (isset($_GET["SAMLResponse"])) { 
            goto xK; 
        } 
        $f5 = \Drupal::config("miniorange_saml.settings"); 
        $ik = $f5->get("miniorange_saml_custom_attrs_map_arr") !== NULL ? json_decode($f5->get("miniorange_saml_custom_attrs_map_arr"), true) : []; 
        $WJ = new MiniOrangeAcs(); 
        $DH = $f5->get("minorange_saml_customer_admin_fraud_check"); 
        $cZ = $f5->get("miniorange_saml_customer_admin_token"); 
        $QB = $f5->get("miniorange_saml_customer_admin_email"); 
        $pN = \Drupal::request()->server->get("DOCUMENT_ROOT") . $gW; 
        $XE = trim($base_url, "/"); 
        if (preg_match("#^http(s)?://#", $XE)) { 
            goto se; 
        } 
        $XE = "http://" . $XE; 
        se: 
        $JY = parse_url($XE); 
        $Qi = isset($JY["path"]) ? $JY["path"] : ''; 
        $y6 = preg_replace("/^www\./", '', $JY["host"] . $Qi); 
        $u2 = $pN . $y6; 
        $Bb = $f5->get("miniorange_saml_isMultiSitePluginRequested") == true; 
        if (($Bb || $u2 == AESEncryption::decrypt_data($DH, $cZ) || $u2 == AESEncryption::decrypt_data($DH, $cZ, "AES-128-ECB")) && $QB != null && $QB != '') { 
            goto i6; 
        } 
        if ($QB != null && $QB != '') { 
            goto Lh; 
        } 
        if (!($QB == null || $QB == '')) { 
            goto Ek; 
        } 
        $AM = "You are not logged in."; 
        $nl = "Please login first to activate single sign on."; 
        $YK = "Make sure you have logged in/ Register in to module."; 
        Utilities::showErrorMessage($AM, $nl, $YK); 
        Ek: 
        goto fQ; 
        Lh: 
        if (isset($_POST["RelayState"]) && $_POST["RelayState"] == "testValidate") { 
            goto jj; 
        } 
        $AM = "We could not sign you in."; 
        $nl = "Please Contact your administrator."; 
        Utilities::showErrorMessage($AM, $nl, "-"); 
        goto fe; 
        jj: 
        $AM = "License key you have entered has already been used."; 
        $nl = "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."; 
        Utilities::showErrorMessage($AM, $nl, "-"); 
        fe: 
        fQ: 
        goto Y3; 
        i6: 
        \Drupal::moduleHandler()->invokeAll("forward_response", [$_POST]); 
        $Bj = $WJ->processSamlResponse($_POST, $ik); 
        $Yq = $Bj["response"]; 
        $Wm = $Bj["resources"]; 
        Y3: 
        if (!(MiniorangeSAMLConstants::PLUGIN_VERSION == MiniorangeSAMLConstants::ENTERPRISE_VERSION && \Drupal\miniorange_saml\HigherUtilities::Is_Restricted_Domain($Yq["email"]) === TRUE)) { 
            goto Sg; 
        } 
        $AM = "You are not allowed to login "; 
        $nl = "Please Contact your administrator."; 
        $YK = "Your domain may be blocked by admin"; 
        Utilities::showErrorMessage($AM, $nl, $YK); 
        Sg: 
        if ($f5->get("miniorange_saml_load_user") == 1) { 
            goto H_; 
        } 
        $e5 = user_load_by_name($Yq["username"]); 
        goto wd; 
        H_: 
        $e5 = user_load_by_mail($Yq["email"]); 
        wd: 
        $mB = 0; 
        if (!($e5 == NULL)) { 
            goto Dp; 
        } 
        $FQ = $f5->get("miniorange_saml_disable_autocreate_users"); 
        if ($FQ) { 
            goto hE; 
        } 
        $T3 = \Drupal::service("password_generator")->generate(8); 
        $Md = $f5->get("miniorange_saml_default_role"); 
        $Gn = ["name" => $Yq["username"], "mail" => $Yq["email"], "pass" => $T3, "status" => 1]; 
        $e5 = User::create($Gn); 
        $e5->save(); 
        if (!($Md != "authenticated" && $f5->get("miniorange_saml_enable_rolemapping"))) { 
            goto hr; 
        } 
        $e5->addRole($Md); 
        $e5->save(); 
        hr: 
        goto s8; 
        hE: 
        $AM = "Account does not exist with your username."; 
        $nl = "Please Contact your administrator."; 
        $YK = "Auto creation of user is not allowed if user does not exist."; 
        Utilities::showErrorMessage($AM, $nl, $YK); 
        s8: 
        Dp: 
        $t7 = array(); 
        $t7 = $Yq["customFieldAttributes"]; 
        $e5 = User::load($e5->id()); 
        $kq = $f5->get("miniorange_saml_custom_attrs_map_sep") !== NULL ? json_decode($f5->get("miniorange_saml_custom_attrs_map_sep")) : ''; 
        foreach ($t7 as $yQ => $Ox) { 
            $Id = $e5->get($yQ); 
            $X0 = $Id->getFieldDefinition(); 
            $cB = $X0->getFieldStorageDefinition(); 
            if ($cB->getType() === "entity_reference") { 
                goto Rz; 
            } 
            if (Utilities::isMultiple($yQ) && !is_null($kq->{$yQ})) { 
                goto Nj; 
            } 
            if (!self::isBooleanField($yQ)) { 
                goto DY; 
            } 
            $Ox = filter_var($Ox, FILTER_VALIDATE_BOOLEAN); 
            DY: 
            $hG = array($Ox); 
            goto XQ; 
            Nj: 
            $hG = explode($kq->{$yQ}, $Ox); 
            XQ: 
            $e5->get($yQ)->setValue($hG); 
            $e5->save(); 
            goto CS; 
            Rz: 
            $aM = $cB->getSetting("target_type"); 
            $no = $X0->getSetting("handler_settings"); 
            $rJ = \Drupal::entityTypeManager()->getStorage($aM)->loadMultiple(NULL); 
            if (!isset($no["target_bundles"])) { 
                goto VV; 
            } 
            if (Utilities::isMultiple($yQ) && !is_null($kq->{$yQ})) { 
                goto CM; 
            } 
            $hG = array($Ox); 
            goto aZ; 
            CM: 
            $hG = explode($kq->{$yQ}, $Ox); 
            aZ: 
            $E1 = []; 
            $sY = []; 
            foreach ($hG as $Ox) { 
                $rJ = \Drupal::entityTypeManager()->getStorage($aM)->loadByProperties(["name" => $Ox]); 
                $HH = false; 
                foreach ($rJ as $uz) { 
                    if (!in_array($uz->bundle(), $no["target_bundles"])) { 
                        goto z1; 
                    } 
                    $E1[] = $uz->id(); 
                    $HH = true; 
                    z1: 
                    Io: 
                } 
                jo: 
                if ($HH) { 
                    goto KV; 
                } 
                $sY[] = $Ox; 
                KV: 
                lx: 
            } 
            mR: 
            $FX = isset($no["auto_create"]) ? $no["auto_create"] : false; 
            $XT = isset($no["auto_create_bundle"]) ? $no["auto_create_bundle"] : ''; 
            if (!($FX && $aM == "taxonomy_term")) { 
                goto kh; 
            } 
            foreach ($sY as $bh) { 
                $LH = Term::create(["name" => $bh, "vid" => $XT]); 
                $LH->save(); 
                $E1[] = $LH->id(); 
                Ny: 
            } 
            pf: 
            kh: 
            $Id->setValue($E1); 
            $e5->save(); 
            VV: 
            CS: 
            UX: 
        } 
        Mp: 
        if (!(!is_null($e5) && $f5->get("miniorange_saml_enable_rolemapping"))) { 
            goto dw; 
        } 
        $zE = $f5->get("miniorange_saml_role_mapping_arr") != null ? (array) json_decode($f5->get("miniorange_saml_role_mapping_arr")) : []; 
        $PH = array(); 
        $PH = $Yq["customFieldRoles"]; 
        $AL = \Drupal::configFactory()->getEditable("miniorange_saml.settings")->get("miniorange_saml_disable_role_update"); 
        $g5 = $e5->getRoles(); 
        if ($AL) { 
            goto Mg; 
        } 
        foreach ($g5 as $yQ => $Ox) { 
            if (in_array($Ox, array_keys($zE))) { 
                goto re; 
            } 
            if (!($Ox != $f5->get("miniorange_saml_default_role"))) { 
                goto X1; 
            } 
            $e5->removeRole($Ox); 
            $e5->save(); 
            X1: 
            re: 
            ZV: 
        } 
        c8: 
        Mg: 
        foreach ($zE as $yQ => $Ox) { 
            $cn = FALSE; 
            $Rf = array(); 
            $tw = explode(";", $Ox); 
            foreach ($tw as $pC => $XG) { 
                set_error_handler(function ($hZ, $f4, $fj, $Kj) { 
                }); 
                $lQ = preg_match($XG, ''); 
                restore_error_handler(); 
                $Ss = !is_bool($lQ); 
                if (!is_array($PH)) { 
                    goto hX; 
                } 
                if ($Ss) { 
                    goto QB; 
                } 
                if (in_array($XG, $PH)) { 
                    goto v6; 
                } 
                goto Lm; 
                QB: 
                $Rf = preg_grep($XG, $PH); 
                if (empty($Rf)) { 
                    goto O7; 
                } 
                $cn = TRUE; 
                O7: 
                goto Lm; 
                v6: 
                $cn = TRUE; 
                Lm: 
                hX: 
                hV: 
            } 
            W8: 
            if ($cn && $yQ != "authenticated") { 
                goto yp; 
            } 
            $e5->removeRole($yQ); 
            $e5->save(); 
            goto R5; 
            yp: 
            $e5->addRole($yQ); 
            $e5->save(); 
            R5: 
            ql: 
        } 
        ty: 
        dw: 
        $gu = $f5->get("miniorange_saml_enable_profile_mapping"); 
        if (!(MiniorangeSAMLConstants::PLUGIN_VERSION == MiniorangeSAMLConstants::ENTERPRISE_VERSION && $gu)) { 
            goto Cl; 
        } 
        HigherUtilities::profileFieldMapping($e5, $Wm); 
        Cl: 
        if (user_is_blocked($Yq["username"]) == FALSE) { 
            goto gl; 
        } 
        $AM = "User Blocked By Administrator."; 
        $nl = "Please Contact your administrator."; 
        $YK = "This user account is not allowed to login."; 
        Utilities::showErrorMessage($AM, $nl, $YK); 
        return new Response(); 
        goto mb; 
        gl: 
        if (!(array_key_exists("relay_state", $Yq) && !empty($Yq["relay_state"]))) { 
            goto o1; 
        } 
        $s9 = $Yq["relay_state"]; 
        o1: 
        $uB = Utilities::getBaseUrl(); 
        if (!(empty($s9) || $s9 == "/")) { 
            goto yP; 
        } 
        $s9 = $uB; 
        yP: 
        \Drupal::moduleHandler()->invokeAll("invoke_miniorange_2fa_before_login", [$e5]); 
        \Drupal::moduleHandler()->invokeAll("miniorange_saml_idp_resources", [$e5, $Wm]); 
        user_login_finalize($e5); 
        $_SESSION["sessionIndex"] = $Yq["sessionIndex"]; 
        $_SESSION["NameID"] = $Yq["NameID"]; 
        $_SESSION["mo_saml"]["logged_in_with_idp"] = TRUE; 
        if (!($f5->get("miniorange_saml_restrict_redirect_outside_domain") == TRUE)) { 
            goto s2; 
        } 
        $xp = parse_url($s9); 
        $iN = parse_url($uB); 
        $g8 = isset($iN["host"]) ? $iN["host"] : FALSE; 
        $D7 = isset($xp["host"]) ? $xp["host"] : FALSE; 
        if (!($D7 !== FALSE && $g8 !== $D7)) { 
            goto WM; 
        } 
        $Rp = $s9; 
        $s9 = $uB; 
        $Rb = $f5->get("miniorange_saml_whitelist_domains"); 
        $ps = explode(";", $Rb); 
        foreach ($ps as $Ej) { 
            if (!($Ej == '' or $Ej == "/")) { 
                goto uA; 
            } 
            goto xY; 
            uA: 
            if (!(strpos($D7, trim($Ej)) !== false)) { 
                goto Lc; 
            } 
            $s9 = $Rp; 
            goto vS; 
            Lc: 
            xY: 
        } 
        vS: 
        WM: 
        s2: 
        $Yq = new RedirectResponse($s9); 
        $w7 = \Drupal::request(); 
        $w7->getSession()->save(); 
        $Yq->prepare($w7); 
        \Drupal::service("kernel")->terminate($w7, $Yq); 
        $Yq->send(); 
        exit; 
        return new Response(); 
        mb: 
        goto Up; 
        xK: 
        $w7 = \Drupal::request(); 
        $w7->getSession()->clear(); 
        $Yq = new RedirectResponse(Utilities::getBaseUrl()); 
        $Yq->send(); 
        return new Response(); 
        Up: 
        return new Response(); 
    } ?>

Did this file decode correctly?

Original Code

    public function saml_response()
    {
        global $base_url;
        global $gW;
        if (isset($_GET["\123\x41\115\x4c\x52\x65\x73\x70\x6f\156\163\x65"])) {
            goto xK;
        }
        $f5 = \Drupal::config("\x6d\151\x6e\x69\x6f\162\x61\x6e\x67\145\x5f\x73\141\155\154\56\x73\145\x74\164\151\x6e\147\163");
        $ik = $f5->get("\155\151\156\x69\157\x72\x61\x6e\147\145\137\x73\x61\x6d\x6c\x5f\143\x75\x73\x74\x6f\155\137\x61\164\x74\x72\163\x5f\x6d\141\160\x5f\x61\162\162") !== NULL ? json_decode($f5->get("\155\x69\156\151\x6f\162\141\156\147\145\x5f\x73\141\x6d\x6c\137\143\165\x73\164\157\x6d\x5f\141\164\x74\x72\x73\137\155\x61\160\137\141\162\x72"), true) : [];
        $WJ = new MiniOrangeAcs();
        $DH = $f5->get("\155\x69\x6e\157\x72\141\156\147\x65\137\x73\141\x6d\154\x5f\x63\x75\x73\164\157\155\145\x72\137\x61\144\x6d\151\x6e\137\x66\162\x61\165\144\x5f\x63\150\145\143\153");
        $cZ = $f5->get("\x6d\x69\156\151\157\x72\x61\156\x67\x65\x5f\163\141\x6d\154\x5f\143\165\163\164\x6f\155\x65\162\x5f\x61\x64\155\151\x6e\x5f\x74\x6f\x6b\145\x6e");
        $QB = $f5->get("\155\x69\x6e\x69\x6f\x72\141\156\x67\x65\137\x73\x61\x6d\154\137\x63\165\163\x74\157\155\x65\162\x5f\141\144\x6d\x69\156\137\x65\155\x61\151\x6c");
        $pN = \Drupal::request()->server->get("\104\x4f\x43\125\x4d\x45\116\124\137\x52\x4f\117\124") . $gW;
        $XE = trim($base_url, "\x2f");
        if (preg_match("\43\x5e\150\164\x74\160\50\x73\51\x3f\72\57\x2f\43", $XE)) {
            goto se;
        }
        $XE = "\x68\164\x74\x70\72\57\x2f" . $XE;
        se:
        $JY = parse_url($XE);
        $Qi = isset($JY["\160\141\x74\150"]) ? $JY["\160\141\x74\x68"] : '';
        $y6 = preg_replace("\57\136\167\167\x77\x5c\x2e\57", '', $JY["\x68\x6f\x73\x74"] . $Qi);
        $u2 = $pN . $y6;
        $Bb = $f5->get("\155\151\x6e\151\157\162\141\156\147\x65\x5f\163\x61\155\154\x5f\x69\x73\x4d\x75\154\164\151\123\x69\x74\x65\x50\x6c\x75\147\151\156\122\x65\161\x75\x65\x73\x74\x65\x64") == true;
        if (($Bb || $u2 == AESEncryption::decrypt_data($DH, $cZ) || $u2 == AESEncryption::decrypt_data($DH, $cZ, "\101\x45\123\x2d\61\62\x38\55\x45\x43\x42")) && $QB != null && $QB != '') {
            goto i6;
        }
        if ($QB != null && $QB != '') {
            goto Lh;
        }
        if (!($QB == null || $QB == '')) {
            goto Ek;
        }
        $AM = "\x59\157\165\40\x61\x72\x65\x20\156\x6f\164\40\154\x6f\x67\x67\145\144\40\x69\156\x2e";
        $nl = "\x50\x6c\x65\141\x73\x65\40\154\x6f\x67\151\x6e\40\146\151\x72\x73\x74\40\164\157\40\141\143\x74\151\166\x61\x74\x65\40\x73\151\156\x67\x6c\145\x20\163\x69\x67\x6e\40\157\156\x2e";
        $YK = "\x4d\141\153\x65\40\x73\165\x72\x65\40\171\157\x75\40\x68\x61\166\x65\x20\154\x6f\x67\147\145\x64\x20\x69\x6e\57\x20\122\145\147\151\163\164\x65\x72\x20\151\156\40\x74\x6f\40\x6d\x6f\144\x75\154\145\56";
        Utilities::showErrorMessage($AM, $nl, $YK);
        Ek:
        goto fQ;
        Lh:
        if (isset($_POST["\122\x65\154\x61\171\x53\x74\x61\164\145"]) && $_POST["\x52\145\154\x61\x79\x53\x74\x61\x74\145"] == "\164\x65\x73\x74\x56\141\x6c\x69\144\x61\164\145") {
            goto jj;
        }
        $AM = "\x57\145\40\143\x6f\165\154\x64\40\156\157\164\x20\163\151\x67\x6e\40\171\157\x75\40\151\x6e\x2e";
        $nl = "\120\154\x65\141\x73\145\40\103\157\156\x74\141\x63\164\40\x79\157\165\162\x20\x61\144\x6d\151\156\151\163\x74\x72\141\164\x6f\x72\x2e";
        Utilities::showErrorMessage($AM, $nl, "\x2d");
        goto fe;
        jj:
        $AM = "\x4c\151\143\x65\156\x73\145\x20\x6b\x65\171\40\171\x6f\x75\x20\x68\141\166\x65\40\x65\x6e\164\x65\x72\x65\x64\x20\x68\141\x73\x20\141\154\162\145\141\144\x79\x20\142\145\145\x6e\40\165\x73\145\144\x2e";
        $nl = "\120\154\x65\141\163\x65\40\x65\156\164\x65\162\x20\141\40\x6b\x65\171\x20\x77\x68\x69\x63\x68\40\150\x61\163\x20\156\157\164\x20\142\x65\145\156\40\x75\x73\145\144\40\x62\145\146\x6f\162\x65\40\x6f\156\x20\141\x6e\171\40\x6f\164\150\145\162\x20\x69\x6e\x73\x74\141\x6e\x63\x65\40\x6f\162\x20\151\x66\40\171\x6f\x75\x20\150\141\166\145\40\x65\170\141\165\x73\x74\x65\x64\x20\x61\154\154\x20\171\x6f\165\x72\40\153\145\171\163\x20\164\x68\x65\x6e\x20\142\x75\x79\x20\155\x6f\x72\145\x20\154\151\x63\x65\156\x73\x65\x20\146\162\x6f\x6d\40\x4c\151\143\145\156\163\x69\156\147\56";
        Utilities::showErrorMessage($AM, $nl, "\55");
        fe:
        fQ:
        goto Y3;
        i6:
        \Drupal::moduleHandler()->invokeAll("\146\x6f\x72\x77\x61\x72\144\137\x72\145\x73\x70\x6f\x6e\163\x65", [$_POST]);
        $Bj = $WJ->processSamlResponse($_POST, $ik);
        $Yq = $Bj["\162\145\163\160\x6f\156\163\145"];
        $Wm = $Bj["\162\145\163\157\165\x72\143\145\163"];
        Y3:
        if (!(MiniorangeSAMLConstants::PLUGIN_VERSION == MiniorangeSAMLConstants::ENTERPRISE_VERSION && \Drupal\miniorange_saml\HigherUtilities::Is_Restricted_Domain($Yq["\145\155\141\x69\154"]) === TRUE)) {
            goto Sg;
        }
        $AM = "\131\x6f\x75\40\141\162\x65\40\156\157\x74\x20\x61\x6c\154\x6f\167\145\144\x20\164\x6f\x20\154\157\x67\151\156\x20";
        $nl = "\x50\154\x65\141\163\x65\40\103\157\x6e\164\x61\x63\x74\x20\x79\157\165\x72\40\141\144\155\x69\156\151\x73\164\x72\141\164\x6f\x72\x2e";
        $YK = "\x59\157\165\162\40\x64\x6f\155\x61\x69\x6e\x20\x6d\141\x79\40\x62\x65\40\x62\154\157\143\x6b\x65\x64\40\x62\171\x20\x61\x64\x6d\x69\x6e";
        Utilities::showErrorMessage($AM, $nl, $YK);
        Sg:
        if ($f5->get("\x6d\151\156\x69\x6f\162\x61\x6e\x67\x65\x5f\x73\x61\x6d\x6c\x5f\x6c\x6f\x61\144\x5f\x75\163\x65\162") == 1) {
            goto H_;
        }
        $e5 = user_load_by_name($Yq["\165\163\x65\162\156\141\x6d\145"]);
        goto wd;
        H_:
        $e5 = user_load_by_mail($Yq["\145\x6d\x61\151\154"]);
        wd:
        $mB = 0;
        if (!($e5 == NULL)) {
            goto Dp;
        }
        $FQ = $f5->get("\155\x69\156\151\x6f\162\x61\156\x67\x65\137\163\141\155\154\137\x64\x69\x73\x61\142\x6c\x65\137\141\165\x74\157\143\x72\x65\141\x74\145\137\x75\163\145\162\163");
        if ($FQ) {
            goto hE;
        }
        $T3 = \Drupal::service("\x70\141\163\x73\x77\x6f\x72\x64\137\147\145\156\x65\162\141\164\x6f\162")->generate(8);
        $Md = $f5->get("\x6d\151\x6e\151\157\x72\x61\x6e\x67\x65\137\163\141\155\154\x5f\144\145\146\x61\165\x6c\164\137\x72\x6f\x6c\x65");
        $Gn = ["\156\x61\155\145" => $Yq["\x75\163\145\162\x6e\x61\155\145"], "\x6d\141\x69\x6c" => $Yq["\145\155\x61\151\154"], "\160\141\x73\x73" => $T3, "\163\x74\x61\x74\x75\x73" => 1];
        $e5 = User::create($Gn);
        $e5->save();
        if (!($Md != "\x61\x75\x74\x68\x65\x6e\164\x69\x63\x61\164\x65\144" && $f5->get("\155\151\156\151\x6f\x72\141\156\147\145\137\163\x61\155\x6c\x5f\145\156\141\142\x6c\x65\137\162\157\x6c\145\155\x61\x70\160\151\156\x67"))) {
            goto hr;
        }
        $e5->addRole($Md);
        $e5->save();
        hr:
        goto s8;
        hE:
        $AM = "\x41\143\143\x6f\x75\x6e\x74\40\x64\157\x65\x73\x20\156\157\x74\40\145\170\x69\163\x74\x20\x77\151\164\x68\x20\x79\157\x75\x72\x20\x75\163\x65\x72\x6e\x61\x6d\x65\56";
        $nl = "\120\x6c\145\x61\163\145\x20\103\x6f\156\164\x61\x63\164\40\171\x6f\x75\x72\x20\141\144\155\151\156\x69\163\x74\162\x61\x74\157\162\56";
        $YK = "\101\165\164\x6f\x20\x63\x72\x65\x61\164\x69\157\x6e\40\157\146\40\x75\x73\x65\162\x20\x69\x73\40\156\157\164\x20\141\154\154\157\x77\145\144\x20\x69\146\x20\x75\163\x65\162\40\144\157\145\x73\x20\x6e\x6f\x74\40\145\x78\x69\163\x74\x2e";
        Utilities::showErrorMessage($AM, $nl, $YK);
        s8:
        Dp:
        $t7 = array();
        $t7 = $Yq["\143\165\x73\164\157\155\x46\x69\x65\x6c\x64\x41\164\x74\162\x69\x62\x75\x74\x65\163"];
        $e5 = User::load($e5->id());
        $kq = $f5->get("\x6d\151\x6e\x69\x6f\162\141\156\147\x65\137\163\x61\x6d\154\137\x63\x75\163\164\157\155\x5f\141\164\x74\x72\x73\x5f\155\141\x70\137\x73\x65\160") !== NULL ? json_decode($f5->get("\155\151\156\151\157\x72\x61\x6e\147\145\x5f\163\141\x6d\154\x5f\143\x75\163\x74\x6f\x6d\137\141\164\x74\162\163\137\x6d\x61\160\137\x73\x65\160")) : '';
        foreach ($t7 as $yQ => $Ox) {
            $Id = $e5->get($yQ);
            $X0 = $Id->getFieldDefinition();
            $cB = $X0->getFieldStorageDefinition();
            if ($cB->getType() === "\145\156\164\x69\x74\171\x5f\x72\x65\146\145\162\145\156\x63\145") {
                goto Rz;
            }
            if (Utilities::isMultiple($yQ) && !is_null($kq->{$yQ})) {
                goto Nj;
            }
            if (!self::isBooleanField($yQ)) {
                goto DY;
            }
            $Ox = filter_var($Ox, FILTER_VALIDATE_BOOLEAN);
            DY:
            $hG = array($Ox);
            goto XQ;
            Nj:
            $hG = explode($kq->{$yQ}, $Ox);
            XQ:
            $e5->get($yQ)->setValue($hG);
            $e5->save();
            goto CS;
            Rz:
            $aM = $cB->getSetting("\164\141\162\x67\x65\x74\x5f\x74\x79\160\145");
            $no = $X0->getSetting("\150\x61\x6e\144\154\x65\x72\x5f\163\145\x74\x74\151\x6e\147\163");
            $rJ = \Drupal::entityTypeManager()->getStorage($aM)->loadMultiple(NULL);
            if (!isset($no["\164\141\x72\x67\x65\164\137\142\165\156\144\x6c\x65\x73"])) {
                goto VV;
            }
            if (Utilities::isMultiple($yQ) && !is_null($kq->{$yQ})) {
                goto CM;
            }
            $hG = array($Ox);
            goto aZ;
            CM:
            $hG = explode($kq->{$yQ}, $Ox);
            aZ:
            $E1 = [];
            $sY = [];
            foreach ($hG as $Ox) {
                $rJ = \Drupal::entityTypeManager()->getStorage($aM)->loadByProperties(["\x6e\141\155\145" => $Ox]);
                $HH = false;
                foreach ($rJ as $uz) {
                    if (!in_array($uz->bundle(), $no["\164\141\x72\147\145\x74\x5f\x62\x75\x6e\144\x6c\145\x73"])) {
                        goto z1;
                    }
                    $E1[] = $uz->id();
                    $HH = true;
                    z1:
                    Io:
                }
                jo:
                if ($HH) {
                    goto KV;
                }
                $sY[] = $Ox;
                KV:
                lx:
            }
            mR:
            $FX = isset($no["\x61\165\164\x6f\x5f\x63\x72\145\x61\164\145"]) ? $no["\x61\x75\164\x6f\137\x63\x72\145\x61\164\x65"] : false;
            $XT = isset($no["\141\x75\164\x6f\137\143\x72\145\x61\x74\x65\137\142\x75\x6e\x64\x6c\x65"]) ? $no["\x61\x75\x74\x6f\x5f\x63\162\x65\141\164\x65\137\142\165\156\x64\154\x65"] : '';
            if (!($FX && $aM == "\164\141\170\x6f\156\x6f\x6d\171\x5f\164\x65\x72\x6d")) {
                goto kh;
            }
            foreach ($sY as $bh) {
                $LH = Term::create(["\x6e\x61\x6d\x65" => $bh, "\x76\x69\144" => $XT]);
                $LH->save();
                $E1[] = $LH->id();
                Ny:
            }
            pf:
            kh:
            $Id->setValue($E1);
            $e5->save();
            VV:
            CS:
            UX:
        }
        Mp:
        if (!(!is_null($e5) && $f5->get("\155\151\156\x69\x6f\162\141\156\147\x65\137\163\x61\155\154\137\x65\156\x61\142\x6c\145\137\162\x6f\x6c\x65\155\141\160\160\151\x6e\147"))) {
            goto dw;
        }
        $zE = $f5->get("\x6d\x69\156\x69\157\162\141\156\x67\x65\137\163\141\155\154\x5f\x72\x6f\x6c\x65\137\155\x61\160\x70\151\156\147\x5f\x61\162\162") != null ? (array) json_decode($f5->get("\155\x69\156\151\x6f\162\x61\x6e\147\145\137\163\x61\155\x6c\137\x72\x6f\154\145\x5f\x6d\x61\160\x70\x69\x6e\x67\x5f\x61\x72\x72")) : [];
        $PH = array();
        $PH = $Yq["\x63\165\163\x74\x6f\155\106\151\145\x6c\144\122\157\x6c\145\x73"];
        $AL = \Drupal::configFactory()->getEditable("\x6d\x69\156\x69\x6f\162\x61\156\x67\145\137\163\x61\x6d\154\x2e\x73\x65\x74\164\151\x6e\147\163")->get("\155\151\x6e\151\157\162\141\x6e\147\x65\x5f\163\141\155\x6c\x5f\x64\151\x73\x61\x62\154\x65\x5f\162\157\154\x65\x5f\x75\160\x64\x61\x74\145");
        $g5 = $e5->getRoles();
        if ($AL) {
            goto Mg;
        }
        foreach ($g5 as $yQ => $Ox) {
            if (in_array($Ox, array_keys($zE))) {
                goto re;
            }
            if (!($Ox != $f5->get("\155\151\156\151\157\162\141\x6e\x67\145\x5f\x73\141\x6d\x6c\x5f\144\x65\146\x61\x75\154\x74\137\162\x6f\154\145"))) {
                goto X1;
            }
            $e5->removeRole($Ox);
            $e5->save();
            X1:
            re:
            ZV:
        }
        c8:
        Mg:
        foreach ($zE as $yQ => $Ox) {
            $cn = FALSE;
            $Rf = array();
            $tw = explode("\x3b", $Ox);
            foreach ($tw as $pC => $XG) {
                set_error_handler(function ($hZ, $f4, $fj, $Kj) {
                });
                $lQ = preg_match($XG, '');
                restore_error_handler();
                $Ss = !is_bool($lQ);
                if (!is_array($PH)) {
                    goto hX;
                }
                if ($Ss) {
                    goto QB;
                }
                if (in_array($XG, $PH)) {
                    goto v6;
                }
                goto Lm;
                QB:
                $Rf = preg_grep($XG, $PH);
                if (empty($Rf)) {
                    goto O7;
                }
                $cn = TRUE;
                O7:
                goto Lm;
                v6:
                $cn = TRUE;
                Lm:
                hX:
                hV:
            }
            W8:
            if ($cn && $yQ != "\x61\x75\164\x68\145\x6e\x74\x69\143\141\x74\145\x64") {
                goto yp;
            }
            $e5->removeRole($yQ);
            $e5->save();
            goto R5;
            yp:
            $e5->addRole($yQ);
            $e5->save();
            R5:
            ql:
        }
        ty:
        dw:
        $gu = $f5->get("\155\151\156\x69\157\162\x61\x6e\x67\145\137\163\x61\x6d\x6c\137\145\156\141\142\x6c\x65\x5f\x70\162\x6f\x66\x69\x6c\x65\x5f\x6d\141\160\160\x69\156\x67");
        if (!(MiniorangeSAMLConstants::PLUGIN_VERSION == MiniorangeSAMLConstants::ENTERPRISE_VERSION && $gu)) {
            goto Cl;
        }
        HigherUtilities::profileFieldMapping($e5, $Wm);
        Cl:
        if (user_is_blocked($Yq["\x75\x73\x65\x72\156\141\x6d\145"]) == FALSE) {
            goto gl;
        }
        $AM = "\x55\x73\145\162\40\102\154\x6f\x63\153\145\144\40\102\x79\40\x41\x64\155\x69\x6e\151\163\164\x72\141\164\x6f\x72\x2e";
        $nl = "\120\154\145\x61\163\x65\40\x43\157\x6e\x74\x61\x63\164\x20\171\x6f\x75\x72\x20\141\144\x6d\151\x6e\151\x73\164\162\141\x74\x6f\162\56";
        $YK = "\x54\x68\151\163\40\165\x73\145\x72\40\141\143\143\157\165\x6e\x74\40\x69\x73\x20\x6e\x6f\164\x20\x61\154\x6c\x6f\x77\x65\x64\40\164\157\40\154\157\x67\151\156\x2e";
        Utilities::showErrorMessage($AM, $nl, $YK);
        return new Response();
        goto mb;
        gl:
        if (!(array_key_exists("\162\145\x6c\141\x79\137\x73\164\x61\164\145", $Yq) && !empty($Yq["\162\x65\154\141\x79\137\x73\x74\141\164\x65"]))) {
            goto o1;
        }
        $s9 = $Yq["\x72\145\x6c\141\171\137\163\x74\x61\164\x65"];
        o1:
        $uB = Utilities::getBaseUrl();
        if (!(empty($s9) || $s9 == "\x2f")) {
            goto yP;
        }
        $s9 = $uB;
        yP:
        \Drupal::moduleHandler()->invokeAll("\151\x6e\x76\157\x6b\x65\137\155\x69\156\x69\x6f\162\x61\156\x67\x65\x5f\x32\146\x61\137\x62\145\x66\x6f\x72\145\x5f\154\157\x67\x69\156", [$e5]);
        \Drupal::moduleHandler()->invokeAll("\155\x69\x6e\151\157\162\x61\x6e\x67\x65\x5f\x73\x61\155\x6c\137\151\x64\160\x5f\x72\145\x73\x6f\x75\162\143\x65\163", [$e5, $Wm]);
        user_login_finalize($e5);
        $_SESSION["\x73\145\x73\x73\x69\x6f\156\x49\156\x64\x65\x78"] = $Yq["\163\145\163\x73\x69\157\x6e\111\156\x64\x65\x78"];
        $_SESSION["\x4e\x61\155\145\111\x44"] = $Yq["\116\141\155\x65\111\x44"];
        $_SESSION["\x6d\157\137\x73\x61\x6d\154"]["\x6c\157\147\147\145\144\x5f\x69\x6e\x5f\167\151\x74\x68\137\x69\144\x70"] = TRUE;
        if (!($f5->get("\x6d\151\156\x69\x6f\162\x61\x6e\147\145\137\163\141\155\x6c\x5f\x72\145\x73\164\162\151\x63\164\x5f\x72\145\144\151\162\x65\143\164\137\x6f\x75\x74\x73\151\144\145\x5f\144\157\x6d\141\151\x6e") == TRUE)) {
            goto s2;
        }
        $xp = parse_url($s9);
        $iN = parse_url($uB);
        $g8 = isset($iN["\150\157\163\x74"]) ? $iN["\150\157\x73\164"] : FALSE;
        $D7 = isset($xp["\x68\x6f\163\x74"]) ? $xp["\150\x6f\x73\164"] : FALSE;
        if (!($D7 !== FALSE && $g8 !== $D7)) {
            goto WM;
        }
        $Rp = $s9;
        $s9 = $uB;
        $Rb = $f5->get("\155\151\156\151\157\162\141\x6e\147\145\137\163\x61\x6d\x6c\x5f\x77\x68\151\x74\x65\154\151\x73\x74\137\x64\157\155\141\151\156\x73");
        $ps = explode("\x3b", $Rb);
        foreach ($ps as $Ej) {
            if (!($Ej == '' or $Ej == "\x2f")) {
                goto uA;
            }
            goto xY;
            uA:
            if (!(strpos($D7, trim($Ej)) !== false)) {
                goto Lc;
            }
            $s9 = $Rp;
            goto vS;
            Lc:
            xY:
        }
        vS:
        WM:
        s2:
        $Yq = new RedirectResponse($s9);
        $w7 = \Drupal::request();
        $w7->getSession()->save();
        $Yq->prepare($w7);
        \Drupal::service("\153\x65\162\156\x65\x6c")->terminate($w7, $Yq);
        $Yq->send();
        exit;
        return new Response();
        mb:
        goto Up;
        xK:
        $w7 = \Drupal::request();
        $w7->getSession()->clear();
        $Yq = new RedirectResponse(Utilities::getBaseUrl());
        $Yq->send();
        return new Response();
        Up:
        return new Response();
    }

Function Calls

None

Variables

None

Stats

MD5 de270e1563fb949d3aef1fbcddbd7b44
Eval Count 0
Decode Time 52 ms