[TASK] Prevents PHP warnings with type differences on $_REQUEST['serendipity'].
refs #642 Backported from master branch. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
f26a306026
commit
2b9616276f
@ -1,6 +1,12 @@
|
|||||||
Version 2.3.2-beta1 ()
|
Version 2.3.2-beta1 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Only populate $serendipity['GET'], $serendipity['POST'] and
|
||||||
|
$serendipity['COOKIE'] with references to $_GET['serendipity'],
|
||||||
|
$_POST['serendipity'], $_COOKIE['serendipity'] if they are
|
||||||
|
transmitted as an array. Else, an empty array is used.
|
||||||
|
Prevents PHP warnings (Issue 642) thanks to @hannob
|
||||||
|
|
||||||
* Escape category images to avoid backend XSS.
|
* Escape category images to avoid backend XSS.
|
||||||
Thanks to @hannob!
|
Thanks to @hannob!
|
||||||
|
|
||||||
|
@ -373,9 +373,23 @@ if (ini_get('magic_quotes_gpc')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Merge get and post into the serendipity array
|
// Merge get and post into the serendipity array
|
||||||
|
if (is_array($_GET['serendipity'])) {
|
||||||
$serendipity['GET'] = &$_GET['serendipity'];
|
$serendipity['GET'] = &$_GET['serendipity'];
|
||||||
|
} else {
|
||||||
|
$serendipity['GET'] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($_POST['serendipity'])) {
|
||||||
$serendipity['POST'] = &$_POST['serendipity'];
|
$serendipity['POST'] = &$_POST['serendipity'];
|
||||||
|
} else {
|
||||||
|
$serendipity['POST'] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($_COOKIE['serendipity'])) {
|
||||||
$serendipity['COOKIE'] = &$_COOKIE['serendipity'];
|
$serendipity['COOKIE'] = &$_COOKIE['serendipity'];
|
||||||
|
} else {
|
||||||
|
$serendipity['COOKIE'] = array();
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to fix IIS compatibility
|
// Attempt to fix IIS compatibility
|
||||||
if (empty($_SERVER['REQUEST_URI'])) {
|
if (empty($_SERVER['REQUEST_URI'])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user