mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Hide login cmd from chat history

Open PlatinMTA opened this issue 1 year ago • 3 comments

With this the chat history won't store sensitive information regarding the /login command.

Fixes #2518

PlatinMTA avatar Sep 15 '24 00:09 PlatinMTA

I think this is not a good step. A much better solution would be to add a checkbox in the settings "store login data in console history" or something similar.

When creating a server, scripts such as a login panel, depending on its level of advancement, you often need to reconnect to test it. Then entering, for example, "log" and pressing TAB is very useful to log in immediately without manually entering the login and password each time. I don't think we should completely abandon it, as it is still a useful functionality.

FileEX avatar Sep 15 '24 01:09 FileEX

I think this is not a good step. A much better solution would be to add a checkbox in the settings "store login data in console history" or something similar.

When creating a server, scripts such as a login panel, depending on its level of advancement, you often need to reconnect to test it. Then entering, for example, "log" and pressing TAB is very useful to log in immediately without manually entering the login and password each time. I don't think we should completely abandon it, as it is still a useful functionality.

Eh I guess we could add a CVAR (for default the command is censored, otherwise is not) but if you are developing a login panel I don't get why you would want to use the /login cmd? The console does censor the command but only after the session has ended, and the chat history is not saved after the session is done so I guess thats inconsistent. I still think we shouldnt save the values eitherway.

PlatinMTA avatar Sep 15 '24 06:09 PlatinMTA

I think this is not a good step. A much better solution would be to add a checkbox in the settings "store login data in console history" or something similar. When creating a server, scripts such as a login panel, depending on its level of advancement, you often need to reconnect to test it. Then entering, for example, "log" and pressing TAB is very useful to log in immediately without manually entering the login and password each time. I don't think we should completely abandon it, as it is still a useful functionality.

Eh I guess we could add a CVAR (for default the command is censored, otherwise is not) but if you are developing a login panel I don't get why you would want to use the /login cmd? The console does censor the command but only after the session has ended, and the chat history is not saved after the session is done so I guess thats inconsistent. I still think we shouldnt save the values eitherway.

When writing a script, e.g. for the login panel, when we often do a reconnect to test it, the login command is very useful, because to see the debugscript view or restart the script, e.g. after fixing errors, we still have to log in to the ACL. The login data is stored until the MTA is closed, then there is only the command itself in the history without data. I don't know if the same thing happens when connecting to another server, but it still doesn't change the fact that this functionality is simply useful and taking it away from people overnight can only be frustrating.

FileEX avatar Sep 15 '24 11:09 FileEX

Can't you bind the login command to a key for testing?

botder avatar Dec 30 '24 15:12 botder

The gains outweigh that niche use (which is insecure), so the concept of this PR is fine. I also agree, if you really want to work like that, just use a bind.

Dutchman101 avatar Mar 01 '25 14:03 Dutchman101

This PR caused a new crash. It'll be temporarily reverted tomorrow, if no one submitted a fix by then.

Crash on line 669 @ CChat.cpp

Dumptrace: https://pastebin.com/fqBmb4hH

Version = 1.6-release-23016.0.000 Time = Sun Mar 2 01:06:44 2025 Module = C:\Program Files (x86)\MTA San Andreas 1.6\MTA\core.dll Code = 0xC0000005 Offset = 0x00006D42

EAX=0000000A EBX=09FAD100 ECX=60A4AD88 EDX=00000001 ESI=0B6EC338 EDI=0B6EB8E8 EBP=0177F008 ESP=0177EE28 EIP=60876D42 FLG=00210246 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B

cc @PlatinMTA

Dutchman101 avatar Mar 02 '25 00:03 Dutchman101