commit - 2de5b5cf4a4197846763e397f17d7a17a681f298
commit + b0b797b396b358207056444de9b3242ed3817c0d
blob - f90c4d2eb7c318eccaa25d3d06fba94b5be828ed
blob + 1a81b62950572d145408c2c0fd87d368c0cce09b
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: parse.c,v 1.46 2002/11/24 18:45:43 alex Exp $
+ * $Id: parse.c,v 1.47 2002/11/28 11:02:50 alex Exp $
*
* parse.c: Parsen der Client-Anfragen
*/
}
else start = Request;
- if( ! Validate_Prefix( Idx, &req, &closed )) return ! closed;
-
/* Befehl */
ptr = strchr( start, ' ' );
if( ptr )
}
req.command = start;
- if( ! Validate_Command( Idx, &req, &closed )) return ! closed;
-
/* Argumente, Parameter */
if( ptr )
{
}
}
+ /* Daten validieren */
+ if( ! Validate_Prefix( Idx, &req, &closed )) return ! closed;
+ if( ! Validate_Command( Idx, &req, &closed )) return ! closed;
if( ! Validate_Args( Idx, &req, &closed )) return ! closed;
return Handle_Request( Idx, &req );
if( ! c )
{
/* im Prefix angegebener Client ist nicht bekannt */
- Log( LOG_ERR, "Invalid prefix \"%s\", client not known (connection %d)!?", Req->prefix, Idx );
+ Log( LOG_ERR, "Invalid prefix \"%s\", client not known (connection %d, command %s)!?", Req->prefix, Idx, Req->command );
if( ! Conn_WriteStr( Idx, "ERROR :Invalid prefix \"%s\", client not known!?", Req->prefix )) *Closed = TRUE;
return FALSE;
}
{
/* das angegebene Prefix ist aus dieser Richtung, also
* aus der gegebenen Connection, ungueltig! */
- Log( LOG_ERR, "Spoofed prefix \"%s\" from \"%s\" (connection %d)!", Req->prefix, Client_Mask( Client_GetFromConn( Idx )), Idx );
+ Log( LOG_ERR, "Spoofed prefix \"%s\" from \"%s\" (connection %d, command %s)!", Req->prefix, Client_Mask( Client_GetFromConn( Idx )), Idx, Req->command );
Conn_Close( Idx, NULL, "Spoofed prefix", TRUE );
*Closed = TRUE;
return FALSE;