What happened?
The country_code column in the mail_events table has type CHAR(2), but Mailgun will occasionally send the value 'Unknown' in the mapped event-data.geolocation.country field from its webhook call.
How to reproduce the bug
Observed from click event webhooks returned by Mailgun, the data.geolocation value received was {"city":"Unknown","country":"Unknown","region":"Unknown","timezone":"Unknown"}
Package Version
3.0.14
PHP Version
8.5.x
Laravel Version
13.4.0
Which operating systems does with happen with?
Linux
Notes
Not sure what the preferred fix would be, between additional validation/sanitization on the incoming webhook data or changing the column's datatype to something more flexible.
What happened?
The
country_codecolumn in themail_eventstable has type CHAR(2), but Mailgun will occasionally send the value 'Unknown' in the mappedevent-data.geolocation.countryfield from its webhook call.How to reproduce the bug
Observed from click event webhooks returned by Mailgun, the
data.geolocationvalue received was{"city":"Unknown","country":"Unknown","region":"Unknown","timezone":"Unknown"}Package Version
3.0.14
PHP Version
8.5.x
Laravel Version
13.4.0
Which operating systems does with happen with?
Linux
Notes
Not sure what the preferred fix would be, between additional validation/sanitization on the incoming webhook data or changing the column's datatype to something more flexible.