Stricter Info_Validate
This commit is contained in:
parent
2bf82f1aba
commit
a6f949c8a6
|
|
@ -1301,12 +1301,22 @@ can mess up the server's parsing
|
|||
==================
|
||||
*/
|
||||
qboolean Info_Validate( const char *s ) {
|
||||
if ( strchr( s, '\"' ) ) {
|
||||
return qfalse;
|
||||
}
|
||||
if ( strchr( s, ';' ) ) {
|
||||
return qfalse;
|
||||
const char* ch = s;
|
||||
|
||||
while ( *ch != '\0' )
|
||||
{
|
||||
if( !Q_isprint( *ch ) )
|
||||
return qfalse;
|
||||
|
||||
if( *ch == '\"' )
|
||||
return qfalse;
|
||||
|
||||
if( *ch == ';' )
|
||||
return qfalse;
|
||||
|
||||
++ch;
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user