Jelajahi Sumber

Passwords could be revealed in console by pressing backspace.

Pressing backspace causes hidden input (such as passwords) to be revealed on the console. The echo state was not being taken into account when handling a backspace key press.
Kevin Houlihan 12 tahun lalu
induk
melakukan
923f2459cf
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      OpenSim/Framework/Console/LocalConsole.cs

+ 4 - 1
OpenSim/Framework/Console/LocalConsole.cs

@@ -417,7 +417,10 @@ namespace OpenSim.Framework.Console
                         SetCursorLeft(0);
                         y = SetCursorTop(y);
 
-                        System.Console.Write("{0}{1} ", prompt, cmdline);
+                        if (echo)
+                            System.Console.Write("{0}{1} ", prompt, cmdline);
+                        else
+                            System.Console.Write("{0}", prompt);
 
                         break;
                     case ConsoleKey.End: