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 mo_saml_checkMapping($Mq, $V2, $Gd, $Q_) { try { $TE = get_option(..

Decoded Output download

<?  function mo_saml_checkMapping($Mq, $V2, $Gd, $Q_) 
{ 
    try { 
        $TE = get_option("saml_idp_attribute_mapping"); 
        $TE = maybe_unserialize($TE); 
        $l1 = get_option("saml_idp_role_mapping"); 
        $l1 = maybe_unserialize($l1); 
        $K8 = "NameID"; 
        $gi = "NameID"; 
        $nq = ''; 
        $qN = ''; 
        $pX = ''; 
        $wm = ''; 
        $x3 = ''; 
        $RI = ''; 
        $DG = check_if_default_mapping_required(true, $Mq["idp_name"]); 
        if ($DG) { 
            goto R0X; 
        } 
        $Hh = $Mq["idp_name"]; 
        goto Pyk; 
        R0X: 
        $Hh = "DEFAULT"; 
        Pyk: 
        if (empty($TE[$Hh])) { 
            goto sBz; 
        } 
        $K8 = $TE[$Hh]["email"]; 
        $gi = $TE[$Hh]["username"]; 
        $nq = $TE[$Hh]["first_name"]; 
        $qN = $TE[$Hh]["last_name"]; 
        $pX = $TE[$Hh]["group_name"]; 
        $RI = $TE[$Hh]["display_name"]; 
        if (empty($TE[$Hh]["saml_am_account_matcher"])) { 
            goto i32; 
        } 
        $nT = $TE[$Hh]["saml_am_account_matcher"]; 
        i32: 
        sBz: 
        if (empty($V2)) { 
            goto ARO; 
        } 
        if (empty($V2[$nq])) { 
            goto Uhu; 
        } 
        $nq = $V2[$nq][0]; 
        Uhu: 
        if (empty($V2[$qN])) { 
            goto cnX; 
        } 
        $qN = $V2[$qN][0]; 
        cnX: 
        if (!empty($V2[$gi])) { 
            goto Dgc; 
        } 
        $x3 = $V2["NameID"][0]; 
        goto Alj; 
        Dgc: 
        $x3 = $V2[$gi][0]; 
        Alj: 
        if (!empty($V2[$K8])) { 
            goto k19; 
        } 
        $wm = $V2["NameID"][0]; 
        goto P1R; 
        k19: 
        $wm = $V2[$K8][0]; 
        P1R: 
        if (!empty($V2[$pX])) { 
            goto KRe; 
        } 
        $pX = array(); 
        goto HKF; 
        KRe: 
        $pX = $V2[$pX]; 
        HKF: 
        if (!empty($nT)) { 
            goto vIW; 
        } 
        $nT = "email"; 
        vIW: 
        ARO: 
        if ($Gd == "testValidate" || $Gd == "testNewCertificate") { 
            goto OOw; 
        } 
        mo_saml_login_user($wm, $nq, $qN, $x3, $pX, $Gd, $nT, $Mq, $Q_, $V2["NameID"][0], $RI, $V2); 
        goto hHM; 
        OOw: 
        $Qm = get_option("saml_identity_providers"); 
        $Qm = maybe_unserialize($Qm); 
        $JR = $Mq["idp_name"]; 
        $Bq = array("test_status" => "Test successful"); 
        if (empty($JR)) { 
            goto xxg; 
        } 
        $Qm[$JR] = Utilities::mo_saml_array_merge($Qm[$JR], $Bq); 
        $Qm = array_filter($Qm, "filter_empty_values"); 
        update_option("saml_identity_providers", $Qm); 
        xxg: 
        mo_saml_show_test_result($nq, $qN, $wm, $pX, $V2, $Mq); 
        hHM: 
    } catch (Exception $OG) { 
        echo sprintf("An error occurred while processing the SAML Response."); 
        exit; 
    } 
} ?>

Did this file decode correctly?

Original Code

function mo_saml_checkMapping($Mq, $V2, $Gd, $Q_)
{
    try {
        $TE = get_option("\x73\x61\x6d\x6c\137\x69\144\160\137\x61\x74\x74\x72\x69\142\165\164\145\137\155\x61\160\160\x69\x6e\147");
        $TE = maybe_unserialize($TE);
        $l1 = get_option("\163\x61\155\154\137\151\x64\160\x5f\x72\x6f\x6c\145\x5f\x6d\141\160\160\x69\x6e\147");
        $l1 = maybe_unserialize($l1);
        $K8 = "\116\x61\x6d\x65\111\x44";
        $gi = "\116\141\x6d\x65\111\x44";
        $nq = '';
        $qN = '';
        $pX = '';
        $wm = '';
        $x3 = '';
        $RI = '';
        $DG = check_if_default_mapping_required(true, $Mq["\151\144\160\x5f\x6e\x61\x6d\x65"]);
        if ($DG) {
            goto R0X;
        }
        $Hh = $Mq["\x69\144\160\137\x6e\x61\155\145"];
        goto Pyk;
        R0X:
        $Hh = "\104\x45\106\101\125\x4c\x54";
        Pyk:
        if (empty($TE[$Hh])) {
            goto sBz;
        }
        $K8 = $TE[$Hh]["\x65\155\x61\x69\x6c"];
        $gi = $TE[$Hh]["\x75\x73\145\162\156\x61\155\x65"];
        $nq = $TE[$Hh]["\146\x69\x72\x73\164\137\156\141\x6d\x65"];
        $qN = $TE[$Hh]["\154\x61\163\x74\x5f\156\141\155\145"];
        $pX = $TE[$Hh]["\147\x72\x6f\x75\160\137\156\141\x6d\145"];
        $RI = $TE[$Hh]["\144\151\x73\x70\154\141\x79\x5f\156\x61\155\x65"];
        if (empty($TE[$Hh]["\x73\x61\x6d\154\137\x61\x6d\x5f\141\x63\x63\x6f\165\156\164\x5f\x6d\x61\164\143\150\x65\x72"])) {
            goto i32;
        }
        $nT = $TE[$Hh]["\x73\x61\155\154\x5f\141\155\137\x61\x63\143\157\x75\x6e\164\x5f\x6d\x61\164\143\x68\x65\x72"];
        i32:
        sBz:
        if (empty($V2)) {
            goto ARO;
        }
        if (empty($V2[$nq])) {
            goto Uhu;
        }
        $nq = $V2[$nq][0];
        Uhu:
        if (empty($V2[$qN])) {
            goto cnX;
        }
        $qN = $V2[$qN][0];
        cnX:
        if (!empty($V2[$gi])) {
            goto Dgc;
        }
        $x3 = $V2["\x4e\141\155\145\x49\104"][0];
        goto Alj;
        Dgc:
        $x3 = $V2[$gi][0];
        Alj:
        if (!empty($V2[$K8])) {
            goto k19;
        }
        $wm = $V2["\116\141\155\x65\111\104"][0];
        goto P1R;
        k19:
        $wm = $V2[$K8][0];
        P1R:
        if (!empty($V2[$pX])) {
            goto KRe;
        }
        $pX = array();
        goto HKF;
        KRe:
        $pX = $V2[$pX];
        HKF:
        if (!empty($nT)) {
            goto vIW;
        }
        $nT = "\x65\x6d\141\x69\154";
        vIW:
        ARO:
        if ($Gd == "\164\x65\163\164\x56\x61\154\151\x64\x61\164\145" || $Gd == "\x74\x65\163\x74\116\145\167\103\145\x72\x74\x69\146\151\x63\141\x74\145") {
            goto OOw;
        }
        mo_saml_login_user($wm, $nq, $qN, $x3, $pX, $Gd, $nT, $Mq, $Q_, $V2["\116\x61\155\145\x49\104"][0], $RI, $V2);
        goto hHM;
        OOw:
        $Qm = get_option("\163\141\155\x6c\x5f\x69\x64\x65\x6e\x74\x69\164\171\137\160\162\x6f\166\151\144\x65\162\163");
        $Qm = maybe_unserialize($Qm);
        $JR = $Mq["\x69\x64\x70\137\x6e\141\155\145"];
        $Bq = array("\164\x65\x73\x74\137\163\164\x61\x74\x75\x73" => "\124\145\163\x74\40\x73\165\143\x63\x65\x73\x73\146\165\154");
        if (empty($JR)) {
            goto xxg;
        }
        $Qm[$JR] = Utilities::mo_saml_array_merge($Qm[$JR], $Bq);
        $Qm = array_filter($Qm, "\146\x69\154\164\145\x72\137\145\155\x70\164\x79\137\x76\141\x6c\165\145\x73");
        update_option("\x73\x61\x6d\x6c\137\151\144\x65\156\x74\x69\x74\171\x5f\160\x72\x6f\x76\151\144\145\162\x73", $Qm);
        xxg:
        mo_saml_show_test_result($nq, $qN, $wm, $pX, $V2, $Mq);
        hHM:
    } catch (Exception $OG) {
        echo sprintf("\101\156\40\145\x72\162\x6f\162\40\x6f\x63\x63\165\162\x72\x65\144\x20\x77\x68\151\154\145\x20\160\x72\x6f\143\145\x73\163\151\156\x67\x20\164\x68\145\40\x53\x41\x4d\114\40\122\145\x73\x70\x6f\x6e\163\145\x2e");
        exit;
    }
}

Function Calls

None

Variables

None

Stats

MD5 db535b202ec2b721fba7f489f5aec147
Eval Count 0
Decode Time 45 ms