From 0d219abdcd55c11f7f629a58a2279f0839bd2acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 22 Sep 2008 10:13:32 +0000 Subject: [PATCH] XSS in MSIE using NUL byte, thanks to JPCERT. --- ChangeLog | 3 +++ libraries/js_escape.lib.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index c646886e9..a3a9d3743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -111,6 +111,9 @@ danbarry + [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika - bug #2113848 [navi] Page number after database switching +2.11.9.2 (2008-09-22) +- [security] XSS in MSIE using NUL byte, thanks to JPCERT. + 2.11.9.1 (2008-09-15) - [security] Code execution vulnerability, thanks to Norman Hippert diff --git a/libraries/js_escape.lib.php b/libraries/js_escape.lib.php index 9d128aa31..d4dfb5604 100644 --- a/libraries/js_escape.lib.php +++ b/libraries/js_escape.lib.php @@ -46,6 +46,10 @@ function PMA_jsFormat($a_string = '', $add_backquotes = true) * enclosed by * this requires only to escape ' with \' and end of script block * + * We also remove NUL byte as some browsers (namely MSIE) ignore it and + * it and inserting it anywhere inside '', '\\' => '\\\\', '\'' => '\\\'', "\n" => '\n',