mirror of
https://github.com/kristuff/abuseipdb
synced 2025-08-14 18:57:08 -07:00
Update email pattern in cleanMessage()
method
Update email pattern to handle local addresses without TLD and to allow using the caracter `@` in custom message. Close #4
This commit is contained in:
parent
5639f1813a
commit
af62240932
1 changed files with 2 additions and 2 deletions
|
@ -469,8 +469,8 @@ class ApiHandler extends ApiBase
|
|||
}
|
||||
|
||||
// If we're reporting spam, further munge any email addresses in the report
|
||||
$emailPattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
|
||||
$message = preg_replace($emailPattern, "*", $message);
|
||||
$emailPattern = "/\b[A-Z0-9!#$%&'*`\/?^{|}~=+_.-]+@[A-Z0-9.-]+\b/i";
|
||||
$message = preg_replace($emailPattern, "*", $message);
|
||||
|
||||
// Make sure message is less 1024 chars
|
||||
return substr($message, 0, 1024);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue