{"action":"created","issue":{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/768","labels_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/768/labels{/name}","comments_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/768/comments","events_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/768/events","html_url":"https://github.com/Bitmessage/PyBitmessage/issues/768","id":54678937,"number":768,"title":"Insufficient checkings for private IP range","user":{"login":"Kagami","id":533383,"avatar_url":"https://avatars.githubusercontent.com/u/533383?v=3","gravatar_id":"","url":"https://api.github.com/users/Kagami","html_url":"https://github.com/Kagami","followers_url":"https://api.github.com/users/Kagami/followers","following_url":"https://api.github.com/users/Kagami/following{/other_user}","gists_url":"https://api.github.com/users/Kagami/gists{/gist_id}","starred_url":"https://api.github.com/users/Kagami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kagami/subscriptions","organizations_url":"https://api.github.com/users/Kagami/orgs","repos_url":"https://api.github.com/users/Kagami/repos","events_url":"https://api.github.com/users/Kagami/events{/privacy}","received_events_url":"https://api.github.com/users/Kagami/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"PeterSurda","id":3815204,"avatar_url":"https://avatars.githubusercontent.com/u/3815204?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterSurda","html_url":"https://github.com/PeterSurda","followers_url":"https://api.github.com/users/PeterSurda/followers","following_url":"https://api.github.com/users/PeterSurda/following{/other_user}","gists_url":"https://api.github.com/users/PeterSurda/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterSurda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterSurda/subscriptions","organizations_url":"https://api.github.com/users/PeterSurda/orgs","repos_url":"https://api.github.com/users/PeterSurda/repos","events_url":"https://api.github.com/users/PeterSurda/events{/privacy}","received_events_url":"https://api.github.com/users/PeterSurda/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/milestones/1","html_url":"https://github.com/Bitmessage/PyBitmessage/milestones/v0.6.0","labels_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/milestones/1/labels","id":1362166,"number":1,"title":"v0.6.0","description":"Next stable release","creator":{"login":"PeterSurda","id":3815204,"avatar_url":"https://avatars.githubusercontent.com/u/3815204?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterSurda","html_url":"https://github.com/PeterSurda","followers_url":"https://api.github.com/users/PeterSurda/followers","following_url":"https://api.github.com/users/PeterSurda/following{/other_user}","gists_url":"https://api.github.com/users/PeterSurda/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterSurda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterSurda/subscriptions","organizations_url":"https://api.github.com/users/PeterSurda/orgs","repos_url":"https://api.github.com/users/PeterSurda/repos","events_url":"https://api.github.com/users/PeterSurda/events{/privacy}","received_events_url":"https://api.github.com/users/PeterSurda/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":14,"state":"open","created_at":"2015-10-18T09:05:30Z","updated_at":"2015-11-12T00:03:37Z","due_on":"2015-12-23T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-01-17T23:01:56Z","updated_at":"2015-11-12T16:34:51Z","closed_at":null,"body":"Seems like you forgot to add checking for 172.16.0.0/12 private network range:\r\nhttps://github.com/Bitmessage/PyBitmessage/blob/master/src/class_receiveDataThread.py#L491\r\n(used in `recaddr`)\r\n\r\nSimilar issue: `sendaddr` uses another routine `isHostInPrivateIPRange` from `helper_generic` module which has checking for `172.16/12` but lacks IPv6 support in its turn:\r\nhttps://github.com/Bitmessage/PyBitmessage/blob/master/src/helper_generic.py#L25"},"comment":{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/comments/156158491","html_url":"https://github.com/Bitmessage/PyBitmessage/issues/768#issuecomment-156158491","issue_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/768","id":156158491,"user":{"login":"PeterSurda","id":3815204,"avatar_url":"https://avatars.githubusercontent.com/u/3815204?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterSurda","html_url":"https://github.com/PeterSurda","followers_url":"https://api.github.com/users/PeterSurda/followers","following_url":"https://api.github.com/users/PeterSurda/following{/other_user}","gists_url":"https://api.github.com/users/PeterSurda/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterSurda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterSurda/subscriptions","organizations_url":"https://api.github.com/users/PeterSurda/orgs","repos_url":"https://api.github.com/users/PeterSurda/repos","events_url":"https://api.github.com/users/PeterSurda/events{/privacy}","received_events_url":"https://api.github.com/users/PeterSurda/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T16:34:50Z","updated_at":"2015-11-12T16:34:50Z","body":"If I understand correctly, once I do what you request, among other things, it will become less likely that PyBitmessage will attempt to connect to hosts within a private range, **even if they actually are in the same local network**. Is this intentional?\r\n\r\nAlso, isn't it enough to change the recaddr function (the first one of the four changes you requested)? Then only those IPs you already have stored locally will be tried to connect to, they will soon time out and it won't accept any more IPs from these ranges. In the worst case, people who don't upgrade will be statistically more affected than if the changes 2-4 were implemented too.\r\n\r\nOr do I misunderstand something?"}}