{"action":"created","issue":{"url":"https://api.github.com/repos/Wedge/wedge/issues/29","labels_url":"https://api.github.com/repos/Wedge/wedge/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/Wedge/wedge/issues/29/comments","events_url":"https://api.github.com/repos/Wedge/wedge/issues/29/events","html_url":"https://github.com/Wedge/wedge/issues/29","id":68353616,"number":29,"title":"CIDR matching incorrect","user":{"login":"Arantor","id":1156911,"avatar_url":"https://avatars.githubusercontent.com/u/1156911?v=3","gravatar_id":"","url":"https://api.github.com/users/Arantor","html_url":"https://github.com/Arantor","followers_url":"https://api.github.com/users/Arantor/followers","following_url":"https://api.github.com/users/Arantor/following{/other_user}","gists_url":"https://api.github.com/users/Arantor/gists{/gist_id}","starred_url":"https://api.github.com/users/Arantor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arantor/subscriptions","organizations_url":"https://api.github.com/users/Arantor/orgs","repos_url":"https://api.github.com/users/Arantor/repos","events_url":"https://api.github.com/users/Arantor/events{/privacy}","received_events_url":"https://api.github.com/users/Arantor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-14T12:16:05Z","updated_at":"2015-04-20T18:26:45Z","closed_at":null,"body":"I was implementing some IPv6 stuff in what I'm doing as a day job, looked up my own code and found this was broken and has always been broken. I figured I should do the decent thing and report the bug + fix upstream.\r\n\r\nSubs.php contains this:\r\n```\r\n\t\t\t// OK, so we need to figure out what's going on with these last digits.\r\n\t\t\t$cidr_ip = substr($cidr_ip, $whole_digits, 1);\r\n\t\t\t$ip = substr($ip, $whole_digits, 1);\r\n\t\t\t$mask = 16 - (2 ^ ($mask % 4));\r\n```\r\n\r\nShould have been:\r\n```\r\n\t\t\t// OK, so we need to figure out what's going on with these last digits.\r\n\t\t\t$cidr_ip = hexdec(substr($cidr_ip, $whole_digits, 1));\r\n\t\t\t$ip = hexdec(substr($ip, $whole_digits, 1));\r\n\t\t\t$mask = 16 - (pow(2, ($mask % 4)));\r\n```"},"comment":{"url":"https://api.github.com/repos/Wedge/wedge/issues/comments/94530738","html_url":"https://github.com/Wedge/wedge/issues/29#issuecomment-94530738","issue_url":"https://api.github.com/repos/Wedge/wedge/issues/29","id":94530738,"user":{"login":"C3realGuy","id":6577095,"avatar_url":"https://avatars.githubusercontent.com/u/6577095?v=3","gravatar_id":"","url":"https://api.github.com/users/C3realGuy","html_url":"https://github.com/C3realGuy","followers_url":"https://api.github.com/users/C3realGuy/followers","following_url":"https://api.github.com/users/C3realGuy/following{/other_user}","gists_url":"https://api.github.com/users/C3realGuy/gists{/gist_id}","starred_url":"https://api.github.com/users/C3realGuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C3realGuy/subscriptions","organizations_url":"https://api.github.com/users/C3realGuy/orgs","repos_url":"https://api.github.com/users/C3realGuy/repos","events_url":"https://api.github.com/users/C3realGuy/events{/privacy}","received_events_url":"https://api.github.com/users/C3realGuy/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T18:26:45Z","updated_at":"2015-04-20T18:26:45Z","body":"Thank you, i'm a bit worried that @Nao didn't merge it yet, but he also wasn't online on wedge.org in the last days...?!"}}