Bug #285

avatar

Almost all IRC commands might suffer from a race condition

Added by Mirco Bauer 5218 days ago. Updated 5217 days ago.

Status:Closed Start:01/09/2010
Priority:Urgent Due date:
Assigned to:avatarMirco Bauer % Done:

100%

Category:Engine IRC
Target version:0.7
Complexity:

High

Found in Version:

Votes: 0

Description

Many IRC commands (in IrcProtocolManager) rely on CommandModel.FrontendManager.CurrentChat which is just wrong. As that property might not be up-to-date, it could be lacking behind or suddenly change which the result that those commands are using the wrong target (say channel or query)! All commands need to use the chat object that was used when the command was issued, which simply is: CommandModel.Chat

Associated revisions

Revision c464415366c7a19050fc66b36e80a0d1485baf3b
Added by Mirco Bauer 5217 days ago

Marked FrontendManager.AddTextToCurrentChat() and .AddMessageToCurrentChat() as obsolete as they are unsafe! (refs: #285)

Revision 6931c2c0442d2038b53c1064c3a9a15826db27d7
Added by Mirco Bauer 5217 days ago

Fixed CurrentChat race conditions in all engine and frontends commands (closes: #285)

- Replaced all cd.FrontendManager.CurrentChat calls with cd.Chat
- Replaced all fm.AddTextToCurrentChat() calls with fm.AddTextToChat(cd.Chat, ...)

History

Updated by Mirco Bauer 5218 days ago

avatar

The most used IRC command (Say) is not affected by this issue, which is probably the reason it wasn't noticed by anyone (yet).

Updated by Mirco Bauer 5217 days ago

avatar
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF