From b8c0ef88153e21b1c60d00e903be49af1ef98af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Wed, 12 Sep 2007 18:10:49 +0000 Subject: [PATCH] Work around for servers where PHP magic_quotes_gpc is disabled svn path=/trunk/boinc/; revision=13581 --- html/inc/util.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/inc/util.inc b/html/inc/util.inc index 5de5f54d81..f112aeb7b9 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -614,6 +614,9 @@ function get_str($name, $optional=false) { if (!$x && !$optional) { error_page("missing or bad parameter: $name"); } + if (get_magic_quotes_gpc() == 0) { + $x = addslashes($x); + } return $x; } @@ -632,6 +635,9 @@ function post_str($name, $optional=false) { if (!$x && !$optional) { error_page("missing or bad parameter: $name"); } + if (get_magic_quotes_gpc() == 0) { + $x = addslashes($x); + } return $x; }