{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/9259","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/9259/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/9259/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/9259/events","html_url":"https://github.com/meteor/meteor/issues/9259","id":268216371,"number":9259,"title":"Is this the wrong array index?","user":{"login":"tbsisan","id":12181709,"avatar_url":"https://avatars1.githubusercontent.com/u/12181709?v=4","gravatar_id":"","url":"https://api.github.com/users/tbsisan","html_url":"https://github.com/tbsisan","followers_url":"https://api.github.com/users/tbsisan/followers","following_url":"https://api.github.com/users/tbsisan/following{/other_user}","gists_url":"https://api.github.com/users/tbsisan/gists{/gist_id}","starred_url":"https://api.github.com/users/tbsisan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbsisan/subscriptions","organizations_url":"https://api.github.com/users/tbsisan/orgs","repos_url":"https://api.github.com/users/tbsisan/repos","events_url":"https://api.github.com/users/tbsisan/events{/privacy}","received_events_url":"https://api.github.com/users/tbsisan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-24T23:09:51Z","updated_at":"2017-10-25T17:51:27Z","closed_at":"2017-10-25T17:51:27Z","author_association":"NONE","body":"https://github.com/meteor/meteor/blob/1687537f6ea03312183059fed45f12f350de2f17/packages/ddp-server/livedata_server.js#L938\r\n\r\nIt seems that it should be \r\n```javascript\r\nif (httpForwardedCount < 0 || httpForwardedCount >= forwardedFor.length)\r\n      return null;\r\n\r\nreturn forwardedFor[forwardedFor.length - 1 - httpForwardedCount];\r\n```\r\n\r\nMy DDPRateLimiter was using the wrong IP address because of this.  Also, I would suggest that IPv6 addresses should only rate-limit based on the first 64 bits of the address, since it is free to create new IPv6 addresses?"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/339414636","html_url":"https://github.com/meteor/meteor/issues/9259#issuecomment-339414636","issue_url":"https://api.github.com/repos/meteor/meteor/issues/9259","id":339414636,"user":{"login":"hwillson","id":137740,"avatar_url":"https://avatars1.githubusercontent.com/u/137740?v=4","gravatar_id":"","url":"https://api.github.com/users/hwillson","html_url":"https://github.com/hwillson","followers_url":"https://api.github.com/users/hwillson/followers","following_url":"https://api.github.com/users/hwillson/following{/other_user}","gists_url":"https://api.github.com/users/hwillson/gists{/gist_id}","starred_url":"https://api.github.com/users/hwillson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwillson/subscriptions","organizations_url":"https://api.github.com/users/hwillson/orgs","repos_url":"https://api.github.com/users/hwillson/repos","events_url":"https://api.github.com/users/hwillson/events{/privacy}","received_events_url":"https://api.github.com/users/hwillson/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T17:51:27Z","updated_at":"2017-10-25T17:51:27Z","author_association":"COLLABORATOR","body":"@tbsisan `httpForwardedCount` is determined by looking at the `HTTP_FORWARDED_COUNT` environment variable. If you're saying that the count subtracted from `forwardedFor.length` should be increased by 1, try bumping your `HTTP_FORWARDED_COUNT` environment variable up by 1.\r\n\r\nI know the documentation for this isn't great, but you can find more details here:\r\n\r\n- https://docs.meteor.com/environment-variables.html#HTTP-FORWARDED-COUNT\r\n- https://docs.meteor.com/api/connections.html#Meteor-onConnection\r\n\r\nRegarding:\r\n\r\n> I would suggest that IPv6 addresses should only rate-limit based on the first 64 bits of the address, since it is free to create new IPv6 addresses\r\n\r\nCould you open this in a new feature request over in http://github.com/meteor/meteor-feature-requests? Thanks!"}}
{"actor":{"display_login":"hwillson"}}