summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2015-05-05 22:20:32 +0200
committerBenny Baumann <BenBE@geshi.org>2015-05-05 22:20:32 +0200
commit675fb01ecddce3316df0e678cb0b68345de2e7be (patch)
treee22c4a2b17fd3c832da1fb67a344f62a2da906de
parent22b736103da26d5b4c19d7389d907ed6741b1ee4 (diff)
parent0d35a10b2c7ca38ea7bab56d872b1001d81a6735 (diff)
downloadcacert-devel-675fb01ecddce3316df0e678cb0b68345de2e7be.tar.gz
cacert-devel-675fb01ecddce3316df0e678cb0b68345de2e7be.tar.xz
cacert-devel-675fb01ecddce3316df0e678cb0b68345de2e7be.zip
Merge branch 'bug-1383' into testserver-stable
-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;