From dc26f4210708668ab860ab9169e65a56f1958a2a Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 28 Aug 2016 10:24:42 +0200 Subject: Same security fix for others API scripts --- api/mig_wan6ll.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'api/mig_wan6ll.php') diff --git a/api/mig_wan6ll.php b/api/mig_wan6ll.php index 173f7fe..7661f13 100644 --- a/api/mig_wan6ll.php +++ b/api/mig_wan6ll.php @@ -21,8 +21,11 @@ include_once('inc/config.php'); $mysqli = new mysqli($db_config['host'], $db_config['username'], $db_config['password'], $db_config['database']); +if (mysqli_connect_errno()) { + die(mysqli_connect_error()); +} unset($db_config); -$mysqli->query("SET NAMES 'utf8'"); +$mysqli->set_charset("utf8") or die($mysqli->error); $arg_ip6wanll=(array_key_exists('ip6wanll', $_GET) && preg_match('/^[a-f0-9:]+$/', $_GET['ip6wanll']))?$_GET['ip6wanll']:NULL; -- cgit v1.1