{"action":"created","issue":{"url":"https://api.github.com/repos/abantecart/abantecart-src/issues/1186","repository_url":"https://api.github.com/repos/abantecart/abantecart-src","labels_url":"https://api.github.com/repos/abantecart/abantecart-src/issues/1186/labels{/name}","comments_url":"https://api.github.com/repos/abantecart/abantecart-src/issues/1186/comments","events_url":"https://api.github.com/repos/abantecart/abantecart-src/issues/1186/events","html_url":"https://github.com/abantecart/abantecart-src/issues/1186","id":392079937,"node_id":"MDU6SXNzdWUzOTIwNzk5Mzc=","number":1186,"title":"Get Remote IP issue while server behind Cloudflare or proxy","user":{"login":"kolynet","id":22685076,"node_id":"MDQ6VXNlcjIyNjg1MDc2","avatar_url":"https://avatars1.githubusercontent.com/u/22685076?v=4","gravatar_id":"","url":"https://api.github.com/users/kolynet","html_url":"https://github.com/kolynet","followers_url":"https://api.github.com/users/kolynet/followers","following_url":"https://api.github.com/users/kolynet/following{/other_user}","gists_url":"https://api.github.com/users/kolynet/gists{/gist_id}","starred_url":"https://api.github.com/users/kolynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolynet/subscriptions","organizations_url":"https://api.github.com/users/kolynet/orgs","repos_url":"https://api.github.com/users/kolynet/repos","events_url":"https://api.github.com/users/kolynet/events{/privacy}","received_events_url":"https://api.github.com/users/kolynet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-18T10:03:48Z","updated_at":"2018-12-18T10:11:00Z","closed_at":null,"author_association":"NONE","body":"core/lib/request.php\r\n\r\nThe problem will cause the customer IP to be the same as the cloudflare server's. Every user will have identical IP address in the system.\r\n\r\nModify the function to this: (it can cause a lot of troubles if the owner use 3rd party tools for IP checking, or fraud checking while behind proxy or cloudflare)\r\n\r\n        public function getRemoteIP()\r\n    {\r\n\r\n        if(isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]))\r\n        {\r\n        $ip = $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\r\n        }else{\r\n            \r\n         if(!empty($this->server['HTTP_CLIENT_IP']))\r\n        {\r\n            $ip = $this->server['HTTP_CLIENT_IP'];\r\n        }elseif(!empty($this->server['HTTP_X_FORWARDED_FOR']))\r\n        {\r\n            $ip = $this->server['HTTP_X_FORWARDED_FOR'];\r\n        }else\r\n        {\r\n            $ip = $this->server['REMOTE_ADDR'];\r\n        }\r\n            \r\n            \r\n        }\r\n\r\n        \r\n        return $ip;\r\n    }"},"comment":{"url":"https://api.github.com/repos/abantecart/abantecart-src/issues/comments/448167542","html_url":"https://github.com/abantecart/abantecart-src/issues/1186#issuecomment-448167542","issue_url":"https://api.github.com/repos/abantecart/abantecart-src/issues/1186","id":448167542,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODE2NzU0Mg==","user":{"login":"BasaraABC","id":2631910,"node_id":"MDQ6VXNlcjI2MzE5MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2631910?v=4","gravatar_id":"","url":"https://api.github.com/users/BasaraABC","html_url":"https://github.com/BasaraABC","followers_url":"https://api.github.com/users/BasaraABC/followers","following_url":"https://api.github.com/users/BasaraABC/following{/other_user}","gists_url":"https://api.github.com/users/BasaraABC/gists{/gist_id}","starred_url":"https://api.github.com/users/BasaraABC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BasaraABC/subscriptions","organizations_url":"https://api.github.com/users/BasaraABC/orgs","repos_url":"https://api.github.com/users/BasaraABC/repos","events_url":"https://api.github.com/users/BasaraABC/events{/privacy}","received_events_url":"https://api.github.com/users/BasaraABC/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T10:11:00Z","updated_at":"2018-12-18T10:11:00Z","author_association":"COLLABORATOR","body":"Are you posting solution or report a bug?"}}
{"actor":{"display_login":"BasaraABC"}}