{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/16786","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/16786/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/16786/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/16786/events","html_url":"https://github.com/laravel/framework/issues/16786","id":195380986,"number":16786,"title":"Throttle middleware counting wrong when using it multiple times","user":{"login":"Sopamo","id":1202596,"avatar_url":"https://avatars0.githubusercontent.com/u/1202596?v=4","gravatar_id":"","url":"https://api.github.com/users/Sopamo","html_url":"https://github.com/Sopamo","followers_url":"https://api.github.com/users/Sopamo/followers","following_url":"https://api.github.com/users/Sopamo/following{/other_user}","gists_url":"https://api.github.com/users/Sopamo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sopamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sopamo/subscriptions","organizations_url":"https://api.github.com/users/Sopamo/orgs","repos_url":"https://api.github.com/users/Sopamo/repos","events_url":"https://api.github.com/users/Sopamo/events{/privacy}","received_events_url":"https://api.github.com/users/Sopamo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T22:00:09Z","updated_at":"2018-05-14T08:56:08Z","closed_at":"2016-12-14T01:16:46Z","author_association":"CONTRIBUTOR","body":"- Laravel Version: 5.3.x (I think 5.2 as well)\r\n\r\n### Description:\r\nWhen using the throttle middleware more than once it decreases the remaining limit by one for each throttle middleware that is used. This is because the middleware doesn't check if a request already has been throttled.\r\nI'm using the throttle middleware multiple times because I have a global one and another one which is less forgiving for specific routes which are prone to be abused.\r\n\r\n### Steps To Reproduce:\r\n - Setup a global throttle middleware\r\n - Setup a route group with another throttle middleware\r\n - Call a route in the route group, the X-RateLimit-Remaining will decrease by two instead of one every time\r\n\r\nI think the fix is rather simple by adding a list of already throttled request signatures and checking against it before checking the limiter. I can create a pull request if you want."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/388745184","html_url":"https://github.com/laravel/framework/issues/16786#issuecomment-388745184","issue_url":"https://api.github.com/repos/laravel/framework/issues/16786","id":388745184,"user":{"login":"saifuldhaka","id":2381203,"avatar_url":"https://avatars2.githubusercontent.com/u/2381203?v=4","gravatar_id":"","url":"https://api.github.com/users/saifuldhaka","html_url":"https://github.com/saifuldhaka","followers_url":"https://api.github.com/users/saifuldhaka/followers","following_url":"https://api.github.com/users/saifuldhaka/following{/other_user}","gists_url":"https://api.github.com/users/saifuldhaka/gists{/gist_id}","starred_url":"https://api.github.com/users/saifuldhaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saifuldhaka/subscriptions","organizations_url":"https://api.github.com/users/saifuldhaka/orgs","repos_url":"https://api.github.com/users/saifuldhaka/repos","events_url":"https://api.github.com/users/saifuldhaka/events{/privacy}","received_events_url":"https://api.github.com/users/saifuldhaka/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T08:56:08Z","updated_at":"2018-05-14T08:56:08Z","author_association":"NONE","body":"i used to to protect login attempts more then limit, my question is when this count reset again. is it like if i login successfully it reset the previous failed login attempts ?"}}
{"actor":{"display_login":"saifuldhaka"}}