{"action":"created","issue":{"url":"https://api.github.com/repos/OregonCore/OregonCore/issues/802","labels_url":"https://api.github.com/repos/OregonCore/OregonCore/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/OregonCore/OregonCore/issues/802/comments","events_url":"https://api.github.com/repos/OregonCore/OregonCore/issues/802/events","html_url":"https://github.com/OregonCore/OregonCore/issues/802","id":125601563,"number":802,"title":"Client - Lagging of core (BB #802)","user":{"login":"OregonAsari","id":16568392,"avatar_url":"https://avatars.githubusercontent.com/u/16568392?v=3","gravatar_id":"","url":"https://api.github.com/users/OregonAsari","html_url":"https://github.com/OregonAsari","followers_url":"https://api.github.com/users/OregonAsari/followers","following_url":"https://api.github.com/users/OregonAsari/following{/other_user}","gists_url":"https://api.github.com/users/OregonAsari/gists{/gist_id}","starred_url":"https://api.github.com/users/OregonAsari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OregonAsari/subscriptions","organizations_url":"https://api.github.com/users/OregonAsari/orgs","repos_url":"https://api.github.com/users/OregonAsari/repos","events_url":"https://api.github.com/users/OregonAsari/events{/privacy}","received_events_url":"https://api.github.com/users/OregonAsari/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OregonCore/OregonCore/labels/Category:%20Exploit","name":"Category: Exploit","color":"c7def8"},{"url":"https://api.github.com/repos/OregonCore/OregonCore/labels/Migrated%20from%20BitBucket","name":"Migrated from BitBucket","color":"337AB7"},{"url":"https://api.github.com/repos/OregonCore/OregonCore/labels/Priority:%20Medium","name":"Priority: Medium","color":"fef2c0"},{"url":"https://api.github.com/repos/OregonCore/OregonCore/labels/Type:%20Bug","name":"Type: Bug","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2016-01-08T12:21:08Z","updated_at":"2016-01-09T14:57:09Z","closed_at":"2016-01-08T12:21:14Z","body":"This issue was migrated from bitbucket.\n**Original Reporter:** smoldar\n**Original Date:** 29.01.2015 22:32:32 GMT+0000\n**Original Priority:** major\n**Original Type:** bug\n**Original State:** closed\n**Direct Link:** https://bitbucket.org/oregon/oregoncore/issues/802\n<hr>\nPlayer tryes to login again, AccountId = XXX\r\nPlayer tryes to login again, AccountId = XXX\r\nPlayer tryes to login again, AccountId = XXX\r\nPlayer tryes to login again, AccountId = XXX\r\n\r\n\r\n100x spammed in server.log / sec i think about packet attack of core, when this spam runned, core was laggy 50-5000ms\r\n\r\n\r\nI think this problem is here, this may be blocked by different way i think.\r\n\r\nDestroying of client session, or something else to avoid laggy, because client can repeatly spam core.\r\n\r\nCharacterHandler.cpp\r\n```\r\n#!c++\r\n\r\nvoid WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)\r\n{\r\n    if (PlayerLoading() || GetPlayer() != NULL)\r\n    {\r\n        sLog.outError(\"Player tryes to login again, AccountId = %d\",GetAccountId());\r\n        return;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/OregonCore/OregonCore/issues/comments/170245231","html_url":"https://github.com/OregonCore/OregonCore/issues/802#issuecomment-170245231","issue_url":"https://api.github.com/repos/OregonCore/OregonCore/issues/802","id":170245231,"user":{"login":"OregonAsari","id":16568392,"avatar_url":"https://avatars.githubusercontent.com/u/16568392?v=3","gravatar_id":"","url":"https://api.github.com/users/OregonAsari","html_url":"https://github.com/OregonAsari","followers_url":"https://api.github.com/users/OregonAsari/followers","following_url":"https://api.github.com/users/OregonAsari/following{/other_user}","gists_url":"https://api.github.com/users/OregonAsari/gists{/gist_id}","starred_url":"https://api.github.com/users/OregonAsari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OregonAsari/subscriptions","organizations_url":"https://api.github.com/users/OregonAsari/orgs","repos_url":"https://api.github.com/users/OregonAsari/repos","events_url":"https://api.github.com/users/OregonAsari/events{/privacy}","received_events_url":"https://api.github.com/users/OregonAsari/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T14:57:09Z","updated_at":"2016-01-09T14:57:09Z","body":"This comment was migrated from bitbucket.\n**Original User:** desteny\n**Original Date:** 03.02.2015 17:02:46 GMT+0000\n**Direct Link:** https://bitbucket.org/oregon/oregoncore/issues/802/#comment-15448347\n<hr>\nbut if you have 100x spammed in logs per sec (from the same user!!) then this is not a normal client action, for sure a attack.\nbut if this is from the same client, then its easy to block.\n\njust create a map (int, int) in c++ using accountid as key and count as value.\nthen define a threshold like 5 or 10 login actions alowed in 1 min (no normal player will log and relog as often)\n\nto keep it simple if the count is > then your threshold kick the session or just do nothing (silent return)\n\nevery minute you clear the map (or define your interval)\n\nthis simple mod will reduce the server load created by login spam significantly and has no impact on normal player"}}