From 6566e9491438dc46f5accb7540b0c9a178689092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 12 Feb 2016 09:57:30 +0100 Subject: [PATCH 1/2] Correct content type for uploaded error reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #11939 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/error_report.lib.php | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33e34dd3d0..68ffc4c543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ phpMyAdmin - ChangeLog - issue #11677 sql-parser and php-gettext collide. - issue #11920 Can't disable backquotes in export - issue #11911 Inserts via tbl_change.php in VARBINARY columns does not allow using HEX() and MD5() +- issue #11939 Correct content type for uploaded error reports 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php index 0ac7ce56b8..ad333f4f8a 100644 --- a/libraries/error_report.lib.php +++ b/libraries/error_report.lib.php @@ -194,7 +194,7 @@ function PMA_sendErrorReport($report) array( 'method' => 'POST', 'content' => $data_string, - 'header' => "Content-Type: multipart/form-data\r\n", + 'header' => "Content-Type: application/json\r\n", ) ); $context = PMA_Util::handleContext($context); @@ -216,7 +216,10 @@ function PMA_sendErrorReport($report) } $curl_handle = PMA_Util::configureCurl($curl_handle); curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Expect:')); + curl_setopt( + $curl_handle, CURLOPT_HTTPHEADER, + array('Expect:', 'Content-Type: application/json') + ); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data_string); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($curl_handle); From 5f0aa04560e745fa43d2a5e94b07b04f98009516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 12 Feb 2016 10:06:00 +0100 Subject: [PATCH 2/2] Silent errors from checking local documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file_exists can issue error in case of open_basedir restrictions. Fixes #11940 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/Util.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 68ffc4c543..d8c5843741 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ phpMyAdmin - ChangeLog - issue #11920 Can't disable backquotes in export - issue #11911 Inserts via tbl_change.php in VARBINARY columns does not allow using HEX() and MD5() - issue #11939 Correct content type for uploaded error reports +- issue #11940 Silent errors from checking local documentation 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/Util.class.php b/libraries/Util.class.php index f19ec12600..75a7dde2e8 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -518,7 +518,7 @@ class PMA_Util if (defined('TESTSUITE')) { /* Provide consistent URL for testsuite */ return PMA_linkURL('http://docs.phpmyadmin.net/en/latest/' . $url); - } else if (file_exists('doc/html/index.html')) { + } else if (@file_exists('doc/html/index.html')) { if (defined('PMA_SETUP')) { return '../doc/html/' . $url; } else {