Skip to content

fix(verify): honor double-confirm email change when mailer_autoconfirm is enabled (fixes #2600) - #2711

Open
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2600-double-confirm-autoconfirm
Open

fix(verify): honor double-confirm email change when mailer_autoconfirm is enabled (fixes #2600)#2711
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2600-double-confirm-autoconfirm

Conversation

@deepshekhardas

Copy link
Copy Markdown

fix(verify): honor double-confirm email change when mailer_autoconfirm is enabled (fixes #2600)

GOTRUE_MAILER_SECURE_EMAIL_CHANGE_ENABLED=true was silently bypassed
whenever GOTRUE_MAILER_AUTOCONFIRM=true: the guard in emailChangeVerify
ANDed !config.Mailer.Autoconfirm with the double-confirm checks, so the
two-token flow was skipped and the email change committed after a single
confirmation click. Autoconfirm only governs signup confirmation and is
orthogonal to email-change confirmation.

Remove !config.Mailer.Autoconfirm from the guard so double-confirm
holds regardless of the signup autoconfirm setting, and add
TestVerifySecureEmailChangeAutoconfirmEnabled covering the
autoconfirm=true + secure-email-change=true combination (first token
must not commit, second token commits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] double_confirm_changes silently bypassed when mailer_autoconfirm is true.

1 participant