Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

function miniorange_saml_idp_update_8306() { $hZ = \Drupal::database(); $CS = $..

Decoded Output download

<?  function miniorange_saml_idp_update_8306() 
{ 
    $hZ = \Drupal::database(); 
    $CS = $hZ->select("miniorange_saml_idp_spdata", "mo_table")->fields("mo_table", ["id", "mo_idp_profile_attributes "]); 
    $f6 = $CS->execute()->fetchAll(); 
    foreach ($f6 as $N2) { 
        $LK = $N2->mo_idp_profile_attributes; 
        $Wn = @unserialize($LK); 
        $Xd = FALSE; 
        if (!is_array($Wn)) { 
            goto bQ; 
        } 
        foreach ($Wn as $aC) { 
            if (!isset($aC["id"])) { 
                goto wy; 
            } 
            $Xd = TRUE; 
            goto TT; 
            wy: 
            fY: 
        } 
        TT: 
        bQ: 
        if (!(!empty($Wn) && $Xd)) { 
            goto OD; 
        } 
        $oy = []; 
        foreach ($Wn as $HJ => $aC) { 
            $Zy = $aC["profile_type"]; 
            $rB = explode(";", $aC["attribute_name"]); 
            foreach ($rB as $Lw) { 
                [$I0, $bA] = explode(":", $Lw); 
                $mR = \Drupal::service("uuid")->generate(); 
                $oy[$mR] = ["profile_type" => $Zy, "profile_field" => $I0, "attribute_name" => $bA]; 
                Ve: 
            } 
            vT: 
            Kd: 
        } 
        Gr: 
        try { 
            $hZ->update("miniorange_saml_idp_spdata")->fields(["mo_idp_profile_attributes" => Json::encode($oy)])->condition("id", $N2->id, "=")->execute(); 
        } catch (Exception $nl) { 
            \Drupal::logger("miniorange_saml_idp")->error($nl); 
            return t("Something went wrong while updating the miniOrange IdP table. Please see recent logs for more details."); 
        } 
        OD: 
        Y2: 
    } 
    yR: 
} ?>

Did this file decode correctly?

Original Code

function miniorange_saml_idp_update_8306()
{
    $hZ = \Drupal::database();
    $CS = $hZ->select("\155\x69\x6e\151\x6f\162\x61\x6e\x67\145\137\x73\x61\x6d\154\137\151\144\x70\x5f\x73\x70\144\141\x74\x61", "\155\x6f\137\x74\x61\x62\154\x65")->fields("\x6d\157\137\x74\x61\142\x6c\145", ["\151\144", "\x6d\157\137\151\x64\160\x5f\160\x72\x6f\x66\x69\x6c\145\x5f\141\164\x74\162\x69\x62\x75\x74\x65\163\40"]);
    $f6 = $CS->execute()->fetchAll();
    foreach ($f6 as $N2) {
        $LK = $N2->mo_idp_profile_attributes;
        $Wn = @unserialize($LK);
        $Xd = FALSE;
        if (!is_array($Wn)) {
            goto bQ;
        }
        foreach ($Wn as $aC) {
            if (!isset($aC["\151\x64"])) {
                goto wy;
            }
            $Xd = TRUE;
            goto TT;
            wy:
            fY:
        }
        TT:
        bQ:
        if (!(!empty($Wn) && $Xd)) {
            goto OD;
        }
        $oy = [];
        foreach ($Wn as $HJ => $aC) {
            $Zy = $aC["\x70\162\x6f\146\151\154\x65\137\x74\171\x70\x65"];
            $rB = explode("\x3b", $aC["\141\164\x74\x72\151\x62\165\164\145\x5f\x6e\x61\155\145"]);
            foreach ($rB as $Lw) {
                [$I0, $bA] = explode("\72", $Lw);
                $mR = \Drupal::service("\165\x75\x69\144")->generate();
                $oy[$mR] = ["\x70\162\x6f\146\151\154\x65\137\164\171\160\145" => $Zy, "\160\162\x6f\146\x69\154\x65\137\x66\151\145\154\144" => $I0, "\x61\164\164\x72\x69\x62\165\x74\145\x5f\156\141\155\145" => $bA];
                Ve:
            }
            vT:
            Kd:
        }
        Gr:
        try {
            $hZ->update("\x6d\151\x6e\151\157\162\141\x6e\x67\x65\137\163\141\155\154\137\151\144\x70\x5f\163\x70\x64\141\x74\141")->fields(["\x6d\157\137\x69\144\x70\137\160\162\157\146\151\154\145\137\141\164\x74\162\151\142\x75\164\x65\x73" => Json::encode($oy)])->condition("\151\144", $N2->id, "\x3d")->execute();
        } catch (Exception $nl) {
            \Drupal::logger("\x6d\x69\x6e\151\157\162\141\156\x67\145\x5f\163\x61\155\x6c\137\x69\144\x70")->error($nl);
            return t("\x53\x6f\155\x65\x74\x68\x69\156\x67\40\x77\145\x6e\x74\40\x77\x72\157\156\x67\40\167\x68\151\154\x65\40\x75\x70\x64\141\164\x69\156\x67\40\x74\x68\x65\40\155\x69\x6e\151\117\x72\141\156\147\145\x20\x49\x64\120\40\x74\141\142\x6c\145\x2e\40\x50\x6c\145\x61\x73\145\x20\x73\145\145\40\x72\145\x63\145\156\x74\x20\x6c\157\x67\x73\x20\x66\x6f\162\x20\155\x6f\x72\145\40\x64\145\164\x61\x69\x6c\x73\x2e");
        }
        OD:
        Y2:
    }
    yR:
}

Function Calls

None

Variables

None

Stats

MD5 a02395b54e951e40c25a6289b3dcf331
Eval Count 0
Decode Time 32 ms