meebey / SmartIrc4net

IRC C# Library
http://www.meebey.net/projects/smartirc4net/
Other
126 stars 52 forks source link

Windows username exposed #51

Closed badjano closed 3 years ago

badjano commented 3 years ago

this client is exposing my windows username somehow, tried to find where in the code it gets it from, couldn´t find it

badjano commented 3 years ago

Just noticed I can override this on Login, but this: /// <param name="username">The user's machine logon name</param> is not cool, not at all

EDIT: Found the mischievous line: ( IrcClient.cs:537 ) _Username = Environment.UserName.Replace(" ", "");

dude... bad move

52

meebey commented 3 years ago

Thanks for your report. The user's machine logon name is exposed by design in IRC as defined in RFC 1459 sect 4.1.3 and RFC 2812 sect 3.1.3.

IRC uses this information together with the Ident protocol to idetify the user of the TCP connection. The library is RFC compliant and follows this. At your discretion you can override this information and behavior with username argument of the Login() function as you found.

Can you give a reason why the library should never do this and break the RFC specs?