Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-08-30 04:47:17 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-11-11 01:48:59 +0300
commit737ac997f9271d15f08b20893c9174a312027b74 (patch)
treed073611aa837431ad28e345093e888e4194dbf85 /error_report.php
parent593b2571cd8ba5110cd39fee896ea172ca2c81d5 (diff)
Retrieve parameters from $_POST in error report
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'error_report.php')
-rw-r--r--error_report.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/error_report.php b/error_report.php
index 408a4eb201..54de4584e1 100644
--- a/error_report.php
+++ b/error_report.php
@@ -13,8 +13,8 @@ use PhpMyAdmin\Utils\HttpRequest;
require_once 'libraries/common.inc.php';
-if (!isset($_REQUEST['exception_type'])
- ||!in_array($_REQUEST['exception_type'], array('js', 'php'))
+if (!isset($_POST['exception_type'])
+ ||!in_array($_POST['exception_type'], array('js', 'php'))
) {
die('Oops, something went wrong!!');
}
@@ -23,11 +23,11 @@ $response = Response::getInstance();
$errorReport = new ErrorReport(new HttpRequest());
-if (isset($_REQUEST['send_error_report'])
- && ($_REQUEST['send_error_report'] == true
- || $_REQUEST['send_error_report'] == '1')
+if (isset($_POST['send_error_report'])
+ && ($_POST['send_error_report'] == true
+ || $_POST['send_error_report'] == '1')
) {
- if ($_REQUEST['exception_type'] == 'php') {
+ if ($_POST['exception_type'] == 'php') {
/**
* Prevent infinite error submission.
* Happens in case error submissions fails.
@@ -51,7 +51,7 @@ if (isset($_REQUEST['send_error_report'])
);
}
}
- $reportData = $errorReport->getData($_REQUEST['exception_type']);
+ $reportData = $errorReport->getData($_POST['exception_type']);
// report if and only if there were 'actual' errors.
if (count($reportData) > 0) {
$server_response = $errorReport->send($reportData);
@@ -65,8 +65,8 @@ if (isset($_REQUEST['send_error_report'])
/* Message to show to the user */
if ($success) {
- if ((isset($_REQUEST['automatic'])
- && $_REQUEST['automatic'] === "true")
+ if ((isset($_POST['automatic'])
+ && $_POST['automatic'] === "true")
|| $GLOBALS['cfg']['SendErrorReports'] == 'always'
) {
$msg = __(
@@ -98,35 +98,35 @@ if (isset($_REQUEST['send_error_report'])
/* Add message to response */
if ($response->isAjax()) {
- if ($_REQUEST['exception_type'] == 'js') {
+ if ($_POST['exception_type'] == 'js') {
$response->addJSON('message', $msg);
} else {
$response->addJSON('_errSubmitMsg', $msg);
}
- } elseif ($_REQUEST['exception_type'] == 'php') {
+ } elseif ($_POST['exception_type'] == 'php') {
$jsCode = 'PMA_ajaxShowMessage("<div class=\"error\">'
. $msg
. '</div>", false);';
$response->getFooter()->getScripts()->addCode($jsCode);
}
- if ($_REQUEST['exception_type'] == 'php') {
+ if ($_POST['exception_type'] == 'php') {
// clear previous errors & save new ones.
$GLOBALS['error_handler']->savePreviousErrors();
}
/* Persist always send settings */
- if (isset($_REQUEST['always_send'])
- && $_REQUEST['always_send'] === "true"
+ if (isset($_POST['always_send'])
+ && $_POST['always_send'] === "true"
) {
$userPreferences = new UserPreferences();
$userPreferences->persistOption("SendErrorReports", "always", "ask");
}
}
-} elseif (! empty($_REQUEST['get_settings'])) {
+} elseif (! empty($_POST['get_settings'])) {
$response->addJSON('report_setting', $GLOBALS['cfg']['SendErrorReports']);
} else {
- if ($_REQUEST['exception_type'] == 'js') {
+ if ($_POST['exception_type'] == 'js') {
$response->addHTML($errorReport->getForm());
} else {
// clear previous errors & save new ones.