File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -611,19 +611,24 @@ protected function _detect_api_key()
611611 isset($row->ignore_limits) AND $this->rest->ignore_limits = $row->ignore_limits;
612612 */
613613
614+ /*
615+ * If "is private key" is enabled, compare the ip address with the list
616+ * of valid ip addresses stored in the database.
617+ */
614618 if (!empty ($ row ->is_private_key ))
615619 {
616-
617620 // Check for a list of valid ip addresses
618621 if (isset ($ row ->ip_addresses ))
619622 {
623+ // multiple ip addresses must be separated using a comma, explode and loop
620624 $ list_ip_addresses = explode (", " , $ row ->ip_addresses );
621625 $ found_address = FALSE ;
622626
623627 foreach ($ list_ip_addresses as $ ip_address )
624628 {
625629 if ($ this ->input ->ip_address () == trim ($ ip_address ))
626630 {
631+ // there is a match, set the the value to true and break out of the loop
627632 $ found_address = TRUE ;
628633 break ;
629634 }
You can’t perform that action at this time.
0 commit comments