mirror of
https://github.com/kristuff/abuseipdb
synced 2025-08-21 05:53:13 -07:00
fix clean message process
This commit is contained in:
parent
d3828776bb
commit
2e8041d6d1
1 changed files with 6 additions and 7 deletions
|
@ -177,7 +177,8 @@ class ApiManager extends ApiDefintion
|
|||
$msg = $this->cleanMessage($message);
|
||||
|
||||
// report AbuseIPDB request
|
||||
return $this->apiRequest('report', [
|
||||
return $this->apiRequest(
|
||||
'report', [
|
||||
'ip' => $ip,
|
||||
'categories' => $cats,
|
||||
'comment' => $msg
|
||||
|
@ -305,8 +306,6 @@ class ApiManager extends ApiDefintion
|
|||
*/
|
||||
protected function apiRequest(string $path, array $data, string $method = 'GET', bool $returnArray = false)
|
||||
{
|
||||
|
||||
|
||||
// set api url
|
||||
$url = $this->aipdbApiEndpoint . $path;
|
||||
|
||||
|
@ -363,7 +362,7 @@ class ApiManager extends ApiDefintion
|
|||
// If we're reporting spam, further munge any email addresses in the report
|
||||
$emailPattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
|
||||
$emailRemplacement = "[MUNGED]";
|
||||
preg_replace($emailPattern, $emailRemplacement, $message);
|
||||
$message = preg_replace($emailPattern, $emailRemplacement, $message);
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue