summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2015-05-05 22:15:02 +0200
committerFelix Dörre <felix@dogcraft.de>2015-05-05 22:15:02 +0200
commit0d35a10b2c7ca38ea7bab56d872b1001d81a6735 (patch)
treebb047fe10dd130edc374a8817dc78c6b8f03ab1e /www
parent345eb2e771f6475e243f406fe37c41933a520c11 (diff)
downloadcacert-devel-0d35a10b2c7ca38ea7bab56d872b1001d81a6735.tar.gz
cacert-devel-0d35a10b2c7ca38ea7bab56d872b1001d81a6735.tar.xz
cacert-devel-0d35a10b2c7ca38ea7bab56d872b1001d81a6735.zip
bug 1383: cleanup ac.php, (undefined index, undefined offset)
Diffstat (limited to 'www')
-rw-r--r--www/ac.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/www/ac.php b/www/ac.php
index fe8ac18..73805e4 100644
--- a/www/ac.php
+++ b/www/ac.php
@@ -17,7 +17,7 @@
*/
header('Content-Type: text/html; charset=UTF-8');
- if($_REQUEST['i'] != "")
+ if(isset($_REQUEST['i']) && $_REQUEST['i'] != "")
echo "<html><body><script language=\"JavaScript\"><!--\n";
$s = mysql_real_escape_string($_REQUEST['s']);
@@ -27,9 +27,9 @@
$bits = explode(",", $s);
- $loc = trim(mysql_real_escape_string($bits['0']));
- $reg = trim(mysql_real_escape_string($bits['1']));
- $ccname = trim(mysql_real_escape_string($bits['2']));
+ $loc = trim(mysql_real_escape_string($bits[0]));
+ $reg = trim(mysql_real_escape_string(isset($bits[1])?$bits[1]:""));
+ $ccname = trim(mysql_real_escape_string(isset($bits[2])?$bits[2]:""));
$query = "select `locations`.`id` as `locid`, `locations`.`name` as `locname`, `regions`.`name` as `regname`,
`countries`.`name` as `ccname` from `locations`, `regions`, `countries` where
`locations`.`name` like '$loc%' and `regions`.`name` like '$reg%' and `countries`.`name` like '$ccname%' and
@@ -45,7 +45,7 @@
}
echo ");";
- if($_REQUEST['i'] != "")
+ if(isset($_REQUEST['i']) && $_REQUEST['i'] != "")
echo "\n\n// -->\n</script></body></html>";
exit;