Browse Source

Fix authorized location system ASN detection

spaghetti 8 years ago
parent
commit
57a52eb5bb
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      sections/login/index.php

+ 1
- 1
sections/login/index.php View File

@@ -268,7 +268,7 @@ else {
268 268
                 }
269 269
                 $DB->query('SELECT ASN FROM geoip_asn WHERE '.implode(' OR ', $QueryParts));
270 270
                 $PastASNs = array_column($DB->to_array(false, MYSQLI_NUM), 0);
271
-                $DB->query("SELECT ASN FROM geoip_asn WHERE StartIP<=INET_ATON('$_SERVER[REMOTE_ADDR]') AND EndIP>=INET_ATON('$_SERVER[REMOTE_ADDR]')");
271
+                $DB->query("SELECT ASN FROM geoip_asn WHERE StartIP<=INET6_ATON('$_SERVER[REMOTE_ADDR]') AND EndIP>=INET6_ATON('$_SERVER[REMOTE_ADDR]')");
272 272
                 list($CurrentASN) = $DB->next_record();
273 273
 
274 274
                 if (!in_array($CurrentASN, $PastASNs)) {

Loading…
Cancel
Save