Delete JsError action

This commit is contained in:
RainLoop Team 2019-08-01 03:13:44 +03:00
parent 66b23747c7
commit 1b2306c7b0
4 changed files with 1 additions and 106 deletions

View file

@ -5081,20 +5081,6 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
return $this->DefaultResponse(__FUNCTION__, $mResult);
}
/**
* @return array
*/
public function DoJsInfo()
{
$bIsError = '1' === (string) $this->GetActionParam('IsError', '0');
$mData = $this->GetActionParam('Data', null);
$this->Logger()->WriteDump(is_array($mData) ? $mData : array(),
$bIsError ? \MailSo\Log\Enumerations\Type::ERROR : \MailSo\Log\Enumerations\Type::INFO, 'JS-INFO');
return $this->DefaultResponse(__FUNCTION__, true);
}
/**
* @return array
*/
@ -5123,36 +5109,6 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
APP_VERSION === (string) $this->GetActionParam('Version', ''));
}
/**
* @return array
*/
public function DoJsError()
{
$sMessage = $this->GetActionParam('Message', '');
if (0 < strlen($sMessage))
{
$sFileName = $this->GetActionParam('FileName', '');
$sLineNo = $this->GetActionParam('LineNo', '');
$sLocation = $this->GetActionParam('Location', '');
$sHtmlCapa = $this->GetActionParam('HtmlCapa', '');
$sTimeOnPage = $this->GetActionParam('TimeOnPage', '');
$oHttp = $this->Http();
$this->Logger()->Write($sMessage.' ('.$sFileName.' ~ '.$sLineNo.')', \MailSo\Log\Enumerations\Type::ERROR, 'JS');
$this->Logger()->WriteDump(array(
'Location' => $sLocation,
'Capability' => $sHtmlCapa,
'TimeOnPage' => $sTimeOnPage,
'HTTP_USER_AGENT' => $oHttp->GetServer('HTTP_USER_AGENT', ''),
'HTTP_ACCEPT_ENCODING' => $oHttp->GetServer('HTTP_ACCEPT_ENCODING', ''),
'HTTP_ACCEPT_LANGUAGE' => $oHttp->GetServer('HTTP_ACCEPT_LANGUAGE', '')
));
}
return $this->DefaultResponse(__FUNCTION__, true);
}
/**
* @param \MailSo\Mail\FolderCollection $oFolders
* @return array

View file

@ -126,7 +126,7 @@ class ServiceActions
try
{
if ($this->oHttp->IsPost() && !in_array($sAction, array('JsInfo', 'JsError')) &&
if ($this->oHttp->IsPost() &&
$this->Config()->Get('security', 'csrf_protection', false) &&
$this->oHttp->GetPost('XToken', '') !== \RainLoop\Utils::GetCsrfToken())
{