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 miniorangedev\craftsinglesignon\controllers; use miniorangedev\cra..

Decoded Output download

<?php 
 
 
namespace miniorangedev\craftsinglesignon\controllers; 
 
use miniorangedev\craftsinglesignon\Craftsinglesignon; 
use craft\helpers\UrlHelper; 
use craft\elements\User; 
use miniorangedev\craftsinglesignon\controllers\ResourcesController; 
use Craft; 
use craft\web\Controller; 
class LoginController extends Controller 
{ 
    protected array|int|bool $allowAnonymous = ["index", "callback", "test_config", "saml", "samllogin"]; 
    public function actionIndex() 
    { 
        $so = ResourcesController::actionDatadb(); 
        $ma = @$so["oauthsettings"] ?: null; 
        $F4 = @$ma["client_id"] ?: null; 
        $HU = @$ma["scope"] ?: null; 
        $rX = @$ma["authorization_url"] ?: null; 
        $Fo = @$ma["app_provider"] ?: null; 
        $DI = @$ma["callback_url"] ?: null; 
        if (!isset($_GET["test_config"])) { 
            goto Hd; 
        } 
        $so["test_config"] = 1; 
        $Te = Craft::$app->sites->currentSite->name; 
        $RT = Craft::$app->version > 4 ? getenv("CRAFT_DB_TABLE_PREFIX") : getenv("DB_TABLE_PREFIX"); 
        Craft::$app->db->createCommand()->update($RT . "mologin_config", ["options" => json_encode($so)], ["name" => $Te])->execute(); 
        Hd: 
        if (isset($_REQUEST["code"])) { 
            goto An; 
        } 
        $cx = $rX . "?redirect_uri=" . $DI . "&response_type=code&client_id=" . $F4 . "&scope=" . $HU . "&state=" . $Fo; 
        header("Location:" . $cx); 
        exit; 
        An: 
    } 
    public function actionCallback() 
    { 
        $D4 = Craft::$app->request->getQueryParam("code"); 
        $so = ResourcesController::actionDatadb() != null ? ResourcesController::actionDatadb() : array(); 
        $ma = @$so["oauthsettings"] ?: null; 
        $hq = @$so["oauthattribute"] ?: null; 
        $F4 = @$ma["client_id"] ?: null; 
        $NW = @$ma["client_secret"] ?: null; 
        $gY = @$ma["oauth_token_api"] ?: null; 
        $zA = @$ma["user_info_api"] ?: null; 
        $YM = @$hq["username_attribute"] ?: null; 
        $Ba = @$hq["email_attribute"] ?: null; 
        $iE = @$hq["custom_attr_count"] ?: 0; 
        $Wp = @$hq["custom_attributes"] ?: null; 
        $DI = @$ma["callback_url"] ?: null; 
        $SX = "authorization_code"; 
        $Pv = array(); 
        $KU = array(); 
        $mF = curl_init($gY); 
        curl_setopt($mF, CURLOPT_FOLLOWLOCATION, true); 
        curl_setopt($mF, CURLOPT_ENCODING, ''); 
        curl_setopt($mF, CURLOPT_RETURNTRANSFER, true); 
        curl_setopt($mF, CURLOPT_AUTOREFERER, true); 
        curl_setopt($mF, CURLOPT_SSL_VERIFYPEER, false); 
        curl_setopt($mF, CURLOPT_MAXREDIRS, 10); 
        curl_setopt($mF, CURLOPT_POST, true); 
        curl_setopt($mF, CURLOPT_HTTPHEADER, array("Accept: application/json")); 
        curl_setopt($mF, CURLOPT_POSTFIELDS, "redirect_uri=" . urlencode($DI) . "&grant_type=" . $SX . "&client_id=" . $F4 . "&client_secret=" . $NW . "&code=" . $D4); 
        $OT = curl_exec($mF); 
        if (curl_error($mF)) { 
            goto HD; 
        } 
        if (is_array(json_decode($OT, true))) { 
            goto of; 
        } 
        exit("Invalid response received getting access_token from url " . $gY); 
        of: 
        goto Je; 
        HD: 
        exit(curl_error($mF)); 
        Je: 
        $OT = json_decode($OT, true); 
        if (isset($OT["error_description"])) { 
            goto Sr; 
        } 
        if (isset($OT["error"])) { 
            goto Tc; 
        } 
        if ($zA == null && isset($OT["id_token"])) { 
            goto cS; 
        } 
        if (isset($OT["access_token"])) { 
            goto HO; 
        } 
        exit("Invalid response received from OAuth Provider. Contact your administrator for more details."); 
        goto Fj; 
        HO: 
        $g1 = $OT["access_token"]; 
        Fj: 
        goto yz; 
        cS: 
        $cy = $this->decodeJWT($OT["id_token"]); 
        $E9 = @$cy[$YM] ?: null; 
        $Tl = @$cy[$Ba] ?: null; 
        $J2 = 1; 
        gi: 
        if (!($J2 <= $iE)) { 
            goto A1; 
        } 
        $KU[$Wp["custom_attribute" . strval($J2)]] = @$Pv[$Wp["custom_attribute_value" . strval($J2)]] ?: null; 
        oS: 
        $J2++; 
        goto gi; 
        A1: 
        yz: 
        goto gz; 
        Tc: 
        exit($OT["error"]); 
        gz: 
        goto r0; 
        Sr: 
        exit($OT["error_description"]); 
        r0: 
        if (!isset($g1)) { 
            goto xN; 
        } 
        $mF = curl_init($zA . "?access_token=" . $g1); 
        curl_setopt($mF, CURLOPT_RETURNTRANSFER, true); 
        if (empty($be)) { 
            goto AG; 
        } 
        curl_setopt($mF, CURLOPT_HTTPHEADER, $be); 
        AG: 
        curl_setopt($mF, CURLOPT_POST, false); 
        curl_setopt($mF, CURLOPT_VERBOSE, true); 
        curl_setopt($mF, CURLOPT_SSL_VERIFYPEER, false); 
        $Nr = curl_exec($mF); 
        if (!curl_error($mF)) { 
            goto KB; 
        } 
        exit(curl_error($mF)); 
        KB: 
        if (is_array(json_decode($Nr, true))) { 
            goto dg; 
        } 
        exit("Invalid response received getting access_token from url " . $zA); 
        dg: 
        $Pv = json_decode($Nr, true); 
        curl_close($mF); 
        if (isset($Pv["error_description"])) { 
            goto gl; 
        } 
        if (isset($Pv["error"])) { 
            goto I3; 
        } 
        if (isset($Pv)) { 
            goto yj; 
        } 
        exit("Invalid response received from OAuth Provider. Contact your administrator for more details."); 
        goto KH; 
        yj: 
        $E9 = @$Pv[$YM] ?: null; 
        $Tl = @$Pv[$Ba] ?: null; 
        $J2 = 1; 
        zi: 
        if (!($J2 <= $iE)) { 
            goto O3; 
        } 
        $KU[$Wp["custom_attribute" . strval($J2)]] = @$Pv[$Wp["custom_attribute_value" . strval($J2)]] ?: null; 
        F7: 
        $J2++; 
        goto zi; 
        O3: 
        KH: 
        goto no; 
        I3: 
        exit($Pv["error"]); 
        no: 
        goto Qk; 
        gl: 
        exit($Pv["error_description"]); 
        Qk: 
        xN: 
        if (!isset($so["test_config"])) { 
            goto I_; 
        } 
        $so["test_config"] = null; 
        $Te = Craft::$app->sites->currentSite->name; 
        $RT = Craft::$app->version > 4 ? getenv("CRAFT_DB_TABLE_PREFIX") : getenv("DB_TABLE_PREFIX"); 
        Craft::$app->db->createCommand()->update($RT . "mologin_config", ["options" => json_encode($so)], ["name" => $Te])->execute(); 
        self::actionTest_config($Pv); 
        I_: 
        self::actionLogin_flow($so, $E9, $Tl, $iE, $Wp, $KU); 
    } 
    private function decodeJWT($iI) 
    { 
        $IW = explode(".", $iI); 
        if (!(count($IW) !== 3)) { 
            goto wL; 
        } 
        exit("Invalid JWT format"); 
        wL: 
        list($xl, $VU, $Vx) = $IW; 
        $xW = json_decode(base64_decode($xl), true); 
        $zf = json_decode(base64_decode($VU), true); 
        if (!(!$xW || !$zf)) { 
            goto Dn; 
        } 
        exit("Invalid JWT data"); 
        Dn: 
        return $zf; 
    } 
    public static function actionLogin_flow($so, $E9 = null, $Tl = null, $iE, $Wp, $KU) 
    { 
        $user = new User(); 
        $qh = User::find()->email($Tl)->all(); 
        $b2 = @$so["customsettings"] ?: null; 
        $rg = @$so["oauthsettings"]["noreg"] ?: null; 
        if (!(isset($qh[0]["admin"]) && $qh[0]["admin"] == 1)) { 
            goto Km; 
        } 
        exit("No Email Address Return!"); 
        Km: 
        if (empty($qh)) { 
            goto Ns; 
        } 
        $user = User::find()->username($E9)->one(); 
        if (!$user) { 
            goto Fq; 
        } 
        $J2 = 1; 
        CP: 
        if (!($J2 <= $iE)) { 
            goto RY; 
        } 
        $user->setFieldValue($Wp["custom_attribute" . strval($J2)], $KU[$Wp["custom_attribute" . strval($J2)]]); 
        Iq: 
        $J2++; 
        goto CP; 
        RY: 
        Craft::$app->getElements()->saveElement($user, false); 
        Fq: 
        goto oX; 
        Ns: 
        if (!Craft::$app->getUser()->getIdentity()) { 
            goto jr; 
        } 
        return; 
        jr: 
        $user->username = $E9; 
        $user->email = $Tl; 
        $user->active = true; 
        $user->slug = "mologin"; 
        if (!$user->validate(null, false)) { 
            goto Pa; 
        } 
        $J2 = 1; 
        Gu: 
        if (!($J2 <= $iE)) { 
            goto pQ; 
        } 
        $user->setFieldValue($Wp["custom_attribute" . strval($J2)], $KU[$Wp["custom_attribute" . strval($J2)]]); 
        RR: 
        $J2++; 
        goto Gu; 
        pQ: 
        Craft::$app->getElements()->saveElement($user, false); 
        if (isset($b2["grouphandle"])) { 
            goto FE; 
        } 
        $sb = @$b2["userRole"] ?: array("accessCp"); 
        Craft::$app->userPermissions->saveUserPermissions($user->id, $sb); 
        goto P3; 
        FE: 
        foreach ($b2["grouphandle"] as $bS) { 
            $G3 = Craft::$app->userGroups->getGroupByHandle($bS); 
            Craft::$app->users->assignUserToGroups($user->id, [$G3->id]); 
            v6: 
        } 
        Qt: 
        P3: 
        Pa: 
        oX: 
        $qh = User::find()->email($Tl)->all(); 
        if (isset($qh)) { 
            goto y0; 
        } 
        exit("Error in login!"); 
        goto C2; 
        y0: 
        Craft::$app->getUser()->login($qh[0]); 
        $hB = @$b2["redirect_url"] ?: UrlHelper::cpUrl("dashboard"); 
        Craft::$app->getResponse()->redirect($hB); 
        C2: 
    } 
    public static function actionTest_config($Pv) 
    { 
        $cX = "<div style="color: #3c763d; background-color: #dff0d8; padding:2%; margin-bottom:20px; text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>"; 
        $Mg = "<center><table style='width: 80%;'>"; 
        $Mg .= "<tr><th>Key</th><th>Value</th></tr>"; 
        foreach ($Pv as $p0 => $yN) { 
            $Mg .= "<tr>"; 
            $Mg .= "<td>{$p0}</td>"; 
            $Mg .= "<td>"; 
            if (is_array($yN)) { 
                goto Yy; 
            } 
            $Mg .= "<strong>{$yN}</strong>"; 
            goto lB; 
            Yy: 
            if (empty($yN)) { 
                goto Cu; 
            } 
            $Mg .= self::actionTest_config($yN); 
            Cu: 
            lB: 
            $Mg .= "</td></tr>"; 
            VJ: 
        } 
        bQ: 
        $Mg .= "</table></center>
            <style>
                table, th, td {\xa                    border: 1px solid black;
                    border-collapse: collapse;\xa                    padding: 10px;\xa                    font-size: 15px;
                }\xa            </style>"; 
        echo $cX .= $Mg; 
        exit; 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace miniorangedev\craftsinglesignon\controllers;

use miniorangedev\craftsinglesignon\Craftsinglesignon;
use craft\helpers\UrlHelper;
use craft\elements\User;
use miniorangedev\craftsinglesignon\controllers\ResourcesController;
use Craft;
use craft\web\Controller;
class LoginController extends Controller
{
    protected array|int|bool $allowAnonymous = ["\151\156\x64\145\x78", "\x63\141\154\154\142\141\x63\153", "\x74\145\x73\x74\x5f\143\157\x6e\x66\x69\147", "\x73\141\155\x6c", "\163\141\x6d\154\x6c\157\x67\151\x6e"];
    public function actionIndex()
    {
        $so = ResourcesController::actionDatadb();
        $ma = @$so["\157\x61\x75\x74\x68\x73\145\164\164\x69\156\147\163"] ?: null;
        $F4 = @$ma["\143\154\x69\145\156\164\x5f\151\x64"] ?: null;
        $HU = @$ma["\x73\x63\x6f\160\x65"] ?: null;
        $rX = @$ma["\141\x75\164\150\x6f\x72\x69\172\141\x74\151\x6f\156\137\165\162\154"] ?: null;
        $Fo = @$ma["\141\160\x70\x5f\160\x72\x6f\x76\x69\x64\145\x72"] ?: null;
        $DI = @$ma["\x63\141\154\154\142\x61\143\x6b\x5f\165\x72\x6c"] ?: null;
        if (!isset($_GET["\164\145\163\164\137\143\157\156\146\151\147"])) {
            goto Hd;
        }
        $so["\164\145\x73\164\x5f\143\x6f\156\x66\x69\x67"] = 1;
        $Te = Craft::$app->sites->currentSite->name;
        $RT = Craft::$app->version > 4 ? getenv("\103\x52\x41\x46\124\137\x44\102\137\124\x41\102\x4c\105\x5f\120\x52\105\x46\x49\x58") : getenv("\104\102\137\x54\x41\x42\x4c\x45\137\120\122\x45\x46\x49\130");
        Craft::$app->db->createCommand()->update($RT . "\155\157\154\157\147\x69\x6e\x5f\143\157\x6e\146\x69\x67", ["\157\160\x74\x69\x6f\156\x73" => json_encode($so)], ["\x6e\141\x6d\x65" => $Te])->execute();
        Hd:
        if (isset($_REQUEST["\143\x6f\x64\145"])) {
            goto An;
        }
        $cx = $rX . "\77\162\145\x64\151\x72\x65\x63\x74\x5f\x75\162\x69\75" . $DI . "\46\162\x65\163\160\157\156\x73\x65\x5f\164\x79\160\x65\x3d\x63\157\144\145\46\143\154\151\x65\156\164\x5f\151\x64\75" . $F4 . "\46\x73\143\157\x70\x65\75" . $HU . "\46\163\164\x61\164\x65\x3d" . $Fo;
        header("\x4c\157\143\141\164\x69\x6f\156\72" . $cx);
        exit;
        An:
    }
    public function actionCallback()
    {
        $D4 = Craft::$app->request->getQueryParam("\143\157\x64\x65");
        $so = ResourcesController::actionDatadb() != null ? ResourcesController::actionDatadb() : array();
        $ma = @$so["\x6f\x61\x75\164\150\x73\145\x74\164\151\x6e\147\x73"] ?: null;
        $hq = @$so["\x6f\141\165\164\x68\x61\164\164\162\151\142\165\x74\145"] ?: null;
        $F4 = @$ma["\143\x6c\151\x65\156\164\x5f\151\144"] ?: null;
        $NW = @$ma["\x63\154\x69\145\156\x74\x5f\x73\x65\x63\x72\145\164"] ?: null;
        $gY = @$ma["\157\141\165\164\x68\x5f\x74\x6f\x6b\145\x6e\x5f\x61\x70\x69"] ?: null;
        $zA = @$ma["\165\163\145\162\x5f\151\156\146\157\x5f\141\160\151"] ?: null;
        $YM = @$hq["\165\163\145\162\156\x61\155\145\137\141\x74\x74\162\151\x62\165\x74\145"] ?: null;
        $Ba = @$hq["\x65\x6d\x61\x69\x6c\x5f\x61\x74\x74\162\x69\142\165\164\145"] ?: null;
        $iE = @$hq["\x63\165\x73\164\x6f\155\137\x61\164\164\x72\x5f\143\x6f\165\x6e\x74"] ?: 0;
        $Wp = @$hq["\x63\165\163\x74\x6f\155\137\x61\164\164\x72\151\142\165\164\x65\x73"] ?: null;
        $DI = @$ma["\x63\141\x6c\x6c\x62\141\x63\x6b\x5f\165\162\154"] ?: null;
        $SX = "\x61\x75\x74\x68\x6f\x72\151\x7a\141\x74\151\x6f\x6e\137\143\x6f\144\145";
        $Pv = array();
        $KU = array();
        $mF = curl_init($gY);
        curl_setopt($mF, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($mF, CURLOPT_ENCODING, '');
        curl_setopt($mF, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($mF, CURLOPT_AUTOREFERER, true);
        curl_setopt($mF, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($mF, CURLOPT_MAXREDIRS, 10);
        curl_setopt($mF, CURLOPT_POST, true);
        curl_setopt($mF, CURLOPT_HTTPHEADER, array("\x41\x63\143\145\160\164\72\40\141\x70\160\x6c\x69\x63\x61\164\x69\157\x6e\x2f\152\x73\157\156"));
        curl_setopt($mF, CURLOPT_POSTFIELDS, "\x72\x65\144\x69\162\145\x63\164\x5f\x75\162\x69\x3d" . urlencode($DI) . "\46\x67\x72\x61\156\164\x5f\x74\171\x70\145\75" . $SX . "\x26\143\x6c\x69\145\156\164\137\151\144\x3d" . $F4 . "\46\x63\x6c\x69\145\156\x74\137\x73\x65\x63\x72\x65\164\75" . $NW . "\46\143\x6f\x64\x65\x3d" . $D4);
        $OT = curl_exec($mF);
        if (curl_error($mF)) {
            goto HD;
        }
        if (is_array(json_decode($OT, true))) {
            goto of;
        }
        exit("\x49\x6e\x76\x61\154\151\x64\x20\x72\x65\x73\160\x6f\x6e\x73\x65\40\162\x65\x63\x65\151\x76\145\144\x20\147\145\164\164\151\156\147\40\141\x63\143\x65\x73\x73\x5f\164\157\x6b\x65\x6e\40\146\x72\157\155\x20\165\x72\154\x20" . $gY);
        of:
        goto Je;
        HD:
        exit(curl_error($mF));
        Je:
        $OT = json_decode($OT, true);
        if (isset($OT["\x65\x72\162\x6f\x72\x5f\144\145\x73\x63\x72\151\160\x74\x69\x6f\156"])) {
            goto Sr;
        }
        if (isset($OT["\145\x72\x72\x6f\162"])) {
            goto Tc;
        }
        if ($zA == null && isset($OT["\151\x64\x5f\164\x6f\153\145\x6e"])) {
            goto cS;
        }
        if (isset($OT["\141\143\143\145\x73\x73\x5f\164\x6f\153\145\156"])) {
            goto HO;
        }
        exit("\111\156\166\x61\x6c\x69\x64\x20\x72\145\163\160\x6f\x6e\x73\x65\x20\x72\145\143\145\151\x76\145\x64\x20\146\x72\157\x6d\x20\117\101\x75\164\x68\x20\x50\162\157\166\x69\144\145\x72\56\x20\103\157\x6e\164\x61\x63\x74\40\171\x6f\x75\162\x20\x61\144\155\x69\x6e\x69\163\x74\x72\x61\164\157\x72\x20\146\157\162\x20\155\x6f\162\145\40\144\x65\164\x61\151\154\x73\x2e");
        goto Fj;
        HO:
        $g1 = $OT["\x61\143\143\x65\x73\163\x5f\x74\x6f\153\x65\156"];
        Fj:
        goto yz;
        cS:
        $cy = $this->decodeJWT($OT["\x69\x64\137\164\157\x6b\145\x6e"]);
        $E9 = @$cy[$YM] ?: null;
        $Tl = @$cy[$Ba] ?: null;
        $J2 = 1;
        gi:
        if (!($J2 <= $iE)) {
            goto A1;
        }
        $KU[$Wp["\x63\x75\x73\164\x6f\x6d\137\x61\164\164\162\151\142\165\x74\x65" . strval($J2)]] = @$Pv[$Wp["\x63\165\163\x74\x6f\x6d\x5f\141\x74\164\162\151\142\x75\164\145\137\x76\141\154\165\145" . strval($J2)]] ?: null;
        oS:
        $J2++;
        goto gi;
        A1:
        yz:
        goto gz;
        Tc:
        exit($OT["\x65\x72\162\x6f\x72"]);
        gz:
        goto r0;
        Sr:
        exit($OT["\x65\162\x72\157\162\x5f\x64\x65\163\143\162\x69\160\164\x69\157\x6e"]);
        r0:
        if (!isset($g1)) {
            goto xN;
        }
        $mF = curl_init($zA . "\x3f\x61\x63\143\145\x73\x73\x5f\x74\157\x6b\145\x6e\x3d" . $g1);
        curl_setopt($mF, CURLOPT_RETURNTRANSFER, true);
        if (empty($be)) {
            goto AG;
        }
        curl_setopt($mF, CURLOPT_HTTPHEADER, $be);
        AG:
        curl_setopt($mF, CURLOPT_POST, false);
        curl_setopt($mF, CURLOPT_VERBOSE, true);
        curl_setopt($mF, CURLOPT_SSL_VERIFYPEER, false);
        $Nr = curl_exec($mF);
        if (!curl_error($mF)) {
            goto KB;
        }
        exit(curl_error($mF));
        KB:
        if (is_array(json_decode($Nr, true))) {
            goto dg;
        }
        exit("\x49\156\166\141\x6c\151\x64\x20\x72\145\x73\x70\x6f\156\x73\x65\40\162\x65\143\x65\x69\166\145\x64\x20\147\145\x74\x74\x69\156\147\x20\141\x63\x63\145\x73\163\x5f\164\157\x6b\x65\156\x20\x66\162\157\x6d\x20\165\162\154\40" . $zA);
        dg:
        $Pv = json_decode($Nr, true);
        curl_close($mF);
        if (isset($Pv["\x65\162\x72\157\x72\x5f\x64\x65\x73\143\x72\x69\160\164\151\x6f\x6e"])) {
            goto gl;
        }
        if (isset($Pv["\145\x72\x72\157\x72"])) {
            goto I3;
        }
        if (isset($Pv)) {
            goto yj;
        }
        exit("\x49\x6e\x76\x61\154\x69\x64\x20\x72\145\163\x70\x6f\156\x73\x65\40\x72\145\143\x65\151\x76\145\144\x20\146\x72\157\155\x20\117\x41\165\x74\150\40\120\162\157\166\x69\144\145\162\56\40\103\x6f\x6e\x74\141\x63\x74\40\171\x6f\x75\162\40\x61\x64\x6d\151\156\x69\163\164\x72\x61\x74\x6f\162\40\146\157\x72\40\155\157\162\x65\x20\144\x65\164\x61\151\154\x73\56");
        goto KH;
        yj:
        $E9 = @$Pv[$YM] ?: null;
        $Tl = @$Pv[$Ba] ?: null;
        $J2 = 1;
        zi:
        if (!($J2 <= $iE)) {
            goto O3;
        }
        $KU[$Wp["\143\x75\x73\164\x6f\155\x5f\141\164\164\162\x69\142\165\x74\145" . strval($J2)]] = @$Pv[$Wp["\143\x75\x73\x74\x6f\155\x5f\x61\164\x74\162\151\x62\165\164\x65\x5f\166\141\154\165\145" . strval($J2)]] ?: null;
        F7:
        $J2++;
        goto zi;
        O3:
        KH:
        goto no;
        I3:
        exit($Pv["\x65\162\x72\x6f\162"]);
        no:
        goto Qk;
        gl:
        exit($Pv["\145\162\x72\x6f\x72\137\x64\145\x73\x63\x72\151\160\164\151\157\156"]);
        Qk:
        xN:
        if (!isset($so["\x74\145\163\164\137\x63\x6f\x6e\146\151\147"])) {
            goto I_;
        }
        $so["\164\x65\163\164\137\x63\x6f\x6e\146\151\x67"] = null;
        $Te = Craft::$app->sites->currentSite->name;
        $RT = Craft::$app->version > 4 ? getenv("\103\x52\101\x46\124\x5f\104\102\137\124\x41\x42\x4c\x45\x5f\x50\x52\x45\x46\111\x58") : getenv("\104\x42\137\x54\x41\x42\x4c\105\x5f\x50\x52\105\x46\x49\x58");
        Craft::$app->db->createCommand()->update($RT . "\155\157\154\157\147\x69\x6e\137\143\157\x6e\x66\x69\147", ["\157\x70\x74\151\x6f\156\163" => json_encode($so)], ["\x6e\141\155\x65" => $Te])->execute();
        self::actionTest_config($Pv);
        I_:
        self::actionLogin_flow($so, $E9, $Tl, $iE, $Wp, $KU);
    }
    private function decodeJWT($iI)
    {
        $IW = explode("\56", $iI);
        if (!(count($IW) !== 3)) {
            goto wL;
        }
        exit("\x49\x6e\166\x61\x6c\151\x64\x20\112\127\124\40\x66\x6f\x72\155\x61\164");
        wL:
        list($xl, $VU, $Vx) = $IW;
        $xW = json_decode(base64_decode($xl), true);
        $zf = json_decode(base64_decode($VU), true);
        if (!(!$xW || !$zf)) {
            goto Dn;
        }
        exit("\x49\x6e\166\141\154\x69\144\x20\x4a\127\124\x20\144\x61\x74\x61");
        Dn:
        return $zf;
    }
    public static function actionLogin_flow($so, $E9 = null, $Tl = null, $iE, $Wp, $KU)
    {
        $user = new User();
        $qh = User::find()->email($Tl)->all();
        $b2 = @$so["\143\x75\x73\164\157\x6d\x73\x65\164\x74\151\x6e\147\163"] ?: null;
        $rg = @$so["\157\x61\x75\x74\x68\x73\145\x74\164\x69\156\147\163"]["\x6e\x6f\162\145\x67"] ?: null;
        if (!(isset($qh[0]["\141\x64\155\x69\x6e"]) && $qh[0]["\x61\144\155\151\x6e"] == 1)) {
            goto Km;
        }
        exit("\x4e\x6f\40\105\x6d\141\151\154\40\101\x64\x64\x72\x65\x73\x73\40\x52\145\164\x75\162\x6e\41");
        Km:
        if (empty($qh)) {
            goto Ns;
        }
        $user = User::find()->username($E9)->one();
        if (!$user) {
            goto Fq;
        }
        $J2 = 1;
        CP:
        if (!($J2 <= $iE)) {
            goto RY;
        }
        $user->setFieldValue($Wp["\x63\x75\163\x74\157\155\137\141\x74\164\x72\151\142\165\x74\x65" . strval($J2)], $KU[$Wp["\143\x75\163\x74\157\x6d\137\x61\x74\x74\162\x69\x62\x75\164\145" . strval($J2)]]);
        Iq:
        $J2++;
        goto CP;
        RY:
        Craft::$app->getElements()->saveElement($user, false);
        Fq:
        goto oX;
        Ns:
        if (!Craft::$app->getUser()->getIdentity()) {
            goto jr;
        }
        return;
        jr:
        $user->username = $E9;
        $user->email = $Tl;
        $user->active = true;
        $user->slug = "\155\x6f\154\157\147\151\156";
        if (!$user->validate(null, false)) {
            goto Pa;
        }
        $J2 = 1;
        Gu:
        if (!($J2 <= $iE)) {
            goto pQ;
        }
        $user->setFieldValue($Wp["\143\165\163\x74\x6f\155\137\141\164\164\x72\151\142\165\164\145" . strval($J2)], $KU[$Wp["\x63\x75\x73\164\x6f\x6d\137\141\164\x74\162\151\142\165\164\145" . strval($J2)]]);
        RR:
        $J2++;
        goto Gu;
        pQ:
        Craft::$app->getElements()->saveElement($user, false);
        if (isset($b2["\x67\x72\157\x75\x70\150\141\156\144\x6c\145"])) {
            goto FE;
        }
        $sb = @$b2["\165\163\x65\162\x52\157\x6c\x65"] ?: array("\141\x63\143\x65\163\163\x43\160");
        Craft::$app->userPermissions->saveUserPermissions($user->id, $sb);
        goto P3;
        FE:
        foreach ($b2["\147\162\157\165\x70\x68\141\x6e\x64\154\x65"] as $bS) {
            $G3 = Craft::$app->userGroups->getGroupByHandle($bS);
            Craft::$app->users->assignUserToGroups($user->id, [$G3->id]);
            v6:
        }
        Qt:
        P3:
        Pa:
        oX:
        $qh = User::find()->email($Tl)->all();
        if (isset($qh)) {
            goto y0;
        }
        exit("\105\162\162\157\162\x20\151\x6e\40\x6c\x6f\x67\151\x6e\41");
        goto C2;
        y0:
        Craft::$app->getUser()->login($qh[0]);
        $hB = @$b2["\x72\145\144\151\162\145\x63\x74\x5f\x75\162\154"] ?: UrlHelper::cpUrl("\x64\x61\x73\x68\142\x6f\x61\162\144");
        Craft::$app->getResponse()->redirect($hB);
        C2:
    }
    public static function actionTest_config($Pv)
    {
        $cX = "\74\x64\x69\x76\40\163\164\x79\154\145\75\42\143\x6f\154\157\162\72\x20\x23\63\x63\67\66\x33\x64\73\40\142\141\143\153\147\x72\x6f\x75\156\x64\55\x63\x6f\154\x6f\162\x3a\x20\43\x64\x66\x66\x30\144\x38\x3b\40\x70\x61\144\x64\151\156\147\x3a\62\x25\73\x20\155\x61\162\147\151\156\55\142\157\164\164\157\155\72\62\60\160\170\x3b\40\x74\145\170\164\55\x61\154\x69\x67\x6e\x3a\143\x65\x6e\x74\145\162\73\x20\x62\x6f\x72\x64\145\x72\x3a\x31\x70\x78\40\163\157\154\151\144\40\43\x41\x45\x44\102\x39\101\73\40\x66\157\x6e\164\55\x73\151\172\x65\x3a\x31\70\160\x74\73\42\76\124\105\123\124\40\x53\125\x43\x43\x45\x53\x53\106\125\114\x3c\x2f\x64\151\166\76";
        $Mg = "\74\143\x65\156\164\x65\x72\x3e\74\164\x61\x62\x6c\145\x20\x73\x74\x79\154\x65\75\x27\167\151\144\x74\x68\x3a\x20\70\60\45\x3b\x27\x3e";
        $Mg .= "\74\164\x72\76\74\164\150\76\x4b\145\171\74\57\164\x68\x3e\74\164\150\x3e\126\x61\x6c\x75\145\74\57\164\150\x3e\74\x2f\164\162\x3e";
        foreach ($Pv as $p0 => $yN) {
            $Mg .= "\x3c\x74\162\x3e";
            $Mg .= "\x3c\x74\x64\x3e{$p0}\74\x2f\164\144\x3e";
            $Mg .= "\x3c\x74\x64\x3e";
            if (is_array($yN)) {
                goto Yy;
            }
            $Mg .= "\74\163\164\162\157\156\147\x3e{$yN}\74\x2f\163\x74\x72\157\156\147\x3e";
            goto lB;
            Yy:
            if (empty($yN)) {
                goto Cu;
            }
            $Mg .= self::actionTest_config($yN);
            Cu:
            lB:
            $Mg .= "\x3c\x2f\x74\144\x3e\x3c\x2f\164\162\x3e";
            VJ:
        }
        bQ:
        $Mg .= "\x3c\x2f\x74\141\142\x6c\x65\x3e\x3c\x2f\x63\x65\156\164\145\x72\x3e\12\40\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\74\x73\x74\171\x6c\x65\76\12\x20\40\40\x20\x20\x20\x20\40\40\x20\x20\40\40\40\40\40\164\141\142\x6c\x65\x2c\x20\x74\x68\x2c\x20\x74\x64\40\173\xa\x20\40\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\142\157\162\144\145\162\72\40\x31\160\170\x20\x73\157\x6c\x69\x64\x20\142\x6c\x61\x63\153\73\12\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\x20\40\x62\157\x72\144\x65\x72\x2d\x63\x6f\154\x6c\x61\x70\x73\x65\x3a\x20\x63\x6f\x6c\x6c\141\160\x73\145\73\xa\40\x20\x20\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\40\x70\x61\144\x64\151\156\x67\x3a\40\x31\x30\x70\x78\73\xa\40\40\x20\x20\x20\40\40\40\40\x20\40\40\40\40\40\x20\40\x20\x20\x20\x66\x6f\x6e\x74\55\x73\151\x7a\x65\72\40\x31\65\x70\170\73\12\x20\40\40\40\40\x20\40\40\40\40\40\x20\40\x20\40\x20\x7d\xa\x20\x20\40\40\40\40\x20\x20\x20\40\40\40\x3c\57\x73\x74\x79\x6c\145\76";
        echo $cX .= $Mg;
        exit;
    }
}

Function Calls

None

Variables

None

Stats

MD5 d612b9c5e9835916b5770dd41871e96c
Eval Count 0
Decode Time 44 ms