/* Decoded by unphp.net */ getRequestTime() - 7200, "/")) { goto t6; } \Drupal::logger("miniorange_saml_idp")->error(t("Something went wrong while unsetting the cookie %cookie_name.", array("%cookie_name" => "miniOrange2faInvokedSuccessfully"))); goto vv; t6: \Drupal::logger("miniorange_saml_idp")->info(t("Unset the cookie %cookie_name successfully.", array("%cookie_name" => "miniOrange2faInvokedSuccessfully"))); vv: $user = \Drupal::currentUser(); if (!empty($_REQUEST["SAMLRequest"])) { goto Ob; } if (isset($_COOKIE["slo_initiator"])) { goto dn; } $q9 = isset($_COOKIE["response_params"]) ? JSON::decode($_COOKIE["response_params"]) : array(); foreach ($q9 as $eo => $wp) { $wp = Utilities::moIDPSanitizeParameters($wp); $eo = filter_var($eo, FILTER_VALIDATE_INT); $XS = new MiniorangeSAMLSP($eo); $Pt = $XS->getMoIdpNameidFormat(); $Cx = $XS->getMoIdpSpIssuer(); $F0 = $XS->getMoIdpSloUrl(); if (!($F0 == '')) { goto LO; } Utilities::moIDPSetCookie("response_params", Json::encode($q9), time() - 7200); \Drupal::moduleHandler()->invokeAll("user_logout", [$user]); session_destroy(); $W9 = new RedirectResponse($base_url); $W9->send(); return new Response(); LO: unset($q9[$eo]); Utilities::moIDPSetCookie("response_params", Json::encode($q9), time() + 7200); $VE = $base_url . "/?q=admin/config/people/miniorange_saml_idp/"; $this->mo_idp_send_logout_request($eo, $Pt, $VE, $F0); FI: } Hx: if (!isset($_COOKIE["response_params"])) { goto In; } unset($_COOKIE["response_params"]); Utilities::moIDPSetCookie("response_params", '', time() - 3600); In: $F3 = $base_url; \Drupal::moduleHandler()->invokeAll("user_logout", [$user]); session_destroy(); $W9 = new RedirectResponse($F3); $W9->send(); return new Response(); goto in; dn: $gY = JSON::decode($_COOKIE["slo_initiator"]); $gY = Utilities::moIDPSanitizeParameters($gY); $q9 = isset($_COOKIE["response_params"]) ? JSON::decode($_COOKIE["response_params"]) : array(); if (sizeof($q9) > 0) { goto Rk; } unset($_COOKIE["response_params"]); Utilities::moIDPSetCookie("response_params", '', time() - 3600); unset($_COOKIE["slo_initiator"]); Utilities::moIDPSetCookie("slo_initiator", '', time() - 3600); $n5 = $_SESSION["base64EncodedXML"]; \Drupal::moduleHandler()->invokeAll("user_logout", [$user]); session_destroy(); if (!str_contains($gY["destination"], "learnworlds.com")) { goto Hd; } $W9 = new RedirectResponse($gY["destination"]); $W9->send(); return new Response(); Hd: $this->_send_logout_response($n5, $gY["relayState"], $gY["destination"]); goto ra; Rk: foreach ($q9 as $FL => $wp) { $wp = Utilities::moIDPSanitizeParameters($wp); $eo = filter_var($FL, FILTER_VALIDATE_INT); $XS = new MiniorangeSAMLSP($eo); $Pt = $XS->getMoIdpNameidFormat(); $Cx = $XS->getMoIdpSpIssuer(); $F0 = $XS->getMoIdpSloUrl(); if (!($F0 == '')) { goto tM; } \Drupal::moduleHandler()->invokeAll("user_logout", [$user]); session_destroy(); $W9 = new RedirectResponse($base_url); $W9->send(); return new Response(); tM: unset($q9[$FL]); Utilities::moIDPSetCookie("response_params", Json::encode($q9), time() + 7200); $VE = $base_url . "/?q=admin/config/people/miniorange_saml_idp/"; $this->mo_idp_send_logout_request($eo, $Pt, $VE, $F0); iX: } ef: ra: in: Ob: if (array_key_exists("SAMLRequest", $_REQUEST) && !empty($_REQUEST["SAMLRequest"])) { goto ff; } if (array_key_exists("SAMLResponse", $_REQUEST) && !empty($_REQUEST["SAMLResponse"])) { goto Rf; } goto pK; ff: $TD = gzinflate(base64_decode($_REQUEST["SAMLRequest"])); if ($TD !== FALSE) { goto l7; } $M2 = base64_decode($_REQUEST["SAMLRequest"]); goto NX; l7: $M2 = $TD; NX: $P0 = new DOMDocument(); if (!(\PHP_VERSION_ID < 80000)) { goto V9; } libxml_disable_entity_loader(true); V9: $P0->loadXML($M2); $eQ = $P0->firstChild; $Ta = "/"; if (!array_key_exists("RelayState", $_REQUEST)) { goto XN; } $NR = $_REQUEST["RelayState"]; $NR = str_replace(""", """, $NR); XN: if (!($eQ->localName == "LogoutRequest")) { goto dB; } $a8 = new LogoutRequest($eQ); $F6 = $a8->getId(); $Cx = $a8->getIssuer(); $XS = new MiniorangeSAMLSP(); $mI = $XS->sqlQueryWithWhereClause("*", "mo_idp_sp_issuer", $Cx); $La = $mI[0]->mo_idp_slo_url; $mA = $mI[0]->mo_idp_logout_binding_type; $kP = $mI[0]->mo_idp_response_signed; if ($mA == 1) { goto rG; } $mA = "HTTP-Redirect"; goto iO; rG: $mA = "HTTP-POST"; iO: $VE = $base_url . "/?q=admin/config/people/miniorange_saml_idp/"; $QF = Utilities::createLogoutResponse($F6, $VE, $La, $mA); $ET = \Drupal::config("miniorange_saml_idp.settings")->get("miniorange_saml_private_certificate"); $tC = \Drupal::config("miniorange_saml_idp.settings")->get("miniorange_saml_publ_certificate"); if (!empty($ET) && !empty($tC)) { goto ko; } $w4 = MiniorangeSAMLIdpConstants::Miniorange_saml_idp_key; $SR = MiniorangeSAMLIdpConstants::Miniorange_saml_idp_certificate; goto WN; ko: $w4 = $ET; $SR = $tC; WN: $n5 = Utilities::signXML($mA, $QF, $SR, $w4, $kP); dB: $a8 = new LogoutRequest($eQ); $Cx = $a8->getIssuer(); $XS = new MiniorangeSAMLSP(); $mI = $XS->sqlQueryWithWhereClause("*", "mo_idp_sp_issuer", $Cx); $eo = $mI[0]->id; $q9 = isset($_COOKIE["response_params"]) ? JSON::decode($_COOKIE["response_params"]) : array(); $gY = Utilities::moIDPSanitizeParameters($q9[$eo]); $gY["id"] = $eo; $_SESSION["base64EncodedXML"] = $n5; $gY["destination"] = $La; Utilities::moIDPSetCookie("slo_initiator", Json::encode($gY), time() + 7200); unset($q9[$eo]); Utilities::moIDPSetCookie("response_params", Json::encode($q9), time() + 7200); foreach ($q9 as $eo => $wp) { $wp = Utilities::moIDPSanitizeParameters($wp); $eo = filter_var($eo, FILTER_VALIDATE_INT); $XS = new MiniorangeSAMLSP($eo); $Pt = $XS->getMoIdpNameidFormat(); $Cx = $XS->getMoIdpSpIssuer(); $F0 = $XS->getMoIdpSloUrl(); unset($q9[$eo]); Utilities::moIDPSetCookie("response_params", Json::encode($q9), time() + 7200); $VE = $base_url . "/?q=admin/config/people/miniorange_saml_idp/"; $this->mo_idp_send_logout_request($eo, $Pt, $VE, $F0); mY: } je: $F3 = $base_url . "/user/logout/"; $W9 = new RedirectResponse($F3); $W9->send(); return new Response(); goto pK; Rf: $this->_read_saml_response($_REQUEST, \Drupal::request()->query->getIterator()->getArrayCopy()); pK: return new Response(); } ?>