mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-18 16:18:04 +00:00
Improved security of "sendRequest" method
This commit is contained in:
@ -119,4 +119,18 @@ function safe_for_sql(string $input) : string {
|
||||
|
||||
return $input;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a given user ID
|
||||
*
|
||||
* @param int $userID The user ID to check
|
||||
* @return bool True if userID is valid, false else
|
||||
*/
|
||||
function check_user_id(int $userID) : bool {
|
||||
|
||||
if($userID < 1)
|
||||
return false; //Invalid
|
||||
|
||||
return true; //Valid
|
||||
}
|
Reference in New Issue
Block a user