From 8972ac9c152c476bde8c538757bc443c4747f725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 2 Apr 2012 09:47:46 +0200 Subject: [PATCH 1/2] Verify we got string --- scripts/decode_bug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decode_bug.php b/scripts/decode_bug.php index 2f55dcf4e9..f6038c22a1 100644 --- a/scripts/decode_bug.php +++ b/scripts/decode_bug.php @@ -78,7 +78,7 @@ if (!empty($_POST) && isset($_POST['bug_encoded'])) { $bug_encoded = $_POST['bug_encoded']; } -if (!empty($bug_encoded)) { +if (!empty($bug_encoded) && is_string($bug_encoded)) { if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $bug_encoded = stripslashes($bug_encoded); } From 517aa612714449eab640bf6c90f702815ba8cedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 2 Apr 2012 09:51:15 +0200 Subject: [PATCH 2/2] Coding style --- scripts/decode_bug.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/decode_bug.php b/scripts/decode_bug.php index ea4b803322..a71f685514 100644 --- a/scripts/decode_bug.php +++ b/scripts/decode_bug.php @@ -86,9 +86,9 @@ if (!empty($bug_encoded) && is_string($bug_encoded)) { $bug_decoded = base64_decode($bug_encoded); if (substr($bug_encoded, 0, 2) == 'eN') { if (function_exists('gzuncompress')) { - $result = PMA_printDecodedBug(gzuncompress($bug_decoded)); - } else { - $result = 'Error: "gzuncompress()" is unavailable!' . "\n"; + $result = PMA_printDecodedBug(gzuncompress($bug_decoded)); + } else { + $result = 'Error: "gzuncompress()" is unavailable!' . "\n"; } } else { $result = PMA_printDecodedBug($bug_decoded);