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 MiniOrange\OAuth\Helper; use Magento\Customer\Model\CustomerFactor..
Decoded Output download
<?php
namespace MiniOrange\OAuth\Helper;
use Magento\Customer\Model\CustomerFactory;
use Magento\Customer\Model\Session;
use Magento\Framework\App\Cache\Frontend\Pool;
use Magento\Framework\App\Cache\TypeListInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\Config\Storage\WriterInterface;
use Magento\Framework\Filesystem\Driver\File;
use Magento\Framework\Url;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\Asset\Repository;
use Magento\User\Model\UserFactory;
use Psr\Log\LoggerInterface;
use MiniOrange\OAuth\Helper\OAuthConstants;
use MiniOrange\OAuth\Helper\Curl;
use MiniOrange\OAuth\Helper\Data;
use MiniOrange\OAuth\Helper\Exception\InvalidOperationException;
use MiniOrange\OAuth\Helper\OAuth\lib\AESEncryption;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\Message\ManagerInterface;
use Magento\Store\Model\ScopeInterface;
use Magento\Framework\Stdlib\DateTime\DateTime;
use Magento\Framework\App\ProductMetadataInterface;
class OAuthUtility extends Data
{
protected $adminSession;
protected $customerSession;
protected $authSession;
protected $cacheTypeList;
protected $cacheFrontendPool;
protected $fileSystem;
protected $reinitableConfig;
protected $logger;
protected $resource;
protected $_websiteCollectionFactory;
protected $helperBackend;
protected $_logger;
protected $fileFactory;
protected $productMetadata;
protected $_response;
protected $resultFactory;
protected $pageFactory;
protected $messageManager;
protected $dateTime;
public function __construct(ScopeConfigInterface $Ak, UserFactory $s0, CustomerFactory $qw, UrlInterface $CV, WriterInterface $Zg, Repository $Bm, \Magento\Backend\Helper\Data $w4, Url $YI, \MiniOrange\OAuth\Model\MiniorangeOauthClientAppsFactory $xg, \Magento\Backend\Model\Session $Rv, Session $sy, \Magento\Backend\Model\Auth\Session $dK, TypeListInterface $NK, Pool $NU, LoggerInterface $Xg, \Magento\Store\Model\ResourceModel\Website\CollectionFactory $Kt, File $fK, \Magento\Framework\App\Response\Http\FileFactory $IF, \Magento\Framework\App\Config\ReinitableConfigInterface $qv, \Magento\Framework\App\ResourceConnection $WL, \MiniOrange\OAuth\Logger\Logger $dy, \Magento\Framework\App\ProductMetadataInterface $U6, \Magento\Framework\App\ResponseInterface $db, ResultFactory $cE, PageFactory $mm, DateTime $fr, ManagerInterface $yR)
{
$this->adminSession = $Rv;
$this->customerSession = $sy;
$this->authSession = $dK;
$this->cacheTypeList = $NK;
$this->cacheFrontendPool = $NU;
$this->fileSystem = $fK;
$this->logger = $Xg;
$this->_logger = $dy;
$this->reinitableConfig = $qv;
$this->resource = $WL;
$this->fileFactory = $IF;
$this->productMetadata = $U6;
$this->_websiteCollectionFactory = $Kt;
$this->_response = $db;
$this->resultFactory = $cE;
$this->pageFactory = $mm;
$this->messageManager = $yR;
$this->dateTime = $fr;
parent::__construct($Ak, $s0, $qw, $CV, $Zg, $Bm, $w4, $YI, $fr, $U6, $xg);
}
public function log_debug($mr = '', $kD = null)
{
if (is_object($mr)) {
goto n8;
}
$this->customlog("MO OAuth AllInclusive : " . $mr);
goto bR;
n8:
$this->customlog("MO OAuth AllInclusive : " . print_r($kD, true));
bR:
if (!($kD != null)) {
goto t9;
}
$this->customlog("MO OAuth AllInclusive : " . var_export($kD, true));
t9:
}
public function base64url_encode($H2)
{
return rtrim(strtr(base64_encode($H2), "+/", "-_"), "=");
}
public function ccl()
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::ccl($vS, $lh);
return $n1;
}
public function update_status($xj)
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::update_status($vS, $lh, $xj, $this->getBaseUrl());
return $n1;
}
public function vml($xj)
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::vml($vS, $lh, $xj, $this->getBaseUrl());
return $n1;
}
public function getHiddenPhone($PK)
{
$HQ = "xxxxxxx" . substr($PK, strlen($PK) - 3);
return $HQ;
}
public function isBlank($wk)
{
if (!(!isset($wk) || empty($wk))) {
goto q3;
}
return true;
q3:
return false;
}
public function isCurlInstalled()
{
if (in_array("curl", get_loaded_extensions())) {
goto SN;
}
return 0;
goto Qk;
SN:
return 1;
Qk:
}
public function getAdminUserById($P4)
{
$user = $this->adminFactory->create()->load($P4);
return $user;
}
public function getHiddenEmail($wx)
{
if (!(!isset($wx) || trim($wx) === '')) {
goto Ya;
}
return '';
Ya:
$Jg = strlen($wx);
$wZ = substr($wx, 0, 1);
$uW = strrpos($wx, "@");
$uj = substr($wx, $uW - 1, $Jg);
$Ji = 1;
Tw:
if (!($Ji < $uW)) {
goto fJ;
}
$wZ = $wZ . "x";
tv:
$Ji++;
goto Tw;
fJ:
$vw = $wZ . $uj;
return $vw;
}
public function getAdminSession()
{
return $this->adminSession;
}
public function setAdminSessionData($ol, $wk)
{
$this->adminSession->setData($ol, $wk);
}
public function getAdminSessionData($ol, $hf = false)
{
return $this->adminSession->getData($ol, $hf);
}
public function setSessionData($ol, $wk)
{
$this->customerSession->setData($ol, $wk);
}
public function getSessionData($ol, $hf = false)
{
return $this->customerSession->getData($ol, $hf);
}
public function unsetSessionData($ol)
{
$this->customerSession->unsData($ol);
}
public function setSessionDataForCurrentUser($ol, $wk)
{
if ($this->customerSession->isLoggedIn()) {
goto G7;
}
if ($this->authSession->isLoggedIn()) {
goto hI;
}
goto Ap;
G7:
$this->setSessionData($ol, $wk);
goto Ap;
hI:
$this->setAdminSessionData($ol, $wk);
Ap:
}
public function isOAuthConfigured()
{
$my = $this->getStoreConfig(OAuthConstants::AUTHORIZE_URL);
return $this->isBlank($my) ? false : true;
}
public function micr()
{
if (!$this->check_plan(4)) {
goto zE;
}
return true;
zE:
$wx = $this->getStoreConfig(OAuthConstants::CUSTOMER_EMAIL);
$ol = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
return !$this->isBlank($wx) && !$this->isBlank($ol) ? true : false;
}
public function mclv()
{
if (!$this->check_plan(4)) {
goto Ch;
}
return true;
Ch:
$ie = $this->getStoreConfig(OAuthConstants::TOKEN);
$Ha = AESEncryption::decrypt_data($this->getStoreConfig(OAuthConstants::OAUTH_CKL), $ie);
$qz = $this->getStoreConfig(OAuthConstants::OAUTH_LK);
return $Ha == "true" && !$this->isBlank($qz) ? true : false;
}
public function mius()
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$ie = $this->getStoreConfig(OAuthConstants::TOKEN);
$xj = AESEncryption::decrypt_data($this->getStoreConfig(OAuthConstants::OAUTH_LK), $ie);
$n1 = Curl::mius($vS, $lh, $xj);
return $n1;
}
public function isUserLoggedIn()
{
return $this->customerSession->isLoggedIn() || $this->authSession->isLoggedIn();
}
public function getCurrentAdminUser()
{
return $this->authSession->getUser();
}
public function getCurrentUser()
{
return $this->customerSession->getCustomer();
}
public function getAdminLoginUrl()
{
return $this->getAdminUrl("adminhtml/auth/login");
}
public function getAdminPageUrl()
{
return $this->getAdminBaseUrl();
}
public function getCustomerLoginUrl()
{
return $this->getUrl("customer/account/login");
}
public function getIsTestConfigurationClicked()
{
return $this->getStoreConfig(OAuthConstants::IS_TEST);
}
public function flushCache($jG = '')
{
$kQ = ["db_ddl"];
foreach ($kQ as $dg) {
$this->cacheTypeList->cleanType($dg);
zM:
}
iy:
foreach ($this->cacheFrontendPool as $Iu) {
$Iu->getBackend()->clean();
Tr:
}
DP:
}
public function getFileContents($xs)
{
return $this->fileSystem->fileGetContents($xs);
}
public function putFileContents($xs, $H2)
{
$this->fileSystem->filePutContents($xs, $H2);
}
public function getLogoutUrl()
{
if (!$this->customerSession->isLoggedIn()) {
goto H2;
}
return $this->getUrl("customer/account/logout");
H2:
if (!$this->authSession->isLoggedIn()) {
goto bH;
}
return $this->getAdminUrl("adminhtml/auth/logout");
bH:
return "/";
}
public function getCallBackUrl()
{
return $this->getBaseUrl() . OAuthConstants::CALLBACK_URL;
}
public function removeSignInSettings()
{
$this->setStoreConfig(OAuthConstants::SHOW_CUSTOMER_LINK, 0);
$this->setStoreConfig(OAuthConstants::SHOW_ADMIN_LINK, 0);
}
public function reinitConfig()
{
$this->reinitableConfig->reinit();
}
public function getCurrentUrl()
{
return $this->urlInterface->getCurrentUrl();
}
public function getAutoCreateAdmin()
{
return $this->getStoreConfig(OAuthConstants::AUTO_CREATE_ADMIN);
}
public function getAutoCreateCustomer()
{
return $this->getStoreConfig(OAuthConstants::AUTO_CREATE_CUSTOMER);
}
public function logInfo($mr)
{
$this->logger->info($mr);
}
public function updateColumnInTable($Vk, $c9, $G5, $Vi, $MS)
{
$this->log_debug("updateColumnInTable " . $c9);
$yf = $this->resource->getConnection();
if (!($yf->tableColumnExists($Vk, $c9) === false)) {
goto Cl;
}
$yf->addColumn($Vk, $c9, array("type" => "text", "nullable" => false, "length" => 255, "after" => null, "comment" => $c9));
Cl:
$this->resource->getConnection()->update($Vk, [$c9 => $G5], [$Vi . " = ?" => $MS]);
}
public function getWebsiteCollection()
{
$yx = $this->_websiteCollectionFactory->create();
return $yx;
}
public function isAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto mL;
}
return 0;
goto Lw;
mL:
return $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT);
Lw:
}
public function isb2bAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto Lb;
}
return 0;
goto yQ;
Lb:
return $this->getStoreConfig(OAuthConstants::B2B_AUTO_REDIRECT);
yQ:
}
public function isAllPageAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto kl;
}
return 0;
goto oy;
kl:
return $this->getStoreConfig(OAuthConstants::ALL_PAGE_AUTO_REDIRECT);
oy:
}
public function checkIfFlowStartedFromBackend($hq)
{
$zi = $this->helperBackend->getAreaFrontName();
if (!str_contains($hq, $zi)) {
goto n5;
}
$this->log_debug("checkIfFlowStartedFromBackend: true");
return true;
n5:
$this->log_debug("checkIfFlowStartedFromBackend: false");
return false;
}
public function customlog($Lu)
{
$this->isLogEnable() ? $this->_logger->debug($Lu) : null;
}
public function isCustomLogExist()
{
if ($this->fileSystem->isExists("../var/log/mo_oauth.log")) {
goto Wp;
}
if ($this->fileSystem->isExists("var/log/mo_oauth.log")) {
goto bC;
}
goto CJ;
Wp:
return 1;
goto CJ;
bC:
return 1;
CJ:
return 0;
}
public function deleteCustomLogFile()
{
if ($this->fileSystem->isExists("../var/log/mo_oauth.log")) {
goto kV;
}
if ($this->fileSystem->isExists("var/log/mo_oauth.log")) {
goto o0;
}
goto sE;
kV:
$this->fileSystem->deleteFile("../var/log/mo_oauth.log");
goto sE;
o0:
$this->fileSystem->deleteFile("var/log/mo_oauth.log");
sE:
}
public function isLogEnable()
{
return $this->getStoreConfig(OAuthConstants::ENABLE_DEBUG_LOG);
}
public function create_log_file($HD, $n1)
{
return $this->fileFactory->create($HD, $n1, DirectoryList::VAR_DIR);
}
public function get_magento_version()
{
return $this->productMetadata->getVersion();
}
public function check_plan($On)
{
return $this->get_versi() >= $On;
}
public function get_versi()
{
$uq = OAuthConstants::LICENSE_PLAN;
return $uq === "magento_oauth_trial_plan" ? 4 : ($uq === "magento_oauth_enterprise_plan" ? 3 : ($uq === "magento_oauth_premium_plan" ? 2 : ($uq === "magento_oauth_standard_plan" ? 1 : 0)));
}
public function redirectURL($Mx)
{
return $this->_response->setRedirect($Mx)->sendResponse();
}
public function errorPageRedirection($DY)
{
try {
$this->messageManager->addErrorMessage($DY);
$M4 = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$M4->setUrl($this->urlInterface->getUrl("noroute"));
return $M4;
} catch (\Exception $zQ) {
$this->messageManager->addError(__("An error occurred. Please try again."));
$this->_redirect("*/*/");
}
}
public function getDefaultErrorPage()
{
return $this->urlInterface->getUrl("noroute");
}
public function getnormalcustomer()
{
return $this->getStoreConfig(OAuthConstants::NORMAL_CUSTOMER);
}
public function getWebsiteLimit()
{
if (!$this->check_plan(4)) {
goto VB;
}
return 2;
VB:
return $this->getStoreConfig(OAuthConstants::WEBSITES_LIMIT);
}
public function update_customer_id_in_customer_visitor($gL)
{
$this->log_debug("Updating customer_visitor table");
$yf = $this->resource->getConnection();
$fm = $yf->select()->from("customer_visitor", "COUNT(*)");
$Ry = $yf->fetchOne($fm);
$this->resource->getConnection()->update("customer_visitor", ["customer_id" => $gL], ["visitor_id = ?" => $Ry]);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace MiniOrange\OAuth\Helper;
use Magento\Customer\Model\CustomerFactory;
use Magento\Customer\Model\Session;
use Magento\Framework\App\Cache\Frontend\Pool;
use Magento\Framework\App\Cache\TypeListInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\Config\Storage\WriterInterface;
use Magento\Framework\Filesystem\Driver\File;
use Magento\Framework\Url;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\Asset\Repository;
use Magento\User\Model\UserFactory;
use Psr\Log\LoggerInterface;
use MiniOrange\OAuth\Helper\OAuthConstants;
use MiniOrange\OAuth\Helper\Curl;
use MiniOrange\OAuth\Helper\Data;
use MiniOrange\OAuth\Helper\Exception\InvalidOperationException;
use MiniOrange\OAuth\Helper\OAuth\lib\AESEncryption;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\Message\ManagerInterface;
use Magento\Store\Model\ScopeInterface;
use Magento\Framework\Stdlib\DateTime\DateTime;
use Magento\Framework\App\ProductMetadataInterface;
class OAuthUtility extends Data
{
protected $adminSession;
protected $customerSession;
protected $authSession;
protected $cacheTypeList;
protected $cacheFrontendPool;
protected $fileSystem;
protected $reinitableConfig;
protected $logger;
protected $resource;
protected $_websiteCollectionFactory;
protected $helperBackend;
protected $_logger;
protected $fileFactory;
protected $productMetadata;
protected $_response;
protected $resultFactory;
protected $pageFactory;
protected $messageManager;
protected $dateTime;
public function __construct(ScopeConfigInterface $Ak, UserFactory $s0, CustomerFactory $qw, UrlInterface $CV, WriterInterface $Zg, Repository $Bm, \Magento\Backend\Helper\Data $w4, Url $YI, \MiniOrange\OAuth\Model\MiniorangeOauthClientAppsFactory $xg, \Magento\Backend\Model\Session $Rv, Session $sy, \Magento\Backend\Model\Auth\Session $dK, TypeListInterface $NK, Pool $NU, LoggerInterface $Xg, \Magento\Store\Model\ResourceModel\Website\CollectionFactory $Kt, File $fK, \Magento\Framework\App\Response\Http\FileFactory $IF, \Magento\Framework\App\Config\ReinitableConfigInterface $qv, \Magento\Framework\App\ResourceConnection $WL, \MiniOrange\OAuth\Logger\Logger $dy, \Magento\Framework\App\ProductMetadataInterface $U6, \Magento\Framework\App\ResponseInterface $db, ResultFactory $cE, PageFactory $mm, DateTime $fr, ManagerInterface $yR)
{
$this->adminSession = $Rv;
$this->customerSession = $sy;
$this->authSession = $dK;
$this->cacheTypeList = $NK;
$this->cacheFrontendPool = $NU;
$this->fileSystem = $fK;
$this->logger = $Xg;
$this->_logger = $dy;
$this->reinitableConfig = $qv;
$this->resource = $WL;
$this->fileFactory = $IF;
$this->productMetadata = $U6;
$this->_websiteCollectionFactory = $Kt;
$this->_response = $db;
$this->resultFactory = $cE;
$this->pageFactory = $mm;
$this->messageManager = $yR;
$this->dateTime = $fr;
parent::__construct($Ak, $s0, $qw, $CV, $Zg, $Bm, $w4, $YI, $fr, $U6, $xg);
}
public function log_debug($mr = '', $kD = null)
{
if (is_object($mr)) {
goto n8;
}
$this->customlog("\115\x4f\40\x4f\101\165\x74\150\x20\x41\x6c\154\111\156\143\154\x75\163\151\x76\145\40\x3a\40" . $mr);
goto bR;
n8:
$this->customlog("\x4d\117\40\117\101\x75\164\x68\40\x41\154\x6c\111\156\x63\x6c\x75\163\x69\x76\145\x20\x3a\x20" . print_r($kD, true));
bR:
if (!($kD != null)) {
goto t9;
}
$this->customlog("\x4d\x4f\x20\117\x41\x75\x74\150\x20\101\x6c\x6c\x49\x6e\x63\x6c\x75\163\151\x76\145\x20\72\40" . var_export($kD, true));
t9:
}
public function base64url_encode($H2)
{
return rtrim(strtr(base64_encode($H2), "\x2b\57", "\55\137"), "\x3d");
}
public function ccl()
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::ccl($vS, $lh);
return $n1;
}
public function update_status($xj)
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::update_status($vS, $lh, $xj, $this->getBaseUrl());
return $n1;
}
public function vml($xj)
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$n1 = Curl::vml($vS, $lh, $xj, $this->getBaseUrl());
return $n1;
}
public function getHiddenPhone($PK)
{
$HQ = "\x78\x78\170\x78\170\x78\170" . substr($PK, strlen($PK) - 3);
return $HQ;
}
public function isBlank($wk)
{
if (!(!isset($wk) || empty($wk))) {
goto q3;
}
return true;
q3:
return false;
}
public function isCurlInstalled()
{
if (in_array("\143\165\x72\x6c", get_loaded_extensions())) {
goto SN;
}
return 0;
goto Qk;
SN:
return 1;
Qk:
}
public function getAdminUserById($P4)
{
$user = $this->adminFactory->create()->load($P4);
return $user;
}
public function getHiddenEmail($wx)
{
if (!(!isset($wx) || trim($wx) === '')) {
goto Ya;
}
return '';
Ya:
$Jg = strlen($wx);
$wZ = substr($wx, 0, 1);
$uW = strrpos($wx, "\100");
$uj = substr($wx, $uW - 1, $Jg);
$Ji = 1;
Tw:
if (!($Ji < $uW)) {
goto fJ;
}
$wZ = $wZ . "\170";
tv:
$Ji++;
goto Tw;
fJ:
$vw = $wZ . $uj;
return $vw;
}
public function getAdminSession()
{
return $this->adminSession;
}
public function setAdminSessionData($ol, $wk)
{
$this->adminSession->setData($ol, $wk);
}
public function getAdminSessionData($ol, $hf = false)
{
return $this->adminSession->getData($ol, $hf);
}
public function setSessionData($ol, $wk)
{
$this->customerSession->setData($ol, $wk);
}
public function getSessionData($ol, $hf = false)
{
return $this->customerSession->getData($ol, $hf);
}
public function unsetSessionData($ol)
{
$this->customerSession->unsData($ol);
}
public function setSessionDataForCurrentUser($ol, $wk)
{
if ($this->customerSession->isLoggedIn()) {
goto G7;
}
if ($this->authSession->isLoggedIn()) {
goto hI;
}
goto Ap;
G7:
$this->setSessionData($ol, $wk);
goto Ap;
hI:
$this->setAdminSessionData($ol, $wk);
Ap:
}
public function isOAuthConfigured()
{
$my = $this->getStoreConfig(OAuthConstants::AUTHORIZE_URL);
return $this->isBlank($my) ? false : true;
}
public function micr()
{
if (!$this->check_plan(4)) {
goto zE;
}
return true;
zE:
$wx = $this->getStoreConfig(OAuthConstants::CUSTOMER_EMAIL);
$ol = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
return !$this->isBlank($wx) && !$this->isBlank($ol) ? true : false;
}
public function mclv()
{
if (!$this->check_plan(4)) {
goto Ch;
}
return true;
Ch:
$ie = $this->getStoreConfig(OAuthConstants::TOKEN);
$Ha = AESEncryption::decrypt_data($this->getStoreConfig(OAuthConstants::OAUTH_CKL), $ie);
$qz = $this->getStoreConfig(OAuthConstants::OAUTH_LK);
return $Ha == "\164\162\165\145" && !$this->isBlank($qz) ? true : false;
}
public function mius()
{
$vS = $this->getStoreConfig(OAuthConstants::CUSTOMER_KEY);
$lh = $this->getStoreConfig(OAuthConstants::API_KEY);
$ie = $this->getStoreConfig(OAuthConstants::TOKEN);
$xj = AESEncryption::decrypt_data($this->getStoreConfig(OAuthConstants::OAUTH_LK), $ie);
$n1 = Curl::mius($vS, $lh, $xj);
return $n1;
}
public function isUserLoggedIn()
{
return $this->customerSession->isLoggedIn() || $this->authSession->isLoggedIn();
}
public function getCurrentAdminUser()
{
return $this->authSession->getUser();
}
public function getCurrentUser()
{
return $this->customerSession->getCustomer();
}
public function getAdminLoginUrl()
{
return $this->getAdminUrl("\x61\x64\x6d\151\156\150\164\x6d\x6c\x2f\141\x75\164\150\57\154\x6f\147\151\156");
}
public function getAdminPageUrl()
{
return $this->getAdminBaseUrl();
}
public function getCustomerLoginUrl()
{
return $this->getUrl("\x63\x75\x73\x74\x6f\155\x65\x72\57\x61\143\x63\x6f\x75\156\164\57\154\x6f\147\151\x6e");
}
public function getIsTestConfigurationClicked()
{
return $this->getStoreConfig(OAuthConstants::IS_TEST);
}
public function flushCache($jG = '')
{
$kQ = ["\x64\x62\137\144\144\x6c"];
foreach ($kQ as $dg) {
$this->cacheTypeList->cleanType($dg);
zM:
}
iy:
foreach ($this->cacheFrontendPool as $Iu) {
$Iu->getBackend()->clean();
Tr:
}
DP:
}
public function getFileContents($xs)
{
return $this->fileSystem->fileGetContents($xs);
}
public function putFileContents($xs, $H2)
{
$this->fileSystem->filePutContents($xs, $H2);
}
public function getLogoutUrl()
{
if (!$this->customerSession->isLoggedIn()) {
goto H2;
}
return $this->getUrl("\x63\165\163\164\x6f\155\145\162\57\141\143\x63\x6f\x75\156\x74\57\154\157\x67\157\x75\x74");
H2:
if (!$this->authSession->isLoggedIn()) {
goto bH;
}
return $this->getAdminUrl("\141\x64\x6d\151\156\x68\x74\x6d\x6c\57\141\x75\x74\x68\x2f\154\x6f\x67\157\165\164");
bH:
return "\57";
}
public function getCallBackUrl()
{
return $this->getBaseUrl() . OAuthConstants::CALLBACK_URL;
}
public function removeSignInSettings()
{
$this->setStoreConfig(OAuthConstants::SHOW_CUSTOMER_LINK, 0);
$this->setStoreConfig(OAuthConstants::SHOW_ADMIN_LINK, 0);
}
public function reinitConfig()
{
$this->reinitableConfig->reinit();
}
public function getCurrentUrl()
{
return $this->urlInterface->getCurrentUrl();
}
public function getAutoCreateAdmin()
{
return $this->getStoreConfig(OAuthConstants::AUTO_CREATE_ADMIN);
}
public function getAutoCreateCustomer()
{
return $this->getStoreConfig(OAuthConstants::AUTO_CREATE_CUSTOMER);
}
public function logInfo($mr)
{
$this->logger->info($mr);
}
public function updateColumnInTable($Vk, $c9, $G5, $Vi, $MS)
{
$this->log_debug("\x75\160\x64\x61\x74\x65\x43\157\154\165\x6d\x6e\111\156\124\x61\142\154\x65\x20" . $c9);
$yf = $this->resource->getConnection();
if (!($yf->tableColumnExists($Vk, $c9) === false)) {
goto Cl;
}
$yf->addColumn($Vk, $c9, array("\164\171\x70\145" => "\x74\x65\170\x74", "\156\165\154\154\141\142\x6c\145" => false, "\x6c\x65\156\147\164\150" => 255, "\141\146\x74\x65\x72" => null, "\x63\157\x6d\x6d\x65\156\x74" => $c9));
Cl:
$this->resource->getConnection()->update($Vk, [$c9 => $G5], [$Vi . "\40\75\40\x3f" => $MS]);
}
public function getWebsiteCollection()
{
$yx = $this->_websiteCollectionFactory->create();
return $yx;
}
public function isAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto mL;
}
return 0;
goto Lw;
mL:
return $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT);
Lw:
}
public function isb2bAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto Lb;
}
return 0;
goto yQ;
Lb:
return $this->getStoreConfig(OAuthConstants::B2B_AUTO_REDIRECT);
yQ:
}
public function isAllPageAutoRedirectEnabled($KW)
{
$NJ = $this->getStoreConfig(OAuthConstants::AUTO_REDIRECT_APP);
if ($NJ == $KW) {
goto kl;
}
return 0;
goto oy;
kl:
return $this->getStoreConfig(OAuthConstants::ALL_PAGE_AUTO_REDIRECT);
oy:
}
public function checkIfFlowStartedFromBackend($hq)
{
$zi = $this->helperBackend->getAreaFrontName();
if (!str_contains($hq, $zi)) {
goto n5;
}
$this->log_debug("\x63\150\145\143\x6b\x49\x66\106\154\x6f\167\123\164\x61\x72\x74\x65\144\106\x72\x6f\x6d\x42\x61\143\153\145\156\144\x3a\x20\164\x72\165\x65");
return true;
n5:
$this->log_debug("\143\150\x65\x63\x6b\x49\146\106\154\157\x77\x53\164\141\x72\164\145\x64\106\162\x6f\155\102\x61\143\153\145\x6e\x64\x3a\40\146\141\154\163\145");
return false;
}
public function customlog($Lu)
{
$this->isLogEnable() ? $this->_logger->debug($Lu) : null;
}
public function isCustomLogExist()
{
if ($this->fileSystem->isExists("\x2e\x2e\x2f\x76\x61\162\57\x6c\x6f\x67\x2f\x6d\157\x5f\157\141\x75\164\x68\x2e\154\x6f\x67")) {
goto Wp;
}
if ($this->fileSystem->isExists("\166\141\x72\57\154\157\147\x2f\x6d\157\x5f\x6f\141\x75\164\x68\x2e\154\157\x67")) {
goto bC;
}
goto CJ;
Wp:
return 1;
goto CJ;
bC:
return 1;
CJ:
return 0;
}
public function deleteCustomLogFile()
{
if ($this->fileSystem->isExists("\x2e\56\57\166\141\x72\x2f\154\157\x67\57\155\157\137\x6f\x61\165\x74\150\56\x6c\x6f\147")) {
goto kV;
}
if ($this->fileSystem->isExists("\166\x61\162\57\154\x6f\147\x2f\155\x6f\137\157\141\165\164\150\56\154\x6f\x67")) {
goto o0;
}
goto sE;
kV:
$this->fileSystem->deleteFile("\x2e\56\57\x76\141\162\x2f\x6c\157\147\x2f\x6d\x6f\x5f\157\x61\x75\164\150\x2e\x6c\x6f\147");
goto sE;
o0:
$this->fileSystem->deleteFile("\166\x61\x72\x2f\154\x6f\x67\57\155\157\137\x6f\141\165\x74\150\x2e\x6c\x6f\147");
sE:
}
public function isLogEnable()
{
return $this->getStoreConfig(OAuthConstants::ENABLE_DEBUG_LOG);
}
public function create_log_file($HD, $n1)
{
return $this->fileFactory->create($HD, $n1, DirectoryList::VAR_DIR);
}
public function get_magento_version()
{
return $this->productMetadata->getVersion();
}
public function check_plan($On)
{
return $this->get_versi() >= $On;
}
public function get_versi()
{
$uq = OAuthConstants::LICENSE_PLAN;
return $uq === "\x6d\x61\x67\145\x6e\x74\157\x5f\157\141\165\x74\x68\x5f\164\162\x69\x61\x6c\137\x70\154\x61\x6e" ? 4 : ($uq === "\155\141\x67\145\x6e\x74\157\x5f\157\x61\165\x74\150\x5f\x65\x6e\x74\145\x72\x70\x72\x69\x73\x65\137\160\x6c\x61\156" ? 3 : ($uq === "\x6d\141\x67\145\x6e\164\x6f\x5f\x6f\141\x75\x74\x68\137\160\162\x65\x6d\x69\x75\155\137\x70\154\x61\x6e" ? 2 : ($uq === "\155\x61\x67\x65\156\164\157\137\157\141\165\x74\x68\x5f\x73\x74\x61\156\x64\141\x72\144\x5f\x70\154\x61\156" ? 1 : 0)));
}
public function redirectURL($Mx)
{
return $this->_response->setRedirect($Mx)->sendResponse();
}
public function errorPageRedirection($DY)
{
try {
$this->messageManager->addErrorMessage($DY);
$M4 = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$M4->setUrl($this->urlInterface->getUrl("\x6e\x6f\162\157\x75\x74\145"));
return $M4;
} catch (\Exception $zQ) {
$this->messageManager->addError(__("\101\156\x20\145\162\x72\157\162\x20\157\x63\x63\x75\x72\x72\x65\144\56\x20\x50\x6c\145\x61\163\x65\x20\164\162\x79\x20\x61\147\141\x69\156\56"));
$this->_redirect("\52\57\52\57");
}
}
public function getDefaultErrorPage()
{
return $this->urlInterface->getUrl("\156\157\162\157\x75\164\145");
}
public function getnormalcustomer()
{
return $this->getStoreConfig(OAuthConstants::NORMAL_CUSTOMER);
}
public function getWebsiteLimit()
{
if (!$this->check_plan(4)) {
goto VB;
}
return 2;
VB:
return $this->getStoreConfig(OAuthConstants::WEBSITES_LIMIT);
}
public function update_customer_id_in_customer_visitor($gL)
{
$this->log_debug("\125\x70\144\x61\x74\x69\156\147\x20\x63\165\x73\x74\157\x6d\x65\162\x5f\x76\151\163\x69\x74\x6f\162\x20\x74\141\x62\154\x65");
$yf = $this->resource->getConnection();
$fm = $yf->select()->from("\x63\x75\163\164\157\155\145\x72\x5f\166\x69\x73\x69\164\x6f\x72", "\x43\117\x55\x4e\x54\50\52\51");
$Ry = $yf->fetchOne($fm);
$this->resource->getConnection()->update("\143\x75\163\x74\157\x6d\x65\162\137\166\151\163\x69\164\x6f\x72", ["\143\165\163\164\157\x6d\x65\162\x5f\151\x64" => $gL], ["\166\x69\163\151\x74\x6f\x72\137\151\144\x20\75\40\77" => $Ry]);
}
}
Function Calls
None |
Stats
MD5 | 2ad67601b1ca8d732f79e619bced2e05 |
Eval Count | 0 |
Decode Time | 70 ms |