git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: debugger has problems with latin-1 characters in payload
[plcapi.git]
/
debugger
/
common.php
diff --git
a/debugger/common.php
b/debugger/common.php
index
e8ad64c
..
ecd09cf
100644
(file)
--- a/
debugger/common.php
+++ b/
debugger/common.php
@@
-24,8
+24,12
@@
if (get_magic_quotes_gpc()) {
$_GET = array_map('stripslashes_deep', $_GET);
}
$_GET = array_map('stripslashes_deep', $_GET);
}
+$preferredEncodings = 'UTF-8, ASCII, ISO-8859-1, UTF-7, EUC-JP, SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP';
+$inputcharset = mb_detect_encoding(urldecode($_SERVER['REQUEST_URI']), $preferredEncodings);
if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') {
$_GET = $_POST;
if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') {
$_GET = $_POST;
+ /// @todo detect encoding, eg from from http headers?
+ // mb_detect_encoding(urldecode($_SERVER['...']), $preferredEncodings);
}
// recover input parameters
}
// recover input parameters