fix: harden Vultr create, Gmail identity, and provider retries

Wrap Vultr server creation in DB transactions and delete the remote
instance when local persistence fails (API and Livewire). Scope
plus/dot email normalization to gmail.com/googlemail.com only.
Use throw:false on DigitalOcean/Vultr HTTP retries, and normalize
service log line counts via normalizeLogLines.
This commit is contained in:
Andras Bacsai committed 2026-07-16 13:42:53 +02:00
1 parent 2719d66042
commit 7d699818e8
15 files changed
+429 -63

No files matched your search

+6 -3
View File
@@ -8,9 +8,12 @@ function normalize_email_identity(?string $email): ?string
return null;
}
[$localPart, $domain] = explode('@', Str::lower($email), 2);
$localPart = Str::before($localPart, '+');
$localPart = str_replace('.', '', $localPart);
[$localPart, $domain] = explode('@', Str::lower(trim($email)), 2);
if (in_array($domain, ['gmail.com', 'googlemail.com'], true)) {
$localPart = Str::before($localPart, '+');
$localPart = str_replace('.', '', $localPart);
}
if (blank($localPart) || blank($domain)) {
return null;