Skip to content

REST controller private ip address typo in code? #1027

@ziaahsan

Description

@ziaahsan

Looking at the code for REST_Controller, is_private_key.

// multiple ip addresses must be separated using a comma, explode and loop
$list_ip_addresses = explode(',', $row->ip_addresses);
$ip_address = $this->input->ip_address();
$found_address = FALSE;
foreach ($list_ip_addresses as $ip_address)
{
    if ($ip_address === trim($ip_address))
    {

Looking at it, I think it should be:

// multiple ip addresses must be separated using a comma, explode and loop
$list_ip_addresses = explode(',', $row->ip_addresses);
$ip_address = $this->input->ip_address();
$found_address = FALSE;
foreach ($list_ip_addresses as **$list_ip**)
{
    **if ($ip_address === trim($list_ip))** 
    {

Since we want the ip address to match the db if any set.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions