{"action":"created","issue":{"url":"https://api.github.com/repos/andsel/moquette/issues/44","labels_url":"https://api.github.com/repos/andsel/moquette/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/andsel/moquette/issues/44/comments","events_url":"https://api.github.com/repos/andsel/moquette/issues/44/events","html_url":"https://github.com/andsel/moquette/issues/44","id":83332812,"number":44,"title":"Check whether client is valid before close old channel with same clientID.","user":{"login":"bobwenx","id":2533748,"avatar_url":"https://avatars.githubusercontent.com/u/2533748?v=3","gravatar_id":"","url":"https://api.github.com/users/bobwenx","html_url":"https://github.com/bobwenx","followers_url":"https://api.github.com/users/bobwenx/followers","following_url":"https://api.github.com/users/bobwenx/following{/other_user}","gists_url":"https://api.github.com/users/bobwenx/gists{/gist_id}","starred_url":"https://api.github.com/users/bobwenx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobwenx/subscriptions","organizations_url":"https://api.github.com/users/bobwenx/orgs","repos_url":"https://api.github.com/users/bobwenx/repos","events_url":"https://api.github.com/users/bobwenx/events{/privacy}","received_events_url":"https://api.github.com/users/bobwenx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-01T05:56:29Z","updated_at":"2015-06-28T14:51:55Z","closed_at":"2015-06-28T14:51:55Z","body":"The CONNECT message process code: `ProtocolProcessor.processConnect` will first try to close presented connection if it has same clientID with current requester:\r\n```\r\nvoid processConnect(ServerChannel session, ConnectMessage msg) {\r\n\r\n    // it should check requester first before close old connection\r\n    if( m_clientIDs.contains(requester.clientID)){\r\n      //  close old connection here\r\n    }\r\n\r\n    if (authenticator != null && !authenticator.checkValid(msg.isUserFlag() ? msg.getUsername() : null, msg.isPasswordFlag() ? msg.getPassword().toCharArray() : null))\r\n    { \r\n            // ...\r\n    }\r\n}\r\n```\r\n it probably more reasonable to first check whether current requester is valid. because this can prevent evil client(without get authorized) to break exist connection."},"comment":{"url":"https://api.github.com/repos/andsel/moquette/issues/comments/116288400","html_url":"https://github.com/andsel/moquette/issues/44#issuecomment-116288400","issue_url":"https://api.github.com/repos/andsel/moquette/issues/44","id":116288400,"user":{"login":"andsel","id":1038545,"avatar_url":"https://avatars.githubusercontent.com/u/1038545?v=3","gravatar_id":"","url":"https://api.github.com/users/andsel","html_url":"https://github.com/andsel","followers_url":"https://api.github.com/users/andsel/followers","following_url":"https://api.github.com/users/andsel/following{/other_user}","gists_url":"https://api.github.com/users/andsel/gists{/gist_id}","starred_url":"https://api.github.com/users/andsel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andsel/subscriptions","organizations_url":"https://api.github.com/users/andsel/orgs","repos_url":"https://api.github.com/users/andsel/repos","events_url":"https://api.github.com/users/andsel/events{/privacy}","received_events_url":"https://api.github.com/users/andsel/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T14:51:55Z","updated_at":"2015-06-28T14:51:55Z","body":"Fixed with commit 5416a8714955b163e6bdb31add1edfec6f2e7055"}}