mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Strip slashes on user agent and ip to prevent user header modification for XSS attack in API logging
This commit is contained in:
@@ -7,9 +7,9 @@ include(__DIR__ . "../../../config.php");
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// Get user IP
|
||||
$ip = mysqli_real_escape_string($mysqli,get_ip());
|
||||
$ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip()));
|
||||
// Get user agent
|
||||
$user_agent = mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT']);
|
||||
$user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT']));
|
||||
|
||||
// Setup return array
|
||||
$return_arr = array();
|
||||
|
||||
Reference in New Issue
Block a user