diff --git a/ChangeLog b/ChangeLog index ce636229d..c3051a12a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,9 +5,13 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-08-01 Robin Johnson + * scripts/decode_bug.php3: + - Improvements and PHP3 fixes thanks to Loic + 2002-08-01 Marc Delisle - * new lang/afrikaans, thanks to Andreas Pauley - (pauley at buitegroep.org.za) + * lang/afrikaans: new language + - thanks to Andreas Pauley (pauley at buitegroep.org.za) * lang/spanish: remove control m 2002-07-31 Robin Johnson diff --git a/scripts/decode_bug.php3 b/scripts/decode_bug.php3 index 1d1b554b5..2e8ce9812 100644 --- a/scripts/decode_bug.php3 +++ b/scripts/decode_bug.php3 @@ -1,39 +1,91 @@ */ + + +/** + * Displays the form + */ ?> - -

Parser BUG decoder

-
- + + + + + + phpMyAdmin - Parser BUG decoder + + + + + +

Parser BUG decoder


- - + + + + Encoded bug report:
+ +

+
-
+ decodes the bug report + */ +if (!empty($_POST) && isset($_POST['bug_encoded'])) { + $bug_encoded = $_POST['bug_encoded']; +} +else if (!empty($HTTP_POST_VARS) && isset($HTTP_POST_VARS['bug_encoded'])) { + $bug_encoded = $HTTP_POST_VARS['bug_encoded']; } -$foo = eregi_replace("[[:space:]]", "", $foo); -$bar = base64_decode($foo); -if(substr($foo,0,2) == 'eN') -{ - $bar = gzuncompress($bar); -} -echo "Decoded:
".$bar."
"; +if (!empty($bug_encoded)) { + if (get_magic_quotes_gpc()) { + $bug_encoded = stripslashes($bug_encoded); + } + $bug_encoded = ereg_replace('[[:space:]]', '', $bug_encoded); + $bug_decoded = base64_decode($bug_encoded); + if (substr($bug_encoded, 0, 2) == 'eN') { + if (function_exists('gzuncompress')) { + $result = ' Decoded:
' . "\n" + . ' ' . gzuncompress($bug_decoded) . '
' . "\n"; + } else { + $result = 'Error: "gzuncompress()" is unavailable!' . "\n"; + } + } + else { + $result = ' Decoded:
' . "\n" + . ' ' . $bug_decoded . '
'. "\n"; + } // end if... else... + + echo '

' . "\n" . $result . '

' . "\n"; +} // end if ?> + +