Files
Auto-ssl/backend/handlers
cnbugs d0e738e1ef fix: use SQLite upsert to eliminate race condition on domain uniqueness constraint
Previously the CreateCertificate handler checked domain existence and then
inserted separately, creating a race window where concurrent requests could
both pass the check and trigger 'UNIQUE constraint failed' on INSERT.

Now uses SQLite's native INSERT ... ON CONFLICT (upsert) which atomically
handles the uniqueness constraint at the database level, eliminating the
race condition entirely.
2026-05-12 15:22:30 +08:00
..