Plant gump issues
http://jira.runuo.com/browse/RUNUO-12 House decay stages should pass at random intervals http://jira.runuo.com/browse/RUNUO-113 Nature's Fury cast issues http://jira.runuo.com/browse/RUNUO-114 Animal Form inaccuracies and issue with Talisman of the Fey http://jira.runuo.com/browse/RUNUO-115 BaseWaterContainer fill messages and behavior http://jira.runuo.com/browse/RUNUO-116 AdminGump filter for accounts owning houses http://jira.runuo.com/browse/RUNUO-118 Seeds should be stackable http://jira.runuo.com/browse/RUNUO-119 Typo in case of a jailbreak http://jira.runuo.com/browse/RUNUO-120 Prevent creation of invalid account names http://jira.runuo.com/browse/RUNUO-121
This commit is contained in:
parent
d2f79e93ea
commit
4cba2c8d56
18 changed files with 440 additions and 137 deletions
|
|
@ -251,17 +251,31 @@ namespace Server.Misc
|
|||
|
||||
return m_IPTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly char[] m_ForbiddenChars = new char[]
|
||||
{
|
||||
'<', '>', ':', '"', '/', '\\', '|', '?', '*'
|
||||
};
|
||||
|
||||
private static bool IsForbiddenChar( char c )
|
||||
{
|
||||
for ( int i = 0; i < m_ForbiddenChars.Length; ++i )
|
||||
if ( c == m_ForbiddenChars[i] )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Account CreateAccount( NetState state, string un, string pw )
|
||||
{
|
||||
if ( un.Length == 0 || pw.Length == 0 )
|
||||
return null;
|
||||
|
||||
bool isSafe = true;
|
||||
bool isSafe = !( un.StartsWith( " " ) || un.EndsWith( " " ) || un.EndsWith( "." ) );
|
||||
|
||||
for ( int i = 0; isSafe && i < un.Length; ++i )
|
||||
isSafe = ( un[i] >= 0x20 && un[i] < 0x80 );
|
||||
isSafe = ( un[i] >= 0x20 && un[i] < 0x80 && !IsForbiddenChar( un[i] ) );
|
||||
|
||||
for ( int i = 0; isSafe && i < pw.Length; ++i )
|
||||
isSafe = ( pw[i] >= 0x20 && pw[i] < 0x80 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue